Skip to content

fix(mysqldump): unescape generation expressions from INFORMATION_SCHEMA#847

Open
marcnoller wants to merge 1 commit intoshopware:mainfrom
marcnoller:bugfix/issue-846-invalid-escaping
Open

fix(mysqldump): unescape generation expressions from INFORMATION_SCHEMA#847
marcnoller wants to merge 1 commit intoshopware:mainfrom
marcnoller:bugfix/issue-846-invalid-escaping

Conversation

@marcnoller
Copy link

Summary

Fixes incorrectly escaped generated column expressions in mysqldump output.

Changes

  • Added unescape() helper in internal/mysqldump/escape.go.
  • Applied unescaping for generation expressions in internal/mysqldump/schema.go.
  • Added tests in internal/mysqldump/escape_test.go:
    • special-sequence decoding
    • round-trip escape -> unescape
    • unknown-sequence passthrough
    • trailing backslash passthrough
  • Added schema regression test in internal/mysqldump/schema_test.go for escaped quotes in generated expressions.

Why this is needed

Generated column expressions should be emitted exactly as valid SQL expressions, without transport-level escaping artifacts from INFORMATION_SCHEMA.

References

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.

Project Dump Invalid Escaping

1 participant