summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-03-15 10:29:45 +0100
committermkanat%bugzilla.org <>2007-03-15 10:29:45 +0100
commit496ad3d1ff432cd04ee3a1a6c90d38e61450d606 (patch)
treeebc6ab41906ff0404b631ca09b0d4323219f1eda /Bugzilla/Install
parentedd47c05d21853caa46e9f95ca7e1504f215216f (diff)
downloadbugzilla-496ad3d1ff432cd04ee3a1a6c90d38e61450d606.tar.gz
bugzilla-496ad3d1ff432cd04ee3a1a6c90d38e61450d606.tar.xz
Bug 374004: Enable transaction code and use it in some installation places
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/DB.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 6ddca06bd..7d4939877 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -2205,6 +2205,9 @@ sub _migrate_email_prefs_to_new_table {
my %requestprefs = ("FlagRequestee" => EVT_FLAG_REQUESTED,
"FlagRequester" => EVT_REQUESTED_FLAG);
+ # We run the below code in a transaction to speed things up.
+ $dbh->bz_start_transaction();
+
# Select all emailflags flag strings
my $sth = $dbh->prepare("SELECT userid, emailflags FROM profiles");
$sth->execute();
@@ -2271,6 +2274,7 @@ sub _migrate_email_prefs_to_new_table {
# EVT_ATTACHMENT.
_clone_email_event(EVT_ATTACHMENT, EVT_ATTACHMENT_DATA);
+ $dbh->bz_commit_transaction();
$dbh->bz_drop_column("profiles", "emailflags");
}
}