From a53154ddb0372471d1b4ab5399d307e280dc5625 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" Date: Fri, 14 Oct 2005 03:50:57 +0000 Subject: [PATCH] Bug 312406 Checksetup fails to check for existing group_group_map for Bugzilla <2.17 patch by A. Karl Kornel r=joel, a=justdave --- webtools/bugzilla/checksetup.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webtools/bugzilla/checksetup.pl b/webtools/bugzilla/checksetup.pl index 37067267d11..372d4ff87f8 100755 --- a/webtools/bugzilla/checksetup.pl +++ b/webtools/bugzilla/checksetup.pl @@ -4205,6 +4205,11 @@ if (@admins) { (user_id, group_id, isbless, grant_type) VALUES ($userid, $adminid, 1, " . GRANT_DIRECT . ")"); } + + $dbh->bz_lock_tables('groups READ', + 'group_group_map WRITE'); + $dbh->do('DELETE FROM group_group_map WHERE member_id = ?', + undef, $adminid); $sth = $dbh->prepare("SELECT id FROM groups"); $sth->execute(); while ( my ($id) = $sth->fetchrow_array() ) { @@ -4222,6 +4227,7 @@ if (@admins) { (member_id, grantor_id, grant_type) VALUES ($adminid, $id," . GROUP_MEMBERSHIP . ")"); } + $dbh->bz_unlock_tables(); }