1
Fork 0
kantodb/testdata/sql/update_non_key_where_primary_key_nonexistent.slt

20 lines
490 B
Text

statement ok
CREATE TABLE kanto.myschema.mytable (a BIGINT NOT NULL, b BIGINT, PRIMARY KEY(a));
# This triggers more bugs.
statement ok
CREATE UNIQUE INDEX mytable__idx__b ON myschema.mytable (b) NULLS NOT DISTINCT;
statement ok
INSERT INTO kanto.myschema.mytable (a, b) VALUES (42, 7), (13, 34);
statement ok
UPDATE kanto.myschema.mytable SET b=100 WHERE a=999;
# TODO verify rows changed count is correct (0)
query II
SELECT * FROM kanto.myschema.mytable ORDER BY a;
----
13 34
42 7