pt-table-sync crashes if sql_mode includes ANSI_QUOTES
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Brian Fraser |
Bug Description
If I replace the double quotes on line 8736 with single quotes it gets past this.
$ pt-table-sync --dry-run h=s5.leadkarma.
$ pt-table-sync --version
pt-table-sync 2.1.2
first host:
Server version: 5.5.17-log Distributed by The IUS Community Project
second host:
Server version: 5.1.58-1ubuntu1-log (Ubuntu)
$ pt-table-sync --dry-run h=s5.leadkarma.
# NOTE: --dry-run does not show if data needs to be synced because it
# does not access, compare or sync data. --dry-run only shows
# the work that would be done.
# Syncing D=keywords,
# DELETE REPLACE INSERT UPDATE ALGORITHM START END EXIT DATABASE.TABLE
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 '"log_bin"' at line 1 [for Statement "SHOW VARIABLES LIKE "log_bin""] at line 8736 while doing keywords.
# 0 0 0 0 0 17:29:19 17:29:20 1 id_prod.
Related branches
- Daniel Nichter: Approve
-
Diff: 12 lines (+1/-1)1 file modifiedbin/pt-table-sync (+1/-1)
Changed in percona-toolkit: | |
status: | New → Confirmed |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
summary: |
- Double quotes results in a syntax error + pt-table-sync crashes if sql_mode includes ANSI_QUOTES |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Mike, can you confirm that your server is using ANSI_QUOTES in its SQL mode? That would cause this error.
In any case, we have been tracking down and fixing all uses of double quotes like this because they conflict with ANSI quotes. So thanks for reporting this.