TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATE TABLE t0(c0 INTEGER UNSIGNED NOT NULL AUTO_INCREMENT ) PARTITION BY HASH(c0) PARTITIONS 2;
CREATE TABLE t1(c0 INTEGER UNSIGNED NOT NULL AUTO_INCREMENT );
INSERT INTO t0 VALUES (1), (2);
INSERT INTO t1 VALUES (1), (2);
UPDATE t0 SET c0=1;
UPDATE t1 SET c0=1;
insert into t0 values(0);
insert into t1 values(0);
SELECT t0.c0 FROM t0 order by c0;
SELECT t1.c0 FROM t1 order by c0;
2. What did you expect to see? (Required)
two queries produce same result
3. What did you see instead (Required)
MySQL [d0]> SELECT t0.c0 FROM t0 order by c0;
+----+
| c0 |
+----+
| 1 |
| 1 |
| 6 |
+----+
3 rows in set (0.01 sec)
MySQL [d0]> SELECT t1.c0 FROM t1 order by c0;
+----+
| c0 |
+----+
| 1 |
| 1 |
| 5 |
+----+
3 rows in set (0.00 sec)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
two queries produce same result
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
release version 8.0.0