pt-find runs exec-plus with nothing to do
Bug #1364288 reported by
jgreenso
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Got a SQL error logged from crontab which made me suspicious. We find tables and remove them based on age:
/usr/bin/pt-find --config /etc/percona-
If there are no tables found, a "DROP TABLE " is executed which results in the SQL error. I wasn't expecting exec-plus to operate based on nothing being found.
ii percona-toolkit 2.2.10 Advanced MySQL and system command-line tools
To post a comment you must log in.
Able to reproduce the same. There is no table like "tablename" in test database. Still its trying to run DROP TABLE and giving syntax error.
nilnandan@ Dell-XPS: ~$ pt-find --version Dell-XPS: ~$ pt-find --user=root --ask-pass --ctime +10 --tbllike 'tablename%' test --exec-plus 'DROP TABLE %s' Dell-XPS: ~$
pt-find 2.2.10
nilnandan@
Enter password:
DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 [for Statement "DROP TABLE "] at /usr/bin/pt-find line 4119.
nilnandan@