Terrdi opened a new issue #8551:
URL: https://github.com/apache/shardingsphere/issues/8551


   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   <dependency>
     <groupId>org.apache.shardingsphere</groupId>
     <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
     <version>5.0.0-RC1-SNAPSHOT</version>
   </dependency>
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
   
   ### Actual behavior
   * it reports "no database route info" while the value of the field which is 
used to distinguish the database is negative.
   * it send the sql text like this while the value of the field which is used 
to distinguish the table is negative.
   ```sql
   INSERT INTO 
org.apache.shardingsphere.sharding.rewrite.token.pojo.TableToken@a0d875d  ( 
id,order_no,user_id )  VALUES  
org.apache.shardingsphere.sharding.rewrite.token.pojo.ShardingInsertValuesToken@693f2c89
   ```
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   INSERT INTO t_geektime_order ( id, order_no, user_id ) VALUES ( 1, -1, -1 );
   INSERT INTO t_geektime_order ( id, order_no, user_id ) VALUES ( 1, -1, 1 );
   
   ##### data fragment configuration
           database-strategy:
                 standard:
                   sharding-column: user_id
                   sharding-algorithm-name: database-inline
               table-strategy:
                 standard:
                   sharding-column: order_no
                   sharding-algorithm-name: t-geektime-order-inline
           sharding-algorithms:
             database-inline:
               type: INLINE
               props:
                 algorithm-expression: ds$->{user_id % 2}
             t-geektime-order-inline:
               type: INLINE
               props:
                 algorithm-expression: t_geektime_order_$->{order_no % 16}
   
   
   ### Example codes for reproduce this issue (such as a github link).
   ```java
   Order order = new Order();
   order.setId(1);
   order.setUserId(-1234231);
   order.setOrderNo(112312312L);
   orderService.save(order);
   
   Order order = new Order();
   order.setId(1);
   order.setUserId(1234231);
   order.setOrderNo(-112312312L);
   orderService.save(order);
   ```


----------------------------------------------------------------
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:
[email protected]


Reply via email to