Skip to content

Fix mutations text serialization#18944

Merged
tavplubix merged 2 commits intomasterfrom
fix_mutation_commands_escaping
Jan 12, 2021
Merged

Fix mutations text serialization#18944
tavplubix merged 2 commits intomasterfrom
fix_mutation_commands_escaping

Conversation

@alesapin
Copy link
Copy Markdown
Member

@alesapin alesapin commented Jan 11, 2021

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix bug when mutation with some escaped text (like ALTER ... UPDATE e = CAST('foo', 'Enum8(\'foo\' = 1') serialized incorrectly. Fixes #18878.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Jan 11, 2021
@alesapin
Copy link
Copy Markdown
Member Author

alesapin commented Jan 11, 2021

Our escaping manipulators are very confusing: https://github.com/ClickHouse/ClickHouse/blob/fix_mutation_commands_escaping/src/IO/Operators.h#L59-L64. const char * argument will be escaped, but std::string and other strings will not.

@tavplubix tavplubix self-assigned this Jan 12, 2021
@alexey-milovidov
Copy link
Copy Markdown
Member

@alesapin @akuzm

The bug was introduced in this PR: #17206

argument will be escaped, but std::string and other strings will not.

All arguments must be escaped. escape manip is intented to do escaping.
Please write a unit test.

alesapin added a commit that referenced this pull request Jan 13, 2021
Backport #18944 to 20.12: Fix mutations text serialization
alesapin added a commit that referenced this pull request Jan 15, 2021
Backport #18944 to 21.1: Fix mutations text serialization
alesapin added a commit that referenced this pull request Jan 16, 2021
Backport #18944 to 20.10: Fix mutations text serialization
alexey-milovidov added a commit that referenced this pull request Jan 16, 2021
Backport #18944 to 20.11: Fix mutations text serialization
@alexey-milovidov
Copy link
Copy Markdown
Member

FYI this bug was not present in any ClickHouse release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server cannot parse mutation command list.

4 participants