diff options
author | lpsolit%gmail.com <> | 2006-03-31 20:27:26 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-03-31 20:27:26 +0200 |
commit | f5c61f2184b3d93768eacfd676a5513caabcc1a5 (patch) | |
tree | ec32beeba4fd15efbb1d309b832b67029cbc0996 | |
parent | 8f893f4d3aa0c635193b2f4240fc707bd31846ac (diff) | |
download | bugzilla-f5c61f2184b3d93768eacfd676a5513caabcc1a5.tar.gz bugzilla-f5c61f2184b3d93768eacfd676a5513caabcc1a5.tar.xz |
Bug 301020: Remove useless locked tables - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=justdave
-rwxr-xr-x | editcomponents.cgi | 3 | ||||
-rwxr-xr-x | editgroups.cgi | 3 | ||||
-rwxr-xr-x | editproducts.cgi | 7 | ||||
-rwxr-xr-x | editusers.cgi | 14 | ||||
-rwxr-xr-x | editversions.cgi | 4 | ||||
-rwxr-xr-x | process_bug.cgi | 5 | ||||
-rwxr-xr-x | votes.cgi | 3 |
7 files changed, 9 insertions, 30 deletions
diff --git a/editcomponents.cgi b/editcomponents.cgi index 601873e83..30caaf5f3 100755 --- a/editcomponents.cgi +++ b/editcomponents.cgi @@ -359,8 +359,7 @@ if ($action eq 'update') { my $default_assignee_id = login_to_id($default_assignee); my $default_qa_contact_id = login_to_id($default_qa_contact) || undef; - $dbh->bz_lock_tables('components WRITE', 'products READ', - 'profiles READ'); + $dbh->bz_lock_tables('components WRITE', 'profiles READ'); if ($comp_name ne $component_old->name) { diff --git a/editgroups.cgi b/editgroups.cgi index d28d95f19..9c1280d5c 100755 --- a/editgroups.cgi +++ b/editgroups.cgi @@ -565,8 +565,7 @@ sub doGroupChanges { $dbh->bz_lock_tables('groups WRITE', 'group_group_map WRITE', 'bug_group_map WRITE', 'user_group_map WRITE', - 'group_control_map READ', 'bugs READ', 'profiles READ', - 'namedqueries READ', 'whine_queries READ'); + 'group_control_map READ', 'bugs READ', 'profiles READ'); # Check that the given group ID and regular expression are valid. # If tests are successful, trimmed values are returned by CheckGroup*. diff --git a/editproducts.cgi b/editproducts.cgi index 30b3d32a6..794caf158 100755 --- a/editproducts.cgi +++ b/editproducts.cgi @@ -806,12 +806,7 @@ if ($action eq 'update') { {votestoconfirm => $stored_votestoconfirm}); } - $dbh->bz_lock_tables('products WRITE', - 'versions READ', - 'groups WRITE', - 'group_control_map WRITE', - 'profiles WRITE', - 'milestones READ'); + $dbh->bz_lock_tables('products WRITE', 'milestones READ'); my $testproduct = new Bugzilla::Product({name => $product_name}); diff --git a/editusers.cgi b/editusers.cgi index 6e56a3847..639e5ee1c 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -199,13 +199,8 @@ if ($action eq 'search') { my $disabledtext = trim($cgi->param('disabledtext') || ''); # Lock tables during the check+creation session. - $dbh->bz_lock_tables('profiles WRITE', - 'profiles_activity WRITE', - 'groups READ', - 'user_group_map WRITE', - 'email_setting WRITE', - 'namedqueries READ', - 'whine_queries READ', + $dbh->bz_lock_tables('profiles WRITE', 'email_setting WRITE', + 'user_group_map WRITE', 'groups READ', 'tokens READ'); # Validity checks @@ -249,13 +244,10 @@ if ($action eq 'search') { $dbh->bz_lock_tables('profiles WRITE', 'profiles_activity WRITE', 'fielddefs READ', - 'namedqueries READ', - 'whine_queries READ', 'tokens WRITE', 'logincookies WRITE', 'groups READ', 'user_group_map WRITE', - 'user_group_map AS ugm READ', 'group_group_map READ', 'group_group_map AS ggm READ'); @@ -528,10 +520,8 @@ if ($action eq 'search') { 'profiles_activity WRITE', 'email_setting WRITE', 'profile_setting WRITE', - 'groups READ', 'bug_group_map READ', 'user_group_map WRITE', - 'group_group_map READ', 'flags WRITE', 'flagtypes READ', 'cc WRITE', diff --git a/editversions.cgi b/editversions.cgi index dc6992ba8..dc03bfed9 100755 --- a/editversions.cgi +++ b/editversions.cgi @@ -255,9 +255,7 @@ if ($action eq 'update') { # Note that the order of this tests is important. If you change # them, be sure to test for WHERE='$version' or WHERE='$versionold' - $dbh->bz_lock_tables('bugs WRITE', - 'versions WRITE', - 'products READ'); + $dbh->bz_lock_tables('bugs WRITE', 'versions WRITE'); if ($version_name ne $version_old->name) { diff --git a/process_bug.cgi b/process_bug.cgi index f19763c23..c1f3b9b90 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -1471,11 +1471,10 @@ foreach my $id (@idlist) { $bug_changed = 0; my $write = "WRITE"; # Might want to make a param to control # whether we do LOW_PRIORITY ... - $dbh->bz_lock_tables("bugs $write", "bugs_activity $write", - "cc $write", "cc AS selectVisible_cc $write", + $dbh->bz_lock_tables("bugs $write", "bugs_activity $write", "cc $write", "profiles READ", "dependencies $write", "votes $write", "products READ", "components READ", - "keywords $write", "longdescs $write", "fielddefs $write", + "keywords $write", "longdescs $write", "fielddefs READ", "bug_group_map $write", "flags $write", "duplicates $write", "user_group_map READ", "group_group_map READ", "flagtypes READ", "flaginclusions AS i READ", "flagexclusions AS e READ", @@ -126,8 +126,7 @@ sub show_user { $dbh->bz_lock_tables('bugs READ', 'products READ', 'votes WRITE', 'cc READ', 'bug_group_map READ', 'user_group_map READ', - 'group_group_map READ', - 'cc AS selectVisible_cc READ', 'groups READ'); + 'group_group_map READ', 'groups READ'); if ($canedit && $bug_id) { # Make sure there is an entry for this bug |