Most tools won't work when sql_mode=ANSI
Bug #821722 reported by
Daniel Nichter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Imported from http://
If sql_mode=ANSI then ANSI quotes are enabled:
Treat “"” as an identifier quote character (like the “`” quote character) and not as a string quote character. You can still use “`” to quote identifiers with this mode enabled. With ANSI_QUOTES enabled, you cannot use double quotation marks to quote literal strings, because it is interpreted as an identifier. (http://
There's a lot of code that uses double quotes. The workaround: --set-vars "SQL_MODE=''"
Related branches
lp:~percona-toolkit-dev/percona-toolkit/fix-i26211-1058285-821722-implicit-ansi_quotes
- Brian Fraser (community): Approve
- Daniel Nichter: Approve
-
Diff: 692 lines (+402/-91)18 files modifiedbin/pt-archiver (+7/-6)
bin/pt-duplicate-key-checker (+7/-6)
bin/pt-find (+7/-6)
bin/pt-heartbeat (+7/-6)
bin/pt-index-usage (+7/-6)
bin/pt-kill (+7/-6)
bin/pt-online-schema-change (+10/-10)
bin/pt-query-advisor (+7/-6)
bin/pt-query-digest (+7/-6)
bin/pt-table-checksum (+7/-6)
bin/pt-table-sync (+7/-6)
bin/pt-table-usage (+7/-6)
bin/pt-upgrade (+7/-6)
lib/TableParser.pm (+13/-8)
t/pt-online-schema-change/ansi_quotes.t (+144/-0)
t/pt-online-schema-change/bugs.t (+0/-1)
t/pt-online-schema-change/samples/issue-26211.sql (+118/-0)
t/pt-online-schema-change/samples/sql-mode-bug-1058285.sql (+33/-0)
tags: | added: all-tools |
Changed in percona-toolkit: | |
status: | New → Confirmed |
To post a comment you must log in.
I just committed a bunch of stuff to lp:~percona-toolkit-dev/percona-toolkit/stabilize-test-suite/ that partially addresses this problem. The crown jewel is TableParser.pm, which is ANSI-quote- compatible in revision 275 of that branch.