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

Do not allow UPSERT of a view.

FossilOrigin-Name: ebf897e861c19e214c57f1e73841b505182202cc8d7d39e24d5a1e5625e26b4a
This commit is contained in:
drh
2019-12-06 01:23:38 +00:00
parent b6c947251b
commit c6b24ab1b1
4 changed files with 24 additions and 8 deletions

View File

@@ -949,6 +949,10 @@ void sqlite3Insert(
pTab->zName);
goto insert_cleanup;
}
if( pTab->pSelect ){
sqlite3ErrorMsg(pParse, "cannot UPSERT a view");
goto insert_cleanup;
}
if( sqlite3HasExplicitNulls(pParse, pUpsert->pUpsertTarget) ){
goto insert_cleanup;
}