Comment 1 for bug 1028614

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

I can reproduce this:

$ ./pt-index-usage --database sakila ../t/pt-index-usage/samples/slow006.txt -h 127.1 -P 12345 -u msandbox -p msandbox
DBD::mysql::db selectall_arrayref failed: Table 'z.film_text' doesn't exist [for Statement "EXPLAIN select * from film_text"] at ./pt-index-usage line 4263, <> line 1.

The --database (-D) works, but the tool isn't restoring it after it gets SHOW CREATE TABLE defs for tables from other dbs. So in the above, the "z" database is the last db the tool accesses, leaving it as the current db.