Repository navigation
support unique key for on duplicate key statement - #11632
Merged
mergify[bot] merged 4 commits intoSep 5, 2023
Merged
Conversation
ouyuanning
requested review from
aressu1985,
aunjgr,
badboynt1 and
m-schen
as code owners
September 5, 2023 01:34
aunjgr
approved these changes
Sep 5, 2023
m-schen
approved these changes
Sep 5, 2023
ghost
approved these changes
Sep 5, 2023
sukki37
pushed a commit
that referenced
this pull request
Sep 17, 2023
if table have primary key & unique key. we can use on duplicate key statement now. because if table have primary key & unique key. on duplicate key statement may get multi dup key (eg: one row for primary key, another row for unique key). but we only will pick rand one row to do the update action. so we append an agg node before on_duplicate_key node. see:https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html Approved by: @aunjgr, @m-schen, @heni02
sukki37
pushed a commit
that referenced
this pull request
Sep 18, 2023
if table have primary key & unique key. we can use on duplicate key statement now. because if table have primary key & unique key. on duplicate key statement may get multi dup key (eg: one row for primary key, another row for unique key). but we only will pick rand one row to do the update action. so we append an agg node before on_duplicate_key node. see:https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html Approved by: @aunjgr, @m-schen, @heni02
fengttt
pushed a commit
to fengttt/matrixone
that referenced
this pull request
May 7, 2026
if table have primary key & unique key. we can use on duplicate key statement now. because if table have primary key & unique key. on duplicate key statement may get multi dup key (eg: one row for primary key, another row for unique key). but we only will pick rand one row to do the update action. so we append an agg node before on_duplicate_key node. see:https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html Approved by: @aunjgr, @m-schen, @heni02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
issue #11261
What this PR does / why we need it:
if table have primary key & unique key. we can use on duplicate key statement now.
because if table have primary key & unique key.
on duplicate key statement may get multi dup key (eg: one row for primary key, another row for unique key).
but we only will pick rand one row to do the update action. so we append an agg node before on_duplicate_key node.
see:https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html