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 04:45:31 UTC

[GitHub] [shardingsphere] huangguojun00 edited a comment on issue #7547: I want to konw why (a.bill_code = 1 or 1=1) can route to table but without parentheses can not

huangguojun00 edited a comment on issue #7547:
URL: https://github.com/apache/shardingsphere/issues/7547#issuecomment-696504202


   > @huangguojun00 Can you provide the sharding config? I will try to reproduce this problem.
   
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-core</artifactId>
               <version>4.0.0-RC1</version>
           </dependency>
   
   
   database sharding strategy:  
   ds${(int)(Math.abs(bill_code.hashCode()) % 2 / 1 +1)}
   table sharding strategy: 
   table_${Math.abs(bill_code.hashCode()) % 2 +1};
   actual-data-nodes:
   ds${1..2}.table_${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.

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