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
657f495a
Commit
657f495a
authored
Jul 09, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 577754: Make updating bugs_fulltext during checksetup.pl WAY faster
for MySQL. r=mkanat, a=mkanat (module owner)
parent
8bdb86fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
DB.pm
Bugzilla/Install/DB.pm
+12
-3
No files found.
Bugzilla/Install/DB.pm
View file @
657f495a
...
...
@@ -3182,12 +3182,21 @@ sub _populate_bugs_fulltext {
return
if
!
@$bug_ids
;
my
$num_bugs
=
scalar
@$bug_ids
;
my
$command
=
"INSERT"
;
my
$where
=
""
;
if
(
$fulltext
)
{
print
"Updating bugs_fulltext for $num_bugs bugs...\n"
;
$where
=
"WHERE "
.
$dbh
->
sql_in
(
'bugs.bug_id'
,
$bug_ids
);
$dbh
->
do
(
"DELETE FROM bugs_fulltext WHERE "
.
$dbh
->
sql_in
(
'bug_id'
,
$bug_ids
));
# It turns out that doing a REPLACE INTO is up to 10x faster
# than any other possible method of updating the table, in MySQL,
# which matters a LOT for large installations.
if
(
$dbh
->
isa
(
'Bugzilla::DB::Mysql'
))
{
$command
=
"REPLACE"
;
}
else
{
$dbh
->
do
(
"DELETE FROM bugs_fulltext WHERE "
.
$dbh
->
sql_in
(
'bug_id'
,
$bug_ids
));
}
}
else
{
print
"Populating bugs_fulltext with $num_bugs entries..."
;
...
...
@@ -3195,7 +3204,7 @@ sub _populate_bugs_fulltext {
}
my
$newline
=
$dbh
->
quote
(
"\n"
);
$dbh
->
do
(
q{INSERT
INTO bugs_fulltext (bug_id, short_desc, comments,
qq{$command
INTO bugs_fulltext (bug_id, short_desc, comments,
comments_noprivate)
SELECT bugs.bug_id, bugs.short_desc, }
.
$dbh
->
sql_group_concat
(
'longdescs.thetext'
,
$newline
,
0
)
...
...
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