Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent result when using hash partition and auto_increment constraint #53338

Open
Nickelth opened this issue May 16, 2024 · 0 comments
Open
Assignees
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.

Comments

@Nickelth
Copy link

Nickelth commented May 16, 2024

Bug Report

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)

4. What is your TiDB version? (Required)

release version 8.0.0

@Nickelth Nickelth added the type/bug This issue is a bug. label May 16, 2024
@jebter jebter added the sig/sql-infra SIG: SQL Infra label May 17, 2024
@xhebox xhebox self-assigned this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants