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

Support ANSI_QUOTES parsing mode #256

Merged
merged 5 commits into from
Jul 25, 2023
Merged

Support ANSI_QUOTES parsing mode #256

merged 5 commits into from
Jul 25, 2023

Conversation

fulghum
Copy link

@fulghum fulghum commented Jul 24, 2023

The ANSI_QUOTES SQL mode changes the behavior of the double quote character. By default in MySQL, ANSI_QUOTES is not enabled and the double quote character is used to quote string literals. When ANSI_QUOTES is enabled, the double quote character may only quote identifiers. The ANSI_QUOTES mode does not change the behavior for backtick quote chars (they always quote identifiers) or single quote chars (they always quote string literals).

MySQL Reference Docs for ANSI_QUOTES

Related to: dolthub/dolt#6305 (This is the first step towards supporting ANSI_QUOTES mode in Dolt/GMS)

GMS PR dolthub/go-mysql-server#1896 stubs out the new Handler interface function, but actually using ANSI_QUOTES mode in Dolt or GMS won't be possible until a few more changes to Dolt/GMS.

@fulghum fulghum marked this pull request as ready for review July 25, 2023 17:02
@fulghum fulghum requested a review from zachmu as a code owner July 25, 2023 17:02
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

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

LGTM!

go/vt/sqlparser/ast.go Outdated Show resolved Hide resolved
go/vt/sqlparser/token.go Outdated Show resolved Hide resolved
@fulghum fulghum merged commit 2217701 into main Jul 25, 2023
4 checks passed
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.

2 participants