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 2020/09/22 05:36:45 UTC

[GitHub] [shardingsphere] strongduanmu commented on issue #7547: why (a.bill_code = 1 or 1=1) can route to table but without parentheses not

strongduanmu commented on issue #7547:
URL: https://github.com/apache/shardingsphere/issues/7547#issuecomment-696517409


   @huangguojun00 @kimmking I have tested similar SQL on the master branch and found that sql with parentheses have also been routed to all tables. 
   
   I think the single route result with parentheses may be a bug of version `4.0.0-RC1`, because the `(a.bill_code = #{billCode} or 1=1)` condition is always true, which means that the sharding column routing may be invalid, so sql should be routed to all tables to execute.
   


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

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