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

Owner: Nobody in particular
Requestors: mgrimes [...]

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

Subject: table_info doesn't recognize % for types
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 719
Download (untitled) / with headers
text/plain 719b
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/ 2007-05-18 13:58:28.157920300 -0700 +++ new/ 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 {
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2361-1288108392-38.27192-0-0 [...]>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 208
Download (untitled) / with headers
text/plain 208b
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

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to