-
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
executor: fix a bug of 'insert on duplicate update' statement on partitioned table #11204
executor: fix a bug of 'insert on duplicate update' statement on partitioned table #11204
Conversation
…itioned table In this statement: insert into t1 set a=1,b=1 on duplicate key update a=1,b=1 Batch checker find a=1,b=1 is duplicated, then in the "on duplicate update" step, it use non-partitioned table to get the old row, which is a bug. getOldRow returns this error: (1105, u'can not be duplicated row, due to old row not found. handle 1 not found')
PTAL @crazycs520 @jackysp |
Codecov Report
@@ Coverage Diff @@
## master #11204 +/- ##
===========================================
Coverage ? 81.2743%
===========================================
Files ? 423
Lines ? 90005
Branches ? 0
===========================================
Hits ? 73151
Misses ? 11557
Partials ? 5297 |
Codecov Report
@@ Coverage Diff @@
## master #11204 +/- ##
================================================
+ Coverage 81.2468% 81.2632% +0.0164%
================================================
Files 423 423
Lines 90198 90005 -193
================================================
- Hits 73283 73141 -142
+ Misses 11612 11563 -49
+ Partials 5303 5301 -2 |
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
…itioned table (pingcap#11204) In this statement: insert into t1 set a=1,b=1 on duplicate key update a=1,b=1 Batch checker find a=1,b=1 is duplicated, then in the "on duplicate update" step, it uses the non-partitioned table to get the old row, which is a bug. getOldRow returns this error: (1105, u'can not be duplicated row, due to old row not found. handle 1 not found')
What problem does this PR solve?
In this statement:
Batch checker find
a=1,b=1
is duplicated, then in the "on duplicate update" step,it uses the non-partitioned table to get the old row, which is a bug.
getOldRow returns this error: (1105, u'can not be duplicated row, due to old row not found. handle 1 not found')
What is changed and how it works?
Use the partitioned table to
getOldRow
Check List
Tests
Related changes