-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
MySQL BaseRule.g4 file contains reserve words in identifierUnambiguousKeywords #34890
Comments
Hello @strongduanmu could you please assign it to me. |
Hi @Yash-cor, thank you for your feedback. Although the MySQL documentation describes this, there are some hidden features. For example At present, we have not fully understood how many hidden scenarios MySQL has, so ShardingSphere SQL Parser maintains as loose rules as possible, that is, it allows the use of reserved words as identifiers, so that no errors will be reported during parsing. If MySQL does not support this writing method, a parsing exception will be thrown during SQL execution. If you are interested in this question, I think you can read the parsing in the MySQL source code and maybe find some clear rules. |
Ok I will give it a try then, thanks for the response |
Feature Request
For English only, other languages will not be accepted.
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot make decision by current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Is your feature request related to a problem?
YES
Describe the feature you would like.
Some Reserve Keywords of MySQL are kept in identifierUnambiguousKeywords in BaseRule.g4
For Example:
RANK is a reserve keyword stored in identifierUnambiguousKeywords.
This causes it to parse SQL queries correctly like -
SELECT id as rank FROM employees;
whereas MySQL does not allow this query to parse without using ```.
The text was updated successfully, but these errors were encountered: