You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zihaoAK47 (via GitHub)" <gi...@apache.org> on 2023/07/03 07:34:35 UTC

[GitHub] [shardingsphere] zihaoAK47 opened a new issue, #26748: User defined variable keyword parsing failed

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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] terrymanu commented on issue #26748: User defined variable keyword parsing failed

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #26748:
URL: https://github.com/apache/shardingsphere/issues/26748#issuecomment-1622208168

   Please refer to the issue template to provide more details for your question. for example: version


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zihaoAK47 commented on issue #26748: User defined variable keyword parsing failed

Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on issue #26748:
URL: https://github.com/apache/shardingsphere/issues/26748#issuecomment-1622872431

   > Please refer to the issue template to provide more details for your question. for example: version
   
   Hi mentor, thank you for your reply. I have revised the description of the problem


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zihaoAK47 commented on issue #26748: User defined variable keyword parsing failed

Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 commented on issue #26748:
URL: https://github.com/apache/shardingsphere/issues/26748#issuecomment-1617537582

   @strongduanmu Hi, mentor please take a look at this question. Thank you


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zihaoAK47 closed issue #26748: User defined variable keyword parsing failed

Posted by "zihaoAK47 (via GitHub)" <gi...@apache.org>.
zihaoAK47 closed issue #26748: User defined variable keyword parsing failed
URL: https://github.com/apache/shardingsphere/issues/26748


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org