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

insert ignore on duplicate got wrong result when index value unchanged #23892

Closed
lysu opened this issue Apr 7, 2021 · 2 comments · Fixed by #23894
Closed

insert ignore on duplicate got wrong result when index value unchanged #23892

lysu opened this issue Apr 7, 2021 · 2 comments · Fixed by #23894
Assignees
Labels
severity/critical sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@lysu
Copy link
Contributor

lysu commented Apr 7, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t6 (a int, b int, c int, primary key(a, b) clustered, unique key idx_14(b), unique key idx_15(b), unique key idx_16(a, b));
insert into t6 select 10, 10, 20;
insert ignore into t6 set a = 20, b = 10 on duplicate key update a = 100;

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

on duplicate on b=10 and update a to 100

3. What did you see instead (Required)

update nothing

4. What is your TiDB version? (Required)

master

@lysu lysu added type/bug The issue is confirmed as a bug. severity/critical labels Apr 7, 2021
@lysu
Copy link
Contributor Author

lysu commented Apr 7, 2021

introduced by #23814

only in master, not affect on 5.0..

@lysu lysu self-assigned this Apr 7, 2021
@lysu lysu changed the title insert ignore on duplicate got wrong result when not change index value insert ignore on duplicate got wrong result when index value unchanged Apr 7, 2021
@jebter jebter added the sig/execution SIG execution label Apr 9, 2021
@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/critical sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants