From 0dadaed4ffb582ccfbc2356e7715007819d1cea2 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 15 Nov 2007 04:56:31 +0000 Subject: Bug 403824: Replace table locks in most Bugzilla files with transactions - Patch by Emmanuel Seyman r/a=mkanat --- query.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'query.cgi') diff --git a/query.cgi b/query.cgi index aaabc1529..622c1588c 100755 --- a/query.cgi +++ b/query.cgi @@ -70,7 +70,7 @@ if ($userid) { # If the query name contains invalid characters, don't import. $name =~ /[<>&]/ && next; trick_taint($name); - $dbh->bz_lock_tables('namedqueries WRITE'); + $dbh->bz_start_transaction(); my $query = $dbh->selectrow_array( "SELECT query FROM namedqueries " . "WHERE userid = ? AND name = ?", @@ -80,7 +80,7 @@ if ($userid) { "(userid, name, query) VALUES " . "(?, ?, ?)", undef, ($userid, $name, $value)); } - $dbh->bz_unlock_tables(); + $dbh->bz_commit_transaction(); } $cgi->remove_cookie($cookiename); } -- cgit v1.2.3-24-g4f1b