aboutsummaryrefslogtreecommitdiff
path: root/src/delete.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/delete.c')
-rw-r--r--src/delete.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/delete.c b/src/delete.c
index c015eb43e..932520382 100644
--- a/src/delete.c
+++ b/src/delete.c
@@ -57,8 +57,9 @@ int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){
** 2) It is a system table (i.e. sqlite_master), this call is not
** part of a nested parse and writable_schema pragma has not
** been specified.
- ** 3) The table is a shadow table and the SQLITE_PREPARE_SHADOW flag
- ** is omitted.
+ ** 3) The table is a shadow table and the current sqlite3_prepare()
+ ** is for a top-level SQL statement, not a nested SQL statement
+ ** issued by a virtual table implementation.
**
** In either case leave an error message in pParse and return non-zero.
*/
@@ -68,7 +69,7 @@ int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){
&& sqlite3WritableSchema(pParse->db)==0
&& pParse->nested==0)
|| ( (pTab->tabFlags & TF_Shadow)!=0
- && pParse->writeShadow==0)
+ && pParse->db->nVdbeExec==0)
){
sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
return 1;