Bug 280503: Replace "LOCK/UNLOCK TABLES" with Bugzilla::DB function call

Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat,a=myk


git-svn-id: svn://10.0.0.236/trunk@169333 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%kerio.com
2005-02-17 21:57:27 +00:00
parent 14e2243a01
commit a88c76e484
23 changed files with 232 additions and 192 deletions

View File

@@ -250,7 +250,7 @@ sub InsertNamedQuery ($$$;$) {
# it when we display it to the user.
trick_taint($query);
$dbh->do("LOCK TABLES namedqueries WRITE");
$dbh->bz_lock_tables('namedqueries WRITE');
my $result = $dbh->selectrow_array("SELECT userid FROM namedqueries"
. " WHERE userid = ? AND name = ?"
@@ -269,7 +269,7 @@ sub InsertNamedQuery ($$$;$) {
, undef, ($userid, $query_name, $query, $link_in_footer));
}
$dbh->do("UNLOCK TABLES");
$dbh->bz_unlock_tables();
return $query_existed_before;
}