Add some more simple test cases for UPSERT. And a minor fix.
FossilOrigin-Name: 27cd3b2fb2ad0cf2b36741bd1057cb7973954d40456e9db158261a38b049d2b5
diff --git a/src/insert.c b/src/insert.c
index 4f9e43b..c5c92d6 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -1580,7 +1580,7 @@
}
#ifndef SQLITE_OMIT_UPSERT
case OE_Update: {
- sqlite3UpsertDoUpdate(pParse, pUpsert, pTab, 0, iDataCur, 0);
+ sqlite3UpsertDoUpdate(pParse, pUpsert, pTab, 0, iDataCur);
/* Fall through */
}
#endif
@@ -1787,7 +1787,7 @@
}
#ifndef SQLITE_OMIT_UPSERT
case OE_Update: {
- sqlite3UpsertDoUpdate(pParse, pUpsert, pTab, pIdx, iDataCur, iIdxCur);
+ sqlite3UpsertDoUpdate(pParse, pUpsert, pTab, pIdx, iIdxCur+ix);
/* Fall through */
}
#endif