1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

If an UPSERT can cause an Abort due to a constraint failure, make sure

the query planner knows this.  Ticket [7c13db5c3bf74001].

FossilOrigin-Name: f14ce948662f3445a06d84d4f32d9b81143e0cffaf773d8aa4d3a609bfb9682b
This commit is contained in:
drh
2019-12-26 23:40:33 +00:00
parent d3ee3ad12f
commit fe2a3f1d24
4 changed files with 17 additions and 8 deletions

View File

@@ -236,6 +236,7 @@ void sqlite3UpsertDoUpdate(
VdbeCoverage(v);
sqlite3VdbeAddOp4(v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0,
"corrupt database", P4_STATIC);
sqlite3MayAbort(pParse);
sqlite3VdbeJumpHere(v, i);
}
}