Skip to content

Commit

Permalink
cvsserver: Use DBI->table_info instead of DBI->tables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frank Lichtenheld authored and Junio C Hamano committed Mar 31, 2007
1 parent 920a449 commit 0cf611a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0cf611a

Please sign in to comment.