From c0b4d49d2ed629ccba8c5fc0d61ebf28972d6ada Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 28 Jan 2008 01:15:18 +0000 Subject: Bug 121069: Remove $dbh->bz_(un)lock_tables from process_bug.cgi and Error.pm in favor of DB transactions. These methods are no longer used and are completely removed now - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/DB/Mysql.pm | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'Bugzilla/DB/Mysql.pm') diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 9e0d25277..720c8ff42 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -200,44 +200,6 @@ sub sql_group_by { } -sub bz_lock_tables { - my ($self, @tables) = @_; - - my $list = join(', ', @tables); - # Check first if there was no lock before - if ($self->{private_bz_tables_locked}) { - ThrowCodeError("already_locked", { current => $self->{private_bz_tables_locked}, - new => $list }); - } else { - $self->bz_start_transaction(); - $self->do('LOCK TABLE ' . $list); - $self->{private_bz_tables_locked} = $list; - } -} - -sub bz_unlock_tables { - my ($self, $abort) = @_; - - if ($self->bz_in_transaction) { - if ($abort) { - $self->bz_rollback_transaction(); - } - else { - $self->bz_commit_transaction(); - } - } - - # Check first if there was previous matching lock - if (!$self->{private_bz_tables_locked}) { - # Abort is allowed even without previous lock for error handling - return if $abort; - ThrowCodeError("no_matching_lock"); - } else { - $self->do("UNLOCK TABLES"); - $self->{private_bz_tables_locked} = ""; - } -} - sub _bz_get_initial_schema { my ($self) = @_; return $self->_bz_build_schema_from_disk(); -- cgit v1.2.3-24-g4f1b