summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB.pm
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-04-15 07:20:53 +0200
committermkanat%kerio.com <>2005-04-15 07:20:53 +0200
commitc48fd6c4d71411630ccdea80ea848fe53edd37cb (patch)
tree6fd83ba903704ce8149acb1d4d6af61157846696 /Bugzilla/DB.pm
parent297fc3e8d333f02f999303cd2cce501b8b12795c (diff)
downloadbugzilla-c48fd6c4d71411630ccdea80ea848fe53edd37cb.tar.gz
bugzilla-c48fd6c4d71411630ccdea80ea848fe53edd37cb.tar.xz
Bug 290089: Move timestamp updates to happen before any other Schema updates
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=Tomas.Kopal, a=justdave
Diffstat (limited to 'Bugzilla/DB.pm')
-rw-r--r--Bugzilla/DB.pm17
1 files changed, 11 insertions, 6 deletions
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