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

   ## Bug Report
   when I execute sql:
   `select * from user_0003 limit 2,2`
   Actually the sql statement executed is
   `select * 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.
   
   
![image](https://github.com/user-attachments/assets/41f5b973-0405-419b-875a-516f241ab9f1)
   
   ### 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).
   


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