Subject: | table_info doesn't recognize % for types |
The table_info treatment of % for type (both view and tables) was broken
in 4.003. Previously,
my @tables = $dbh->tables(undef,'test_db','%','%');
Would return all tables and views. Now the second % need be "" or undef
to get all the tables.
Here is a patch:
--- old/mysql.pm 2007-05-18 13:58:28.157920300 -0700
+++ new/mysql.pm 2007-05-18 14:00:54.985232500 -0700
@@ -328,7 +328,7 @@
# Figure out which table types are desired
my ($want_tables, $want_views);
- if (defined $type && $type ne "") {
+ if (defined $type && $type ne "" && $type ne "%" ) {
$want_tables = ($type =~ m/table/i);
$want_views = ($type =~ m/view/i);
} else {