Wrong dump or failed restore in some SQL modes #1342
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are dangerous SQL modes (NO_BACKSLASH_ESCAPES, PIPES_AS_CONCAT) in which mydumper cannot operate correctly (maybe it can operate in PIPES_AS_CONCAT now, but it may break in future if mydumper will utilize || operator). OTOH there are SQL modes that must be same when dumping and restoring (like ORACLE mode, ANSI, ANSI_QUOTES).
The patch cuts out NO_BACKSLASH_ESCAPES and PIPES_AS_CONCAT and sets the rest as its session sql_mode. It also dumps this sql_mode to files.
Bugs descriptions:
https://jira.mariadb.org/browse/CONTRIB-26
https://jira.mariadb.org/browse/CONTRIB-27
https://jira.mariadb.org/browse/CONTRIB-28