Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong dump or failed restore in some SQL modes #1342

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

midenok
Copy link
Collaborator

@midenok midenok commented Nov 7, 2023

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

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

Fixes mydumper#1340
@davidducos davidducos merged commit 2a38c43 into mydumper:master Nov 10, 2023
37 checks passed
@davidducos davidducos added this to the Release 0.15.3-1 milestone Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants