You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/11/23 13:20:55 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue #13759: SQL parse error when execute sql with mysql keyword

strongduanmu opened a new issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master branch
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Expected behavior
   
   select statement parse successfully
   
   ```sql
   SELECT t1.id, track_id, title, intro, rank, h5_query_link, status, created_at, updated_at, operator, is_delete from tb_discovery_weibo_news_track t1 WHERE  is_delete = 0 and status in ( 0 , 10 , 11 )
   ```
   
   ### Actual behavior
   
   ![image](https://user-images.githubusercontent.com/10829171/143030879-984ca62a-2433-44ce-bb29-1630d22002ca.png)
   
   ### Reason analyze (If you can)
   
   ![image](https://user-images.githubusercontent.com/10829171/143031027-25768324-dd80-40ab-b074-b58921a0ad90.png)
   
   `rank` is a new keyword added in mysql 8.x version, which caused this sql parsing error. @tuichenchuxin Should we consider a comprehensive investigation of the parsing anomalies caused by keywords?
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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] TeslaCN commented on issue #13759: SQL parse error when execute sql with mysql keyword

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759#issuecomment-1081341539


   Hi @strongduanmu @tuichenchuxin 
   Any update here? Could we finish this in 5.1.1?


-- 
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] tuichenchuxin closed issue #13759: SQL parse error when execute sql with mysql keyword

Posted by GitBox <gi...@apache.org>.
tuichenchuxin closed issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759


   


-- 
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] tuichenchuxin commented on issue #13759: SQL parse error when execute sql with mysql keyword

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759#issuecomment-1086563878


   rank can't be used in mysql 8 directly, but can used in mysql 5. And we can use it by `rank` this way. So I think we do not need to support this.  I'll close this issue.


-- 
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] tuichenchuxin commented on issue #13759: SQL parse error when execute sql with mysql keyword

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759#issuecomment-977358654


   Ok, I'll investigate these keywords.


-- 
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] tuichenchuxin commented on issue #13759: SQL parse error when execute sql with mysql keyword

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759#issuecomment-979052992


   ```
   select rank from t;
   ```
   If i execute this sql directly connected to mysql server. It can't be executed.
   mysql version is `8.0.25`.
   So, I think we don't need to support this.


-- 
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] tuichenchuxin commented on issue #13759: SQL parse error when execute sql with mysql keyword

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759#issuecomment-1000027875


   Rank is not supported in mysql 8.0 but can be supported in mysql 5.7.
   this is related to #13759
   I think we should avoid using this keywork as a column name. 
   


-- 
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] shenyiheyi commented on issue #13759: SQL parse error when execute sql with mysql keyword

Posted by GitBox <gi...@apache.org>.
shenyiheyi commented on issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759#issuecomment-979879024


   `select rank from t;`
   If i execute this sql directly connected to mysql server. It can be executed.
   mysql version is 5.7.28.
   So, I think  you need to support this.


-- 
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] strongduanmu commented on issue #13759: SQL parse error when execute sql with mysql keyword

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #13759:
URL: https://github.com/apache/shardingsphere/issues/13759#issuecomment-1081341913


   > Hi @strongduanmu @tuichenchuxin Any update here? Could we finish this in 5.1.1?
   
   @TeslaCN I will move this issue to 5.1.2.


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