-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
multi clustered index + partition table, insert ignore... on duplicate key update return wrong result #25846
Labels
affects-5.0
This bug affects 5.0.x versions.
severity/major
sig/transaction
SIG:Transaction
type/bug
The issue is confirmed as a bug.
Comments
vivid392845427
changed the title
clustered index
multi clustered index, insert ignore... on duplicate key update return wrong result
Jun 30, 2021
vivid392845427
changed the title
multi clustered index, insert ignore... on duplicate key update return wrong result
multi clustered index + partition table, insert ignore... on duplicate key update return wrong result
Jun 30, 2021
jingshanglu
added
severity/critical
sig/execution
SIG execution
severity/major
and removed
severity/critical
labels
Jun 30, 2021
Closed
should be
but got
|
lzmhhh123
added
sig/transaction
SIG:Transaction
and removed
sig/execution
SIG execution
labels
Jul 2, 2021
@lysu |
Please check whether the issue should be labeled with 'affects-x.y' or 'backport-x.y.z', |
jebter
added
affects-5.0
This bug affects 5.0.x versions.
and removed
needs-more-info
labels
Aug 31, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-5.0
This bug affects 5.0.x versions.
severity/major
sig/transaction
SIG:Transaction
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATE TABLE
tbl_51
(col_334
mediumint(9) NOT NULL DEFAULT '-3217641',col_335
mediumint(8) unsigned NOT NULL DEFAULT '2002468',col_336
enum('alice','bob','charlie','david') COLLATE utf8_general_ci NOT NULL DEFAULT 'alice',PRIMARY KEY (
col_334
,col_336
,col_335
) /*T![clustered_index] CLUSTERED */,UNIQUE KEY
idx_116
(col_334
,col_335
),UNIQUE KEY
idx_117
(col_336
,col_334
),KEY
idx_118
(col_336
)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci
PARTITION BY HASH(
col_334
)PARTITIONS 6;
insert into tbl_51 values(-3112969,3273861,'charlie'),(-3040776,4159759,'charlie');
insert ignore into tbl_51 (col_336) values ( 'alice' ) , ( 'david' ) , ( 'charlie' ) , ( 'charlie' ) , ( 'alice' ) on duplicate key update col_335 = 7685969;
2. What did you expect to see? (Required)
mysql> select * from tbl_51;
+----------+---------+---------+
| col_334 | col_335 | col_336 |
+----------+---------+---------+
| -3112969 | 3273861 | charlie |
| -3217641 | 7685969 | alice |
| -3217641 | 2002468 | charlie |
| -3040776 | 4159759 | charlie |
+----------+---------+---------+
3. What did you see instead (Required)
only occur on 5.0 and partition table, master is the same as expect
mysql> select * from tbl_51;
+----------+---------+---------+
| col_334 | col_335 | col_336 |
+----------+---------+---------+
| -3040776 | 4159759 | charlie |
| -3112969 | 3273861 | charlie |
| -3217641 | 7685969 | alice |
+----------+---------+---------+
4. What is your TiDB version? (Required)
Release Version: v5.0.2-42-g18d69e5
Edition: Community
Git Commit Hash: 18d69e5
Git Branch: HEAD
UTC Build Time: 2021-06-28 18:22:53
GoVersion: go1.13.7
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
The text was updated successfully, but these errors were encountered: