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

   ## Bug Report
   
   
   ### Which version of ShardingSphere did you use?
   5.4.0
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   This statement can be executed normally:
   ```
   db.Exec("INSERT INTO `account_asset` 
(`mch_id`,`user_id`,`credit`,`freeze_credit`,`created_at`,`updated_at`) VALUES 
(101,1001000,1001,1,'2023-08-18 07:59:58.449','2023-08-18 07:59:58.449')")
   ```
   But this statement execution error:
   ```
   db.Exec("INSERT INTO `account_asset` 
(`mch_id`,`user_id`,`credit`,`freeze_credit`,`created_at`,`updated_at`) VALUES 
(?, ?, ?, ?, ?, ?)", 100, 100100, 1, 2, time.Now(), time.Now())
   ```
   The error info is :
   ```
   Error 20081 (HY000): Routed target `nova_-1` does not exist, available 
targets are `[nova_0, nova_1]`.
   ```
   
   The sharding rule is:
   ```
   shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: 'nova_${[100].contains(mch_id) ? 0 : 
[101].contains(mch_id) ? 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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to