Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
0436b3d4
Commit
0436b3d4
authored
Sep 04, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 57350: "added comments" search is slow or doesn't work at all
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=myk
parent
fbe550dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
Schema.pm
Bugzilla/DB/Schema.pm
+1
-1
DB.pm
Bugzilla/Install/DB.pm
+15
-6
No files found.
Bugzilla/DB/Schema.pm
View file @
0436b3d4
...
...
@@ -269,7 +269,7 @@ use constant ABSTRACT_SCHEMA => {
],
INDEXES
=>
[
longdescs_bug_id_idx
=>
[
'bug_id'
],
longdescs_who_idx
=>
[
'who'
],
longdescs_who_idx
=>
[
qw(who bug_id)
],
longdescs_bug_when_idx
=>
[
'bug_when'
],
longdescs_thetext_idx
=>
{
FIELDS
=>
[
'thetext'
],
TYPE
=>
'FULLTEXT'
},
...
...
Bugzilla/Install/DB.pm
View file @
0436b3d4
...
...
@@ -218,12 +218,6 @@ sub update_table_definitions {
_recrypt_plaintext_passwords
();
# 2001-06-06 justdave@syndicomm.com:
# There was no index on the 'who' column in the long descriptions table.
# This caused queries by who posted comments to take a LONG time.
# http://bugzilla.mozilla.org/show_bug.cgi?id=57350
$dbh
->
bz_add_index
(
'longdescs'
,
'longdescs_who_idx'
,
[
qw(who)
]);
# 2001-06-15 kiko@async.com.br - Change bug:version size to avoid
# truncates re http://bugzilla.mozilla.org/show_bug.cgi?id=9352
$dbh
->
bz_alter_column
(
'bugs'
,
'version'
,
...
...
@@ -489,6 +483,8 @@ sub update_table_definitions {
$dbh
->
bz_alter_column
(
'profiles'
,
'realname'
,
{
TYPE
=>
'varchar(255)'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
});
_update_longdescs_who_index
();
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
...
...
@@ -2695,6 +2691,19 @@ EOT
}
}
sub
_update_longdescs_who_index
{
my
$dbh
=
Bugzilla
->
dbh
;
# When doing a search on who posted a comment, longdescs is joined
# against the bugs table. So we need an index on both of these,
# not just on "who".
my
$who_index
=
$dbh
->
bz_index_info
(
'longdescs'
,
'longdescs_who_idx'
);
if
(
!
$who_index
||
scalar
@
{
$who_index
->
{
FIELDS
}}
==
1
)
{
# If the index doesn't exist, this will harmlessly do nothing.
$dbh
->
bz_drop_index
(
'longdescs'
,
'longdescs_who_idx'
);
$dbh
->
bz_add_index
(
'longdescs'
,
'longdescs_who_idx'
,
[
qw(who bug_id)
]);
}
}
1
;
__END__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment