Give a meaningful error on an attempt to use UPSERT on a virtual table,

rather than simply not working.

FossilOrigin-Name: fa98748f956cff95fcfda3a513cea4df27aa573ae795a6855c40bfeca661d0b2
This commit is contained in:
drh
2019-01-04 23:39:37 +00:00
parent f25cc4f3c5
commit b042d92128
4 changed files with 16 additions and 8 deletions
+5
View File
@@ -826,6 +826,11 @@ void sqlite3Insert(
}
#ifndef SQLITE_OMIT_UPSERT
if( pUpsert ){
if( IsVirtual(pTab) ){
sqlite3ErrorMsg(pParse, "UPSERT not implemented for virtual table \"%s\"",
pTab->zName);
goto insert_cleanup;
}
pTabList->a[0].iCursor = iDataCur;
pUpsert->pUpsertSrc = pTabList;
pUpsert->regData = regData;