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

   When I upgrade the compile 
"io.shardingsphere:sharding-jdbc-spring-boot-starter version from 3.0.0 to 
3.1.0, all my previous pagination is invalid, and the data found by the limit 
is wrong, but if I don't upgrade the version, the same SQL will prompt syntax 
and the like that are not compatible with sharding, please help give a reply
   
   使用版本:compile "io.shardingsphere:sharding-jdbc-spring-boot-starter:3.1.0"
   
   1. The following statement: limit invalidates
   select * from ad_space s where (:openDate = '' OR (:openDate BETWEEN 
s.start_time AND s.end_time) OR (s.start_time is null and :openDate <= 
s.end_time) ) and s.ad_id = :adId and s.deleted = 0 order by start_time 
desc,end_time desc **limit :page,:size**
   
   2. In the following statement, the given value of limit takes effect
   select * from ad_space s where (:openDate = '' OR (:openDate BETWEEN 
s.start_time AND s.end_time) OR (s.start_time is null and :openDate <= 
s.end_time) ) and s.ad_id = :adId and s.deleted = 0 order by start_time 
desc,end_time desc **limit 100,10**
   
   3.use this version ------》compile 
"io.shardingsphere:sharding-jdbc-spring-boot-starter:3.0.0" limit takes effect
   
   


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