diff options
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/update.c b/src/update.c index 1335c269e..a9735cadc 100644 --- a/src/update.c +++ b/src/update.c @@ -263,10 +263,12 @@ void sqlite3Update( assert( chngPk==0 || chngPk==1 ); chngKey = chngRowid + chngPk; - /* The SET expressions are not actually used inside the WHERE loop. - ** So reset the colUsed mask + /* The SET expressions are not actually used inside the WHERE loop. + ** So reset the colUsed mask. Unless this is a virtual table. In that + ** case, set all bits of the colUsed mask (to ensure that the virtual + ** table implementation makes all columns available). */ - pTabList->a[0].colUsed = 0; + pTabList->a[0].colUsed = IsVirtual(pTab) ? (Bitmask)-1 : 0; hasFK = sqlite3FkRequired(pParse, pTab, aXRef, chngKey); |