Hi,
I was just testing out pt-table-sync and was using this argument list
PTDEBUG=1 pt-table-sync --print --no-check-slave --replicate --tables=<table_name> h= h= h= > TS_db1_master
items in <> are placeholders
This errored out and I got the following in the debug output
TableChecksum:4252 23295 SELECT db, tbl, CONCAT(db, ‘.’, tbl) AS table
, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM --tables=category_stats WHERE master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)
DBD::mysql::db selectall_arrayref 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 ‘–tables=category_stats WHERE master_cnt <> this_cnt OR master_crc <> this_crc O’ at line 1 [for Statement “SELECT db, tbl, CONCAT(db, ‘.’, tbl) AS table
, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM --tables=category_stats WHERE master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)”] at /usr/bin/pt-table-sync line 4253.
Seems like it is passing --tables=table_name as a whole and not just the arg?
This is the latest version of the toolkit…I don’t believe there is a bug for this already and I wanted confirmation of it being a bug first