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

SET NAMES collation fix, results have proper charset #1224

Merged
merged 1 commit into from Aug 29, 2022

Conversation

Hydrocharged
Copy link
Contributor

@Hydrocharged Hydrocharged commented Aug 29, 2022

Fixes two issues. SET NAMES would cause all statements that feature a COLLATE expression to error if the character set and collation did not match, however such a comparison only makes sense for string literals (at parse time). This has been fixed, as the parse-time check only occurs for literals, and checks that require analysis (such as table columns) now occur at the appropriate time. In addition, the system variable character_set_results was not used when returning string results, resulting in unexpected behavior, which has also been fixed.

Copy link
Contributor

@andy-wm-arthur andy-wm-arthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

sql/expression/collatedexpr.go Outdated Show resolved Hide resolved
@Hydrocharged Hydrocharged merged commit fe6fcf9 into main Aug 29, 2022
@Hydrocharged Hydrocharged deleted the daylon/more-coll-fixes branch August 29, 2022 21:18
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