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:
parent
920a449af5
commit
0cf611a300
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user