summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2005-10-14 12:50:57 +0200
committerbugreport%peshkin.net <>2005-10-14 12:50:57 +0200
commit80bd2397efa41155558324e02b655178606cf252 (patch)
treeb3ece441abcc40c67ddfa3cd0d504e2d44e35f87
parentc872f810e18320d0b618f23b71cecc019d218cb1 (diff)
downloadbugzilla-80bd2397efa41155558324e02b655178606cf252.tar.gz
bugzilla-80bd2397efa41155558324e02b655178606cf252.tar.xz
Bug 312406 Checksetup fails to check for existing group_group_map for Bugzilla <2.17
patch by A. Karl Kornel <karl@kornel.name> r=joel, a=justdave
-rwxr-xr-xchecksetup.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 37067267d..372d4ff87 100755
--- a/checksetup.pl
+++ b/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();
}