mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix multiple problems with RETURNING on a DML statement against a view,
all inspired by [forum:/forumpost/dc3b92cfa0|forum post dc3b92cfa0]. (1) Do not allow a RETURNING clause to trick the code generator into thinking that the view being updated has an INSTEAD OF trigger. (2) Generate all result columns for a view in a DML statement. (3) The automatic covering index for a view should cover all result columns of the view. FossilOrigin-Name: c8bedef0d61731c29ae34de1594222d15b578f9e2cddbbd5b74fb3059644fe0f
This commit is contained in:
@@ -1453,6 +1453,9 @@ u32 sqlite3TriggerColmask(
|
||||
Trigger *p;
|
||||
|
||||
assert( isNew==1 || isNew==0 );
|
||||
if( IsView(pTab) ){
|
||||
return 0xffffffff;
|
||||
}
|
||||
for(p=pTrigger; p; p=p->pNext){
|
||||
if( p->op==op
|
||||
&& (tr_tm&p->tr_tm)
|
||||
|
Reference in New Issue
Block a user