GPF199541 opened a new issue, #32469: URL: https://github.com/apache/shardingsphere/issues/32469
## Bug Report MySQL [oddsdb_sharding]> select left(t.add_time,16),count(distinct t.relation_billno) from ots_order_extend t where t.last_update_time > NOW() - INTERVAL 10 MINUTE and t.add_time> NOW() - INTERVAL 10 MINUTE group by left(t.add_time,16) ; +---------------------+-----------------------------------+ | left(t.add_time,16) | count(distinct t.relation_billno) | +---------------------+-----------------------------------+ | 2024-08-12 10:03 | 1093 | | 2024-08-12 10:04 | 1309 | | 2024-08-12 10:05 | 1228 | | 2024-08-12 10:06 | 1253 | | 2024-08-12 10:07 | 1225 | | 2024-08-12 10:08 | 1193 | | 2024-08-12 10:09 | 1255 | | 2024-08-12 10:10 | 1322 | | 2024-08-12 10:11 | 1247 | | 2024-08-12 10:12 | 1232 | | 2024-08-12 10:13 | 204 | +---------------------+-----------------------------------+ 11 rows in set (0.16 sec) MySQL [oddsdb_sharding]> select left(t.add_time,16),count(distinct t.relation_billno) from ots_order_extend t where t.last_update_time > NOW() - INTERVAL 10 MINUTE and t.add_time> NOW() - INTERVAL 10 MINUTE group by left(t.add_time,16) limit 10; +---------------------+-----------------------------------+ | left(t.add_time,16) | count(distinct t.relation_billno) | +---------------------+-----------------------------------+ | 2024-08-12 10:03 | 626 | | 2024-08-12 10:04 | 6 | ### Which version of ShardingSphere did you use? MySQL [oddsdb_sharding]> select @@version; +-----------------------------------+ | @@version | +-----------------------------------+ | 8.0.25-ShardingSphere-Proxy 5.4.1 | +-----------------------------------+ ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-Proxy ### Expected behavior add limit and no limit is same ### Actual behavior add limit has bug ### Reason analyze (If you can) ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. ### Example codes for reproduce this issue (such as a github link). MySQL [oddsdb_sharding]> select left(t.add_time,16),count(distinct t.relation_billno) from ots_order_extend t where t.last_update_time > NOW() - INTERVAL 10 MINUTE and t.add_time> NOW() - INTERVAL 10 MINUTE group by left(t.add_time,16) ; +---------------------+-----------------------------------+ | left(t.add_time,16) | count(distinct t.relation_billno) | +---------------------+-----------------------------------+ | 2024-08-12 10:03 | 1093 | | 2024-08-12 10:04 | 1309 | | 2024-08-12 10:05 | 1228 | | 2024-08-12 10:06 | 1253 | | 2024-08-12 10:07 | 1225 | | 2024-08-12 10:08 | 1193 | | 2024-08-12 10:09 | 1255 | | 2024-08-12 10:10 | 1322 | | 2024-08-12 10:11 | 1247 | | 2024-08-12 10:12 | 1232 | | 2024-08-12 10:13 | 204 | +---------------------+-----------------------------------+ 11 rows in set (0.16 sec) MySQL [oddsdb_sharding]> select left(t.add_time,16),count(distinct t.relation_billno) from ots_order_extend t where t.last_update_time > NOW() - INTERVAL 10 MINUTE and t.add_time> NOW() - INTERVAL 10 MINUTE group by left(t.add_time,16) limit 10; +---------------------+-----------------------------------+ | left(t.add_time,16) | count(distinct t.relation_billno) | +---------------------+-----------------------------------+ | 2024-08-12 10:03 | 626 | | 2024-08-12 10:04 | 6 | -- 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]
