1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 21:36:12 +02:00

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>
This commit is contained in:
Frank Lichtenheld 2007-03-31 15:57:47 +02:00 committed by Junio C Hamano
parent 920a449af5
commit 0cf611a300

View File

@ -2171,10 +2171,8 @@ sub new
die "Error connecting to database\n" unless defined $self->{dbh};
$self->{tables} = {};
foreach my $table ( $self->{dbh}->tables )
foreach my $table ( keys %{$self->{dbh}->table_info(undef,undef,undef,'TABLE')->fetchall_hashref('TABLE_NAME')} )
{
$table =~ s/^"//;
$table =~ s/"$//;
$self->{tables}{$table} = 1;
}