mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Merge latest changes from wal2 into this branch.
FossilOrigin-Name: 4efefb5938c1ec83ee367ae5cc4bba906729b4e8699fa81adc6ca3618c73eb03
This commit is contained in:
11
src/update.c
11
src/update.c
@@ -220,6 +220,7 @@ static void updateFromSelect(
|
||||
|
||||
assert( pTabList->nSrc>1 );
|
||||
if( pSrc ){
|
||||
pSrc->a[0].fg.notCte = 1;
|
||||
pSrc->a[0].iCursor = -1;
|
||||
pSrc->a[0].pTab->nTabRef--;
|
||||
pSrc->a[0].pTab = 0;
|
||||
@@ -249,7 +250,8 @@ static void updateFromSelect(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if( ALWAYS(pChanges) ){
|
||||
assert( pChanges!=0 || pParse->db->mallocFailed );
|
||||
if( pChanges ){
|
||||
for(i=0; i<pChanges->nExpr; i++){
|
||||
pList = sqlite3ExprListAppend(pParse, pList,
|
||||
sqlite3ExprDup(db, pChanges->a[i].pExpr, 0)
|
||||
@@ -810,7 +812,12 @@ void sqlite3Update(
|
||||
|
||||
/* Top of the update loop */
|
||||
if( eOnePass!=ONEPASS_OFF ){
|
||||
if( !isView && aiCurOnePass[0]!=iDataCur && aiCurOnePass[1]!=iDataCur ){
|
||||
if( aiCurOnePass[0]!=iDataCur
|
||||
&& aiCurOnePass[1]!=iDataCur
|
||||
#ifdef SQLITE_ALLOW_ROWID_IN_VIEW
|
||||
&& !isView
|
||||
#endif
|
||||
){
|
||||
assert( pPk );
|
||||
sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, labelBreak, regKey,nKey);
|
||||
VdbeCoverage(v);
|
||||
|
Reference in New Issue
Block a user