diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/update.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/update.c b/src/update.c index d385afb84..bff7bdf03 100644 --- a/src/update.c +++ b/src/update.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle UPDATE statements. ** -** $Id: update.c,v 1.135 2007/02/21 16:52:12 danielk1977 Exp $ +** $Id: update.c,v 1.136 2007/02/21 17:04:04 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -568,7 +568,6 @@ static void updateVirtualTable( int ephemTab; /* Table holding the result of the SELECT */ int i; /* Loop counter */ int addr; /* Address of top of loop */ - int iLabel; /* Vdbe label used by the OP_Rewind op */ /* Construct the SELECT statement that will find the new values for ** all updated rows. @@ -603,8 +602,7 @@ static void updateVirtualTable( ** Generate code to scan the ephemeral table and call VDelete and ** VInsert */ - iLabel = sqlite3VdbeMakeLabel(v); - sqlite3VdbeAddOp(v, OP_Rewind, ephemTab, iLabel); + sqlite3VdbeAddOp(v, OP_Rewind, ephemTab, 0); addr = sqlite3VdbeCurrentAddr(v); sqlite3VdbeAddOp(v, OP_Column, ephemTab, 0); if( pRowid ){ @@ -619,7 +617,7 @@ static void updateVirtualTable( sqlite3VdbeOp3(v, OP_VUpdate, 0, pTab->nCol+2, (const char*)pTab->pVtab, P3_VTAB); sqlite3VdbeAddOp(v, OP_Next, ephemTab, addr); - sqlite3VdbeResolveLabel(v, iLabel); + sqlite3VdbeJumpHere(v, addr-1); sqlite3VdbeAddOp(v, OP_Close, ephemTab, 0); /* Cleanup */ |