zihaoAK47 opened a new issue, #26748: URL: https://github.com/apache/shardingsphere/issues/26748
## Question Hello community, for user-defined variables that are defined using keywords, such as the following SQL statements: select @select kill @empty SET @drop = IF(@have_ndb = 0, @drop_cmd, 'SET @dummy = 0') KILL QUERY @drop KILL QUERY @drop and so on. The above SQL statements are all executable, but during parsing, if there are lexical rules defined in the MySQL Keyword.g4 file, the matching order according to the antlr4 lexical rules will prioritize matching the lexical rules defined in MySQL Keyword.g4, resulting in syntax matching failure. I would like to add a grammar rule in BaseRule.g4 that includes all MySQL Keyword lexical rule information, and then modify the userVariable reference to add the new rule so that there will be no incorrect matching caused by referencing keyword variables when parsing SQL. Is this a correct solution? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
