xueshiji opened a new issue #9569:
URL: https://github.com/apache/shardingsphere/issues/9569
**Which version of ShardingSphere did you use?**
5.0.0-alpha
**Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?**
ShardingSphere-JDBC
**Expected behavior**
Correct paging
**Actual behavior**
Wrong pagination, except for the first page
**Reason analyze**
When I use a paged query,It seems that the rewrite engine did not rewrite
the paging parameters.
**Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.**
Environment: shardingsphere-jdbc-core 5.0.0-alpha sharding configuration
with JavaAPI,SpringBoot v2.1.5.RELEASE,Oracle 11g,JPA
Only one table slice is configured,the rule is: inline,TABLENAME_${KEY}.
One physical table has two records, and two other physical tables have one
record, and the rest have no records.
When the third page is queried with pagesize 1, it will not be found.
My code is:
`entityManager.createQuery(cq).setFirstResult(2).setMaxResults(1).getResultList();`
Logic SQL: .`..) row_ where rownum <= ?) where rownum_ > ? ::: [3, 2]`
Actual SQL: `...) row_ where rownum <= ?) where rownum_ > ? ::: [3, 2]`
----------------------------------------------------------------
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]