1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Fix a problem in the new upsert implemention, discovered by OSSFuzz.

FossilOrigin-Name: b6d5ea59fe83716f464e408b7eef0310c6d30b3493e3f966362db2e30b36e821
This commit is contained in:
drh
2018-04-19 13:52:39 +00:00
parent 5e3a6ebf34
commit bb6b1ca73d
4 changed files with 27 additions and 17 deletions

View File

@ -630,5 +630,15 @@ do_execsql_test update-15.1 {
SELECT a,b,c,'|' FROM t15 ORDER BY a;
} {5 zyx y5 | 10 abc y10 | 15 wvu y15 | 20 def y20 | 25 tsr y25 | 30 ghi y30 | 35 qpo y35 |}
# Unreleased bug in UPDATE caused by the UPSERT changes.
# Found by OSSFuzz as soon as the UPSERT changes landed on trunk.
# Never released into the wild. 2018-04-19.
#
do_execsql_test update-16.1 {
CREATE TABLE t16(a INTEGER PRIMARY KEY ON CONFLICT REPLACE, b UNIQUE);
INSERT INTO t16(a,b) VALUES(1,2),(3,4),(5,6);
UPDATE t16 SET a=a;
SELECT * FROM t16 ORDER BY +a;
} {1 2 3 4 5 6}
finish_test