Skip to content

Return out of order results for query cluster_slow_query with order by #51723

@Defined2014

Description

@Defined2014

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

tiup playground nightly --db 2 --tiflash 0
mysql --comments --host 127.0.0.1 --port 4000 -uroot --local-infile=1 -e "use test;create table t(a int); insert into t values (1);"
mysql --comments --host 127.0.0.1 --port 4000 -uroot --local-infile=1 -e "use test;select sleep(1.1) from t;"
mysql --comments --host 127.0.0.1 --port 4001 -uroot --local-infile=1 -e "use test;select sleep(1.1) from t;"
mysql --comments --host 127.0.0.1 --port 4001 -uroot --local-infile=1 -e "use test;select sleep(1.1) from t;"
mysql --comments --host 127.0.0.1 --port 4000 -uroot --local-infile=1 -e "use test;select sleep(1.1) from t;"
mysql --comments --host 127.0.0.1 --port 4001 -uroot --local-infile=1 -e "select time from information_schema.cluster_slow_query order by time;"

2. What did you expect to see? (Required)

return values are ordered.

3. What did you see instead (Required)

sometimes the results are out of order.

4. What is your TiDB version? (Required)

mysql> select tidb_version();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                     |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.0.0-alpha-435-gb55c855142
Edition: Community
Git Commit Hash: b55c8551421852bae33af671fa1bfc3f605bb494
Git Branch: HEAD
UTC Build Time: 2024-03-08 07:11:55
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Metadata

Metadata

Assignees

Labels

affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/moderatesig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions