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

Add test cases for UPSERT. And a fix for a "REPLACE INTO ... ON CONFLICT"

statement where the new row conflicts with both the IPK and the ON CONFLICT
indexes.

FossilOrigin-Name: d8eb9f8d9b61400c7e12f01ef5c233257b03532221f7c7a8386f7ac2db439626
This commit is contained in:
dan
2018-04-20 15:34:08 +00:00
parent 7fc3aba862
commit a46838cb13
4 changed files with 69 additions and 14 deletions

View File

@@ -1496,7 +1496,7 @@ void sqlite3GenerateConstraintChecks(
assert( OE_Abort<OE_Replace );
assert( OE_Rollback<OE_Replace );
if( onError>=OE_Replace
&& onError!=overrideError
&& (pUpsert || onError!=overrideError)
&& pTab->pIndex
){
sAddr.ipkTop = sqlite3VdbeAddOp0(v, OP_Goto)+1;