strongduanmu opened a new issue #10689:
URL: https://github.com/apache/shardingsphere/issues/10689


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master branch
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy & governance
   
   ### Expected behavior
   
   Create table correctly according to sharding table rule
   
   ### Actual behavior
   
   The routing result is wrong.
   
   ```
   [INFO ] 2021-06-07 10:20:56.386 [ShardingSphere-Command-9] 
ShardingSphere-SQL - Logic SQL: CREATE TABLE t_order_dist(another_id INT, 
order_id INT, content VARCHAR(100))
   [INFO ] 2021-06-07 10:20:56.386 [ShardingSphere-Command-9] 
ShardingSphere-SQL - SQLStatement: 
MySQLCreateTableStatement(containsNotExistClause=false)
   [INFO ] 2021-06-07 10:20:56.386 [ShardingSphere-Command-9] 
ShardingSphere-SQL - Actual SQL: ds_1 ::: CREATE TABLE t_order_dist(another_id 
INT, order_id INT, content VARCHAR(100))
   ```
   
   ### Reason analyze (If you can)
   
   After the sharding table rule was created, the `tableRules` field in the 
`shardingRule` class was not updated, resulting in routing to 
`SingleTablesRoutingEngine`.
   
   
![image](https://user-images.githubusercontent.com/10829171/120954318-7bffc380-c781-11eb-834e-9425cd992135.png)
   
   


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