Skip to content

Commit

Permalink
Merge #62209
Browse files Browse the repository at this point in the history
62209: opt: add a regression test for INSERT ON CONFLICT with ORDER BY r=RaduBerinde a=RaduBerinde

Informs #57434.

Release note: None

@mgartner apparently you fixed this bug with #58679 :)

Co-authored-by: Radu Berinde <[email protected]>
  • Loading branch information
craig[bot] and RaduBerinde committed Mar 23, 2021
2 parents 53bf501 + cf5e451 commit 8ef4f67
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/sql/logictest/testdata/logic_test/upsert
Original file line number Diff line number Diff line change
Expand Up @@ -1274,3 +1274,16 @@ SELECT * FROM uniq
----
x1 y1 z1
x2 y2 z2

# Regression test for #57434.
statement ok
CREATE TABLE target (x INT PRIMARY KEY, y INT, z INT, UNIQUE (y, z))

statement ok
CREATE TABLE source (a INT, b INT, c INT)

statement ok
INSERT INTO source VALUES (1, 1, 2), (1, 2, 1)

statement ok
INSERT INTO target SELECT * FROM source ORDER BY rowid ON CONFLICT DO NOTHING

0 comments on commit 8ef4f67

Please sign in to comment.