From d3f8bf365e5b93f58497a25e07fde7ce30884f9d Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Fri, 18 Feb 2005 05:57:26 +0000 Subject: Bug 280503: Replace "LOCK/UNLOCK TABLES" with Bugzilla::DB function call Patch By Tomas Kopal r=mkanat,a=myk --- editgroups.cgi | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'editgroups.cgi') diff --git a/editgroups.cgi b/editgroups.cgi index 818997114..c3be719c7 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -483,10 +483,8 @@ if (($action eq 'remove_all_regexp') || ($action eq 'remove_all')) { WHERE id = ?"); $sth->execute($gid); my ($name, $regexp) = $sth->fetchrow_array(); - $dbh->do("LOCK TABLES - groups WRITE, - profiles READ, - user_group_map WRITE"); + $dbh->bz_lock_tables('groups WRITE', 'profiles READ', + 'user_group_map WRITE'); $sth = $dbh->prepare("SELECT user_group_map.user_id, profiles.login_name FROM user_group_map, profiles WHERE user_group_map.user_id = profiles.userid @@ -516,7 +514,7 @@ if (($action eq 'remove_all_regexp') || ($action eq 'remove_all')) { SET last_changed = NOW() WHERE id = ?"); $sth->execute($gid); - $dbh->do("UNLOCK TABLES"); + $dbh->bz_unlock_tables(); $vars->{'users'} = \@users; $vars->{'name'} = $name; @@ -545,9 +543,9 @@ sub doGroupChanges { my $dbh = Bugzilla->dbh; my $sth; - $dbh->do("LOCK TABLES groups WRITE, group_group_map WRITE, - user_group_map WRITE, profiles READ, - namedqueries READ, whine_queries READ"); + $dbh->bz_lock_tables('groups WRITE', 'group_group_map WRITE', + 'user_group_map WRITE', 'profiles READ', + 'namedqueries READ', 'whine_queries READ'); # Check that the given group ID and regular expression are valid. # If tests are successful, trimmed values are returned by CheckGroup*. @@ -651,6 +649,6 @@ sub doGroupChanges { # mark the changes SendSQL("UPDATE groups SET last_changed = NOW() WHERE id = $gid"); } - $dbh->do("UNLOCK TABLES"); + $dbh->bz_unlock_tables(); return $gid, $chgs, $name, $regexp; } -- cgit v1.2.3-24-g4f1b