summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-01-28 02:15:18 +0100
committerlpsolit%gmail.com <>2008-01-28 02:15:18 +0100
commitc0b4d49d2ed629ccba8c5fc0d61ebf28972d6ada (patch)
treef181f794f5ae4c38a5e10a1b57fd06fa2d21576d /Bugzilla/DB
parentce3089f58a6edcb4074df97d1e6133d55b04377a (diff)
downloadbugzilla-c0b4d49d2ed629ccba8c5fc0d61ebf28972d6ada.tar.gz
bugzilla-c0b4d49d2ed629ccba8c5fc0d61ebf28972d6ada.tar.xz
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 <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Mysql.pm38
1 files changed, 0 insertions, 38 deletions
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();