Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
3.2.1
-
None
-
0
Description
pt-upgrade fails when a query including format strings and SQL errors is given.
Assume that, for example, we have a raw log file including a single line
SELECT '%s', A
and then execute the following:
pt-upgrade $RAW_LOG_FILE h=$HOST1,u=$USER1,p=$PASS1 h=$HOST2,u=$USER2,p=$PASS2 --type rawlog
Then, we will get the following error:
> pt-upgrade debug.sql h=127.0.0.1,p=root,u=mysql h=127.0.0.1,p=root,u=mysql --type rawlog #----------------------------------------------------------------------- # Logs #----------------------------------------------------------------------- File: debug.sql Size: 15 #----------------------------------------------------------------------- # Hosts #----------------------------------------------------------------------- host1: DSN: h=127.0.0.1 hostname: 09919a165973 MySQL: MySQL Community Server (GPL) 5.7.28 host2: DSN: h=127.0.0.1 hostname: 09919a165973 MySQL: MySQL Community Server (GPL) 5.7.28 ######################################################################## # Query class 56A6741F24C4C3EF ######################################################################## Reporting class because it has SQL errors, but hasn't been reported yet. Total queries 1 Unique queries 1 Discarded queries 0 select ?, a ## ## SQL errors: 1 ## -- 1. $VAR1 = { discarded => 0, errors => [], failures => [ [ 'SELECT \'%s\', A', 'DBD::mysql::st execute failed: Unknown column \'A\' in \'field list\' [for Statement "SELECT \'%s\', A"]', 'DBD::mysql::st execute failed: Unknown column \'A\' in \'field list\' [for Statement "SELECT \'%s\', A"]' ] ], fingerprint => 'select ?, a', id => '56A6741F24C4C3EF', query_time_diffs => [], row_diffs => [], total_queries => 1, unique_queries => { 'SELECT \'%s\', A' => 1 }, warning_diffs => [] }; Error reporting query class 56A6741F24C4C3EF: Missing argument in printf at /usr/local/Cellar/percona-toolkit/3.2.0/libexec/bin/pt-upgrade line 6162. #----------------------------------------------------------------------- # Stats #----------------------------------------------------------------------- failed_queries 1 not_select 0 queries_filtered 0 queries_no_diffs 0 queries_read 1 queries_with_diffs 0 queries_with_errors 0
I think that this bug is independent from MySQL server versions.
Attachments
Issue Links
- mentioned in
-
Page Loading...