justbk2015 opened a new issue #11025:
URL: https://github.com/apache/shardingsphere/issues/11025
## Bug Report
### Which version of ShardingSphere did you use?
master / opengauss_adapt
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
Proxy
### Expected behavior
run `select * from tb_notdb_distable1 LIMIT 5,2;` can get actual result.
### Actual behavior
not query data return
### Reason analyze (If you can)
sql rewirte of limit not support from 5,2 to 7,0, the row_count at least is
1 on postgresql.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
1. config:
tables:
tb_notdb_distable1:
actualDataNodes: ds_1.tb_notdb_distable1_${0..2}
tableStrategy:
standard:
shardingColumn: id
shardingAlgorithmName: tb_tb_notdb_distable_inline1
defaultDatabaseStrategy:
none: null
defaultTableStrategy:
none: null
shardingAlgorithms:
tb_tb_notdb_distable_inline1:
type: INLINE
props:
algorithm-expression: tb_notdb_distable1_${id % 3}
allow-range-query-with-inline-sharding: true
--------
2. init table
create table tb_notdb_distable1(id int unique,name text,type int);
insert into tb_notdb_distable1
values(1,'test1',1),(2,'test2',1),(3,'test3',2),(4,'test4',2),(5,'test5',3),(6,'test6',3),(7,'test7',3),(8,'test8',3);
analyze tb_notdb_distable1 ;
--------
3. query/result
select * from tb_notdb_distable1 LIMIT 5;
select * from tb_notdb_distable1 LIMIT 5,2;--error result is empty, we
except test4 and test1 record

4. rewrite sql

### Example codes for reproduce this issue (such as a github link).
see this descript: https://gitee.com/opengaussorg/dashboard?issue_id=I3XRVI
--
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]