From: justdave%syndicomm.com <> Date: Tue, 20 Jan 2004 11:07:41 +0000 (+0000) Subject: Bug 224815: The check-in for bug 212095 (which fixed a forward-compatibility problem... X-Git-Tag: bugzilla-2.16.5~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08da04f22623905477f7d0ea7382eae18d74cc5c;p=thirdparty%2Fbugzilla.git Bug 224815: The check-in for bug 212095 (which fixed a forward-compatibility problem with DBD::mysql) created a backward compatibility issue with DBI (unintentionally bumped the required minimum DBI version). This checkin puts the proper code in place to allow the minimum stated DBI according to the Bugzilla 2.16 documentation as well as the current DBI version as of this writing. r= myk, bbaetz a= justdave --- diff --git a/checksetup.pl b/checksetup.pl index b9fbf01a9e..4dc2bf53fa 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -1610,8 +1610,14 @@ $table{tokens} = ########################################################################### # Get a list of the existing tables (if any) in the database -my $sth = $dbh->table_info(undef, undef, undef, "TABLE"); -my @tables = @{$dbh->selectcol_arrayref($sth, { Columns => [3] })}; +my @tables; +if ($DBI::VERSION < 1.20) { + @tables = map { $_ =~ s/.*\.//; $_ } $dbh->tables; +} +else { + my $sth = $dbh->table_info(undef, undef, undef, "TABLE"); + @tables = @{$dbh->selectcol_arrayref($sth, { Columns => [3] })}; +} #print 'Tables: ', join " ", @tables, "\n"; # add lines here if you add more --LOCAL-- config vars that end up in the enums: @@ -1907,7 +1913,7 @@ sub bailout { # this is just in case we get interrupted while getting passwd exit 1; } -$sth = $dbh->prepare(<<_End_Of_SQL_); +my $sth = $dbh->prepare(<<_End_Of_SQL_); SELECT login_name FROM profiles WHERE groupset=9223372036854775807