Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 27192
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: mgrimes [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 4.003
Fixed in: (no value)



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 {
This is how DBI is supposed to work: " If the value of $schema is ’%’ and $catalog and $table are empty strings, the result set contains a list of schema names. " Per the Perldoc page for DBI