@matheusbsbs / matheus-bagliano / commits / 0cf611a300
Fork 0

cvsserver: Use DBI->table_info instead of DBI->tables

DBI->table_info is portable across different DBD backends, DBI->tables is not. Limit the output to objects of type TABLE. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>

Frank Lichtenheld committed Mar 31, 2007 at 15:57 UTC 0cf611a300fbbbd12827f9defb9cbcc934a3b1d6
1 file changed +1 -3
git-cvsserver.perl
+1 -3
@@ -2171,10 +2171,8 @@ sub new
2171 die "Error connecting to database\n" unless defined $self->{dbh};
2172
2173 $self->{tables} = {};
2174 - foreach my $table ( $self->{dbh}->tables )
2174 + foreach my $table ( keys %{$self->{dbh}->table_info(undef,undef,undef,'TABLE')->fetchall_hashref('TABLE_NAME')} )
2175 {
2176 - $table =~ s/^"//;
2177 - $table =~ s/"$//;
2176 $self->{tables}{$table} = 1;
2177 }
2178