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

[GitHub] [shardingsphere] TeslaCN opened a new issue, #25138: MySQL user/system variable was not parsed into VariableSegment

TeslaCN opened a new issue, #25138:
URL: https://github.com/apache/shardingsphere/issues/25138

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master - 1533b52e8380f2efb612fa55c087da54786f151e
   
   ### Expected behavior
   
   User/System variables could be parsed into `VariableSegment`.
   
   ### Actual behavior
   
   ![image](https://user-images.githubusercontent.com/20503072/231378205-b99c4e85-7280-4933-841f-631ae51b0f1c.png)
   
   ![image](https://user-images.githubusercontent.com/20503072/231378253-62d88a07-514e-4e2b-9fc2-a3a8c573238a.png)
   
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ```sql
   select @@max_allowed_packet AS max_allowed_packet, @@character_set_client;
   select @@version_comment limit 1;
   ```
   
   ### Analyze
   
   `MySQLDALStatementSQLVisitor` override `visitVariable`, `visitUserVariable`, `visitSystemVariable`. But `visitSimpleExpr` doesn't handle `ctx.variable()`. So the following are dead codes.
   
   https://github.com/apache/shardingsphere/blob/1533b52e8380f2efb612fa55c087da54786f151e/sql-parser/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLDALStatementSQLVisitor.java#L986-L1008


-- 
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] strongduanmu closed issue #25138: MySQL user/system variable was not parsed into VariableSegment

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu closed issue #25138: MySQL user/system variable was not parsed into VariableSegment
URL: https://github.com/apache/shardingsphere/issues/25138


-- 
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