Consider the following testcase:
CREATE TABLE t0(c0 INT PRIMARY KEY, c1 BOOL, c2 INT UNIQUE);
INSERT INTO t0(c0) VALUES (0);
UPSERT INTO t0(c2, c0) VALUES (0, 0), (1, 0);
SELECT * FROM t0; -- {0 | NULL | 1}
A single row is fetched, while the following query fetches two records with a duplicate value for c0:
SELECT c0 FROM t0; -- {0, 0}
I found this issue in CockroachDB based on commit 1917a12003daad100b491e2b0195d7df5909e63f.
Consider the following testcase:
A single row is fetched, while the following query fetches two records with a duplicate value for c0:
I found this issue in CockroachDB based on commit
1917a12003daad100b491e2b0195d7df5909e63f.