/ Check-in [d2ab24f5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a harmless compiler warning.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d2ab24f59d92527fe503fa7dc2128078fbc4dd2d2c1148effa9ea1957ab19940
User & Date: drh 2018-04-20 20:09:22
Context
2018-04-20
20:37
Enhance the "rbu" command line utility a bit. check-in: 61eb516f user: dan tags: trunk
20:09
Fix a harmless compiler warning. check-in: d2ab24f5 user: drh tags: trunk
19:46
Avoid the use of statement journals on DELETEs of a single row without triggers or foreign keys. check-in: 20bf5800 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/update.c.

   387    387       updateVirtualTable(pParse, pTabList, pTab, pChanges, pRowidExpr, aXRef,
   388    388                          pWhere, onError);
   389    389       goto update_cleanup;
   390    390     }
   391    391   #endif
   392    392   
   393    393     /* Jump to labelBreak to abandon further processing of this UPDATE */
   394         -  labelBreak = sqlite3VdbeMakeLabel(v);
          394  +  labelContinue = labelBreak = sqlite3VdbeMakeLabel(v);
   395    395   
   396    396     /* Not an UPSERT.  Normal processing.  Begin by
   397    397     ** initialize the count of updated rows */
   398    398     if( (db->flags&SQLITE_CountRows)!=0
   399    399      && !pParse->pTriggerTab
   400    400      && !pParse->nested
   401    401      && pUpsert==0
................................................................................
   424    424       /* If this is an UPSERT, then all cursors have already been opened by
   425    425       ** the outer INSERT and the data cursor should be pointing at the row
   426    426       ** that is to be updated.  So bypass the code that searches for the
   427    427       ** row(s) to be updated.
   428    428       */
   429    429       pWInfo = 0;
   430    430       eOnePass = ONEPASS_SINGLE;
   431         -    labelContinue = labelBreak;
   432    431       sqlite3ExprIfFalse(pParse, pWhere, labelBreak, SQLITE_JUMPIFNULL);
   433    432     }else{
   434    433       /* Begin the database scan. 
   435    434       **
   436    435       ** Do not consider a single-pass strategy for a multi-row update if
   437    436       ** there are any triggers or foreign keys to process, or rows may
   438    437       ** be deleted as a result of REPLACE conflict handling. Any of these
................................................................................
   522    521       /* Top of the update loop */
   523    522       if( eOnePass!=ONEPASS_OFF ){
   524    523         if( !isView && aiCurOnePass[0]!=iDataCur && aiCurOnePass[1]!=iDataCur ){
   525    524           assert( pPk );
   526    525           sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, labelBreak, regKey,nKey);
   527    526           VdbeCoverageNeverTaken(v);
   528    527         }
   529         -      if( eOnePass==ONEPASS_SINGLE ){
   530         -        labelContinue = labelBreak;
   531         -      }else{
          528  +      if( eOnePass!=ONEPASS_SINGLE ){
   532    529           labelContinue = sqlite3VdbeMakeLabel(v);
   533    530         }
   534    531         sqlite3VdbeAddOp2(v, OP_IsNull, pPk ? regKey : regOldRowid, labelBreak);
   535    532         VdbeCoverageIf(v, pPk==0);
   536    533         VdbeCoverageIf(v, pPk!=0);
   537    534       }else if( pPk ){
   538    535         labelContinue = sqlite3VdbeMakeLabel(v);