Open Mrjyw opened 4 days ago
DefaultDataSource has been removed in the new version. Could you try to the lasted version?
您的邮件我已收到,谢谢。——收信人:吴宇杰
To remove 'DefaultDataSource ', I would need to change a lot of code because a lot of tables are using 'DefaultDataSource '. Is there another solution? o(╥﹏╥)o
Bug Report
when I execute sql:
select * from user_0003 limit 2,2
Actually the sql statement executed isselect * from user_0003 limit 0,4
Which version of ShardingSphere did you use?
5.1.1
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
execute sql:
select * from user_0003 limit 2,2
Actual behavior
execute
select * from user_0003 limit 0,4
Reason analyze (If you can)
I use database spliting and table spliting both. But the sql only use one table and one dataSource which is default-data-source-name.
I debug the source code and find the reason. When sharding check if the routeContext is single routing, sharding checks the metaData not the sql using. So sharding find 5 dataSources, then the routeContext is not single routing.
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
use database spliting and table spliting both. But the sql only use one table and one dataSource which is default-data-source-name.
Example codes for reproduce this issue (such as a github link).