From 496ad3d1ff432cd04ee3a1a6c90d38e61450d606 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 15 Mar 2007 09:29:45 +0000 Subject: Bug 374004: Enable transaction code and use it in some installation places Patch By Max Kanat-Alexander (module owner) a=mkanat --- Bugzilla/Install/DB.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Bugzilla/Install/DB.pm') 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"); } } -- cgit v1.2.3-24-g4f1b