From c48fd6c4d71411630ccdea80ea848fe53edd37cb Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Fri, 15 Apr 2005 05:20:53 +0000 Subject: Bug 290089: Move timestamp updates to happen before any other Schema updates Patch By Max Kanat-Alexander r=Tomas.Kopal, a=justdave --- Bugzilla/DB.pm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'Bugzilla/DB.pm') diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index b0106314e..6cd938aa6 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -589,13 +589,18 @@ sub bz_index_info { # XXX - Needs to be made cross-db compatible. sub bz_get_field_def ($$) { my ($self, $table, $field) = @_; - my $sth = $self->prepare("SHOW COLUMNS FROM $table"); - $sth->execute; - while (my $ref = $sth->fetchrow_arrayref) { - next if $$ref[0] ne $field; - return $ref; - } + if ($self->bz_table_exists($table)) { + + my $sth = $self->prepare("SHOW COLUMNS FROM $table"); + $sth->execute; + + while (my $ref = $sth->fetchrow_arrayref) { + next if $$ref[0] ne $field; + return $ref; + } + } + return undef; } # XXX - Needs to be made cross-db compatible -- cgit v1.2.3-24-g4f1b