diff options
author | lpsolit%gmail.com <> | 2007-11-15 05:56:31 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-11-15 05:56:31 +0100 |
commit | 0dadaed4ffb582ccfbc2356e7715007819d1cea2 (patch) | |
tree | a44cf83a9670d0a5e2ebc63a1dcc27a012924fc1 /contrib | |
parent | ec38a93e110be22f7316871994f91dc53712bcd2 (diff) | |
download | bugzilla-0dadaed4ffb582ccfbc2356e7715007819d1cea2.tar.gz bugzilla-0dadaed4ffb582ccfbc2356e7715007819d1cea2.tar.xz |
Bug 403824: Replace table locks in most Bugzilla files with transactions - Patch by Emmanuel Seyman <eseyman@linagora.com> r/a=mkanat
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/merge-users.pl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/merge-users.pl b/contrib/merge-users.pl index ac689abfd..70250a1ee 100644 --- a/contrib/merge-users.pl +++ b/contrib/merge-users.pl @@ -154,9 +154,8 @@ my $changes = { profiles => [], # ['userid'], }; -# Lock tables -my @locked_tables = map {"$_ WRITE"} keys(%$changes); -$dbh->bz_lock_tables(@locked_tables); +# Start the transaction +$dbh->bz_start_transaction(); # Delete old records from logincookies and tokens tables. $dbh->do('DELETE FROM logincookies WHERE userid = ?', undef, $old_id); @@ -230,7 +229,7 @@ print "OK, records in the 'mailto' column of the 'whine_schedules' table\n" . # Delete the old record from the profiles table. $dbh->do('DELETE FROM profiles WHERE userid = ?', undef, $old_id); -# Unlock tables -$dbh->bz_unlock_tables(); +# Commit the transaction +$dbh->bz_commit_transaction(); print "Done.\n"; |