Administrator-Xorex opened a new issue, #25100:
URL: https://github.com/apache/shardingsphere/issues/25100

   ## Bug Report
   ShardingSphere-Proxy 5.3.2
   
   MySQL table design:
   ```sql
   CREATE TABLE `user` (
     `id` int NOT NULL AUTO_INCREMENT,
     `username` varchar(255) NOT NULL,
     `password` varchar(255) NOT NULL,
     `status` int DEFAULT NULL,
     PRIMARY KEY (`id`)
   ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 
COLLATE=utf8mb4_0900_ai_ci;
   ```
   
   Use DistSQL to set the VALUE_MATCH shadow algorithm to table user, and test 
the insert preview route.
   Insert statements should be routed to the two databases separately, but are 
not.
   
![image](https://user-images.githubusercontent.com/26794746/231085167-a26f1494-d871-4a0a-b15b-584865f0900b.png)
   
   There is the exprot database configuration result:
   ```yaml
   dataSources:
     product_shadow:
       password: xxxxx
       url: jdbc:mysql://xxxxx:3315/shadow
       username: root
       minPoolSize: 1
       connectionTimeoutMilliseconds: 30000
       maxLifetimeMilliseconds: 2100000
       readOnly: false
       idleTimeoutMilliseconds: 60000
       maxPoolSize: 50
     product:
       password: xxxxx
       url: jdbc:mysql://xxxxx:3315/product
       username: root
       minPoolSize: 1
       connectionTimeoutMilliseconds: 30000
       maxLifetimeMilliseconds: 2100000
       readOnly: false
       idleTimeoutMilliseconds: 60000
       maxPoolSize: 50
   rules:
   - !SHADOW
     dataSources:
       shadow_rule_value:
         productionDataSourceName: product
         shadowDataSourceName: product_shadow
     shadowAlgorithms:
       shadow_rule_value_user_value_match_0:
         props:
           operation: insert
           column: status
           value: '1'
         type: VALUE_MATCH
     tables:
       user:
         dataSourceNames:
         - shadow_rule_value
         shadowAlgorithmNames:
         - shadow_rule_value_user_value_match_0
   ```
   
   
   
   
   
   


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