Commit f5c61f21 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 301020: Remove useless locked tables - Patch by Frédéric Buclin…

Bug 301020: Remove useless locked tables - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=justdave
parent 8f893f4d
......@@ -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) {
......
......@@ -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*.
......
......@@ -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});
......
......@@ -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',
......
......@@ -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) {
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment