diff options
author | drh <> | 2024-08-27 13:57:43 +0000 |
---|---|---|
committer | drh <> | 2024-08-27 13:57:43 +0000 |
commit | fcd65efcf10957ef84cccf0f2bd9381b69dd6dde (patch) | |
tree | a7e2f567f27186780dd500f8bfe0cf295fd9ffef /src/update.c | |
parent | 3a39c44c21a801927f98aa3cdb2240f00e701b8a (diff) | |
parent | c013fa50db60dad905aff1c2202edfa7223bdd67 (diff) | |
download | sqlite-fcd65efcf10957ef84cccf0f2bd9381b69dd6dde.tar.gz sqlite-fcd65efcf10957ef84cccf0f2bd9381b69dd6dde.zip |
Merge all the latests trunk enhancements into the win-dupe-crt-fio branch.
FossilOrigin-Name: 2d52db98f47fbcda0622c034b21c2fb19bf4345b88c5c565ae9e6f7128642e43
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/update.c b/src/update.c index cd7d73f3f..a8e7f7780 100644 --- a/src/update.c +++ b/src/update.c @@ -202,7 +202,7 @@ static void updateFromSelect( Expr *pLimit2 = 0; ExprList *pOrderBy2 = 0; sqlite3 *db = pParse->db; - Table *pTab = pTabList->a[0].pTab; + Table *pTab = pTabList->a[0].pSTab; SrcList *pSrc; Expr *pWhere2; int eDest; @@ -226,8 +226,8 @@ static void updateFromSelect( if( pSrc ){ assert( pSrc->a[0].fg.notCte ); pSrc->a[0].iCursor = -1; - pSrc->a[0].pTab->nTabRef--; - pSrc->a[0].pTab = 0; + pSrc->a[0].pSTab->nTabRef--; + pSrc->a[0].pSTab = 0; } if( pPk ){ for(i=0; i<pPk->nKeyCol; i++){ @@ -921,6 +921,9 @@ void sqlite3Update( } } if( chngRowid==0 && pPk==0 ){ +#ifdef SQLITE_ALLOW_ROWID_IN_VIEW + if( isView ) sqlite3VdbeAddOp2(v, OP_Null, 0, regOldRowid); +#endif sqlite3VdbeAddOp2(v, OP_Copy, regOldRowid, regNewRowid); } } |