From 9d6205cdb651fe3769ac58f03068dedb68e7689a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 19 Nov 2007 02:20:53 +0000 Subject: Bug 399163: Bugzilla/*.pm should use transactions for database interaction - Patch by Emmanuel Seyman r/a=mkanat --- Bugzilla/Series.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Series.pm') diff --git a/Bugzilla/Series.pm b/Bugzilla/Series.pm index d6fd7a08a..a99c442fe 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -170,7 +170,7 @@ sub writeToDatabase { my $self = shift; my $dbh = Bugzilla->dbh; - $dbh->bz_lock_tables('series_categories WRITE', 'series WRITE'); + $dbh->bz_start_transaction(); my $category_id = getCategoryID($self->{'category'}); my $subcategory_id = getCategoryID($self->{'subcategory'}); @@ -209,7 +209,7 @@ sub writeToDatabase { || ThrowCodeError("missing_series_id", { 'series' => $self }); } - $dbh->bz_unlock_tables(); + $dbh->bz_commit_transaction(); } # Check whether a series with this name, category and subcategory exists in -- cgit v1.2.3-24-g4f1b