/ Check-in [9ddef84d]
Login

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

Overview
Comment:Compiler warning fixes: Rename some local variables from "j1" to avoid a name collision with the j1() bessel function in the math library. Omit a dummy initializer that gcc 4.6.3 does not like.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9ddef84d432813f3ece8012047d08441caa3315d
User & Date: drh 2015-10-10 14:41:28
Context
2015-10-10
15:11
Omit the use of strcpy() in FTS5 since OpenBSD hates strcpy(). check-in: bc24a5bb user: drh tags: trunk
14:41
Compiler warning fixes: Rename some local variables from "j1" to avoid a name collision with the j1() bessel function in the math library. Omit a dummy initializer that gcc 4.6.3 does not like. check-in: 9ddef84d user: drh tags: trunk
14:00
Add some #ifdef-ery to json1.c to avoid a duplicate typedef when used in the amalgamation, since some compilers become upset over duplicate typedefs. check-in: de28acd4 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/alter.c.

   598    598     v = sqlite3GetVdbe(pParse);
   599    599     /* The VDBE should have been allocated before this routine is called.
   600    600     ** If that allocation failed, we would have quit before reaching this
   601    601     ** point */
   602    602     if( ALWAYS(v) ){
   603    603       int r1 = sqlite3GetTempReg(pParse);
   604    604       int r2 = sqlite3GetTempReg(pParse);
   605         -    int j1;
          605  +    int addr1;
   606    606       sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
   607    607       sqlite3VdbeUsesBtree(v, iDb);
   608    608       sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
   609         -    j1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
          609  +    addr1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
   610    610       sqlite3VdbeChangeP5(v, SQLITE_NOTNULL); VdbeCoverage(v);
   611    611       sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
   612         -    sqlite3VdbeJumpHere(v, j1);
          612  +    sqlite3VdbeJumpHere(v, addr1);
   613    613       sqlite3ReleaseTempReg(pParse, r1);
   614    614       sqlite3ReleaseTempReg(pParse, r2);
   615    615     }
   616    616   }
   617    617   
   618    618   /*
   619    619   ** This function is called after an "ALTER TABLE ... ADD" statement

Changes to src/build.c.

   981    981     ** and allocate the record number for the table entry now.  Before any
   982    982     ** PRIMARY KEY or UNIQUE keywords are parsed.  Those keywords will cause
   983    983     ** indices to be created and the table record must come before the 
   984    984     ** indices.  Hence, the record number for the table must be allocated
   985    985     ** now.
   986    986     */
   987    987     if( !db->init.busy && (v = sqlite3GetVdbe(pParse))!=0 ){
   988         -    int j1;
          988  +    int addr1;
   989    989       int fileFormat;
   990    990       int reg1, reg2, reg3;
   991    991       /* nullRow[] is an OP_Record encoding of a row containing 5 NULLs */
   992    992       static const char nullRow[] = { 6, 0, 0, 0, 0, 0 };
   993    993       sqlite3BeginWriteOperation(pParse, 1, iDb);
   994    994   
   995    995   #ifndef SQLITE_OMIT_VIRTUALTABLE
................................................................................
  1002   1002       ** set them now.
  1003   1003       */
  1004   1004       reg1 = pParse->regRowid = ++pParse->nMem;
  1005   1005       reg2 = pParse->regRoot = ++pParse->nMem;
  1006   1006       reg3 = ++pParse->nMem;
  1007   1007       sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT);
  1008   1008       sqlite3VdbeUsesBtree(v, iDb);
  1009         -    j1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);
         1009  +    addr1 = sqlite3VdbeAddOp1(v, OP_If, reg3); VdbeCoverage(v);
  1010   1010       fileFormat = (db->flags & SQLITE_LegacyFileFmt)!=0 ?
  1011   1011                     1 : SQLITE_MAX_FILE_FORMAT;
  1012   1012       sqlite3VdbeAddOp2(v, OP_Integer, fileFormat, reg3);
  1013   1013       sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, reg3);
  1014   1014       sqlite3VdbeAddOp2(v, OP_Integer, ENC(db), reg3);
  1015   1015       sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, reg3);
  1016         -    sqlite3VdbeJumpHere(v, j1);
         1016  +    sqlite3VdbeJumpHere(v, addr1);
  1017   1017   
  1018   1018       /* This just creates a place-holder record in the sqlite_master table.
  1019   1019       ** The record created does not contain anything yet.  It will be replaced
  1020   1020       ** by the real entry in code generated at sqlite3EndTable().
  1021   1021       **
  1022   1022       ** The rowid for the new entry is left in register pParse->regRowid.
  1023   1023       ** The root page number of the new table is left in reg pParse->regRoot.

Changes to src/expr.c.

  1591   1591   /*
  1592   1592   ** Generate code that checks the left-most column of index table iCur to see if
  1593   1593   ** it contains any NULL entries.  Cause the register at regHasNull to be set
  1594   1594   ** to a non-NULL value if iCur contains no NULLs.  Cause register regHasNull
  1595   1595   ** to be set to NULL if iCur contains one or more NULL values.
  1596   1596   */
  1597   1597   static void sqlite3SetHasNullFlag(Vdbe *v, int iCur, int regHasNull){
  1598         -  int j1;
         1598  +  int addr1;
  1599   1599     sqlite3VdbeAddOp2(v, OP_Integer, 0, regHasNull);
  1600         -  j1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
         1600  +  addr1 = sqlite3VdbeAddOp1(v, OP_Rewind, iCur); VdbeCoverage(v);
  1601   1601     sqlite3VdbeAddOp3(v, OP_Column, iCur, 0, regHasNull);
  1602   1602     sqlite3VdbeChangeP5(v, OPFLAG_TYPEOFARG);
  1603   1603     VdbeComment((v, "first_entry_in(%d)", iCur));
  1604         -  sqlite3VdbeJumpHere(v, j1);
         1604  +  sqlite3VdbeJumpHere(v, addr1);
  1605   1605   }
  1606   1606   
  1607   1607   
  1608   1608   #ifndef SQLITE_OMIT_SUBQUERY
  1609   1609   /*
  1610   1610   ** The argument is an IN operator with a list (not a subquery) on the 
  1611   1611   ** right-hand side.  Return TRUE if that list is constant.
................................................................................
  2197   2197           sqlite3VdbeAddOp4Int(v, OP_NotFound, pExpr->iTable, destIfFalse, r1, 1);
  2198   2198           VdbeCoverage(v);
  2199   2199         }else{
  2200   2200           /* In this branch, the RHS of the IN might contain a NULL and
  2201   2201           ** the presence of a NULL on the RHS makes a difference in the
  2202   2202           ** outcome.
  2203   2203           */
  2204         -        int j1;
         2204  +        int addr1;
  2205   2205     
  2206   2206           /* First check to see if the LHS is contained in the RHS.  If so,
  2207   2207           ** then the answer is TRUE the presence of NULLs in the RHS does
  2208   2208           ** not matter.  If the LHS is not contained in the RHS, then the
  2209   2209           ** answer is NULL if the RHS contains NULLs and the answer is
  2210   2210           ** FALSE if the RHS is NULL-free.
  2211   2211           */
  2212         -        j1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
         2212  +        addr1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
  2213   2213           VdbeCoverage(v);
  2214   2214           sqlite3VdbeAddOp2(v, OP_IsNull, rRhsHasNull, destIfNull);
  2215   2215           VdbeCoverage(v);
  2216   2216           sqlite3VdbeGoto(v, destIfFalse);
  2217         -        sqlite3VdbeJumpHere(v, j1);
         2217  +        sqlite3VdbeJumpHere(v, addr1);
  2218   2218         }
  2219   2219       }
  2220   2220     }
  2221   2221     sqlite3ReleaseTempReg(pParse, r1);
  2222   2222     sqlite3ExprCachePop(pParse);
  2223   2223     VdbeComment((v, "end IN expr"));
  2224   2224   }

Changes to src/insert.c.

   309    309     AutoincInfo *p;
   310    310     Vdbe *v = pParse->pVdbe;
   311    311     sqlite3 *db = pParse->db;
   312    312   
   313    313     assert( v );
   314    314     for(p = pParse->pAinc; p; p = p->pNext){
   315    315       Db *pDb = &db->aDb[p->iDb];
   316         -    int j1;
          316  +    int addr1;
   317    317       int iRec;
   318    318       int memId = p->regCtr;
   319    319   
   320    320       iRec = sqlite3GetTempReg(pParse);
   321    321       assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
   322    322       sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
   323         -    j1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1); VdbeCoverage(v);
          323  +    addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1); VdbeCoverage(v);
   324    324       sqlite3VdbeAddOp2(v, OP_NewRowid, 0, memId+1);
   325         -    sqlite3VdbeJumpHere(v, j1);
          325  +    sqlite3VdbeJumpHere(v, addr1);
   326    326       sqlite3VdbeAddOp3(v, OP_MakeRecord, memId-1, 2, iRec);
   327    327       sqlite3VdbeAddOp3(v, OP_Insert, 0, iRec, memId+1);
   328    328       sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
   329    329       sqlite3VdbeAddOp0(v, OP_Close);
   330    330       sqlite3ReleaseTempReg(pParse, iRec);
   331    331     }
   332    332   }
................................................................................
   810    810       ** translated into a unique ID for the row.  But on a BEFORE trigger,
   811    811       ** we do not know what the unique ID will be (because the insert has
   812    812       ** not happened yet) so we substitute a rowid of -1
   813    813       */
   814    814       if( ipkColumn<0 ){
   815    815         sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
   816    816       }else{
   817         -      int j1;
          817  +      int addr1;
   818    818         assert( !withoutRowid );
   819    819         if( useTempTable ){
   820    820           sqlite3VdbeAddOp3(v, OP_Column, srcTab, ipkColumn, regCols);
   821    821         }else{
   822    822           assert( pSelect==0 );  /* Otherwise useTempTable is true */
   823    823           sqlite3ExprCode(pParse, pList->a[ipkColumn].pExpr, regCols);
   824    824         }
   825         -      j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);
          825  +      addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols); VdbeCoverage(v);
   826    826         sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
   827         -      sqlite3VdbeJumpHere(v, j1);
          827  +      sqlite3VdbeJumpHere(v, addr1);
   828    828         sqlite3VdbeAddOp1(v, OP_MustBeInt, regCols); VdbeCoverage(v);
   829    829       }
   830    830   
   831    831       /* Cannot have triggers on a virtual table. If it were possible,
   832    832       ** this block would have to account for hidden column.
   833    833       */
   834    834       assert( !IsVirtual(pTab) );
................................................................................
   894    894             pOp->p3 = regAutoinc;
   895    895           }
   896    896         }
   897    897         /* If the PRIMARY KEY expression is NULL, then use OP_NewRowid
   898    898         ** to generate a unique primary key value.
   899    899         */
   900    900         if( !appendFlag ){
   901         -        int j1;
          901  +        int addr1;
   902    902           if( !IsVirtual(pTab) ){
   903         -          j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);
          903  +          addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid); VdbeCoverage(v);
   904    904             sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);
   905         -          sqlite3VdbeJumpHere(v, j1);
          905  +          sqlite3VdbeJumpHere(v, addr1);
   906    906           }else{
   907         -          j1 = sqlite3VdbeCurrentAddr(v);
   908         -          sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, j1+2); VdbeCoverage(v);
          907  +          addr1 = sqlite3VdbeCurrentAddr(v);
          908  +          sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, addr1+2); VdbeCoverage(v);
   909    909           }
   910    910           sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid); VdbeCoverage(v);
   911    911         }
   912    912       }else if( IsVirtual(pTab) || withoutRowid ){
   913    913         sqlite3VdbeAddOp2(v, OP_Null, 0, regRowid);
   914    914       }else{
   915    915         sqlite3VdbeAddOp3(v, OP_NewRowid, iDataCur, regRowid, regAutoinc);
................................................................................
  1155   1155     Index *pIdx;         /* Pointer to one of the indices */
  1156   1156     Index *pPk = 0;      /* The PRIMARY KEY index */
  1157   1157     sqlite3 *db;         /* Database connection */
  1158   1158     int i;               /* loop counter */
  1159   1159     int ix;              /* Index loop counter */
  1160   1160     int nCol;            /* Number of columns */
  1161   1161     int onError;         /* Conflict resolution strategy */
  1162         -  int j1;              /* Address of jump instruction */
         1162  +  int addr1;           /* Address of jump instruction */
  1163   1163     int seenReplace = 0; /* True if REPLACE is used to resolve INT PK conflict */
  1164   1164     int nPkField;        /* Number of fields in PRIMARY KEY. 1 for ROWID tables */
  1165   1165     int ipkTop = 0;      /* Top of the rowid change constraint check */
  1166   1166     int ipkBottom = 0;   /* Bottom of the rowid change constraint check */
  1167   1167     u8 isUpdate;         /* True if this is an UPDATE operation */
  1168   1168     u8 bAffinityDone = 0;  /* True if the OP_Affinity operation has been run */
  1169   1169     int regRowid = -1;   /* Register holding ROWID value */
................................................................................
  1226   1226         case OE_Ignore: {
  1227   1227           sqlite3VdbeAddOp2(v, OP_IsNull, regNewData+1+i, ignoreDest);
  1228   1228           VdbeCoverage(v);
  1229   1229           break;
  1230   1230         }
  1231   1231         default: {
  1232   1232           assert( onError==OE_Replace );
  1233         -        j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regNewData+1+i); VdbeCoverage(v);
         1233  +        addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, regNewData+1+i);
         1234  +           VdbeCoverage(v);
  1234   1235           sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regNewData+1+i);
  1235         -        sqlite3VdbeJumpHere(v, j1);
         1236  +        sqlite3VdbeJumpHere(v, addr1);
  1236   1237           break;
  1237   1238         }
  1238   1239       }
  1239   1240     }
  1240   1241   
  1241   1242     /* Test all CHECK constraints
  1242   1243     */

Changes to src/loadext.c.

   611    611   /*
   612    612   ** The auto-extension code added regardless of whether or not extension
   613    613   ** loading is supported.  We need a dummy sqlite3Apis pointer for that
   614    614   ** code if regular extension loading is not available.  This is that
   615    615   ** dummy pointer.
   616    616   */
   617    617   #ifdef SQLITE_OMIT_LOAD_EXTENSION
   618         -static const sqlite3_api_routines sqlite3Apis = { 0 };
          618  +static const sqlite3_api_routines sqlite3Apis;
   619    619   #endif
   620    620   
   621    621   
   622    622   /*
   623    623   ** The following object holds the list of automatically loaded
   624    624   ** extensions.
   625    625   **

Changes to src/select.c.

  2574   2574   
  2575   2575     addr = sqlite3VdbeCurrentAddr(v);
  2576   2576     iContinue = sqlite3VdbeMakeLabel(v);
  2577   2577   
  2578   2578     /* Suppress duplicates for UNION, EXCEPT, and INTERSECT 
  2579   2579     */
  2580   2580     if( regPrev ){
  2581         -    int j1, j2;
  2582         -    j1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);
  2583         -    j2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,
         2581  +    int addr1, addr2;
         2582  +    addr1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev); VdbeCoverage(v);
         2583  +    addr2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iSdst, regPrev+1, pIn->nSdst,
  2584   2584                                 (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
  2585         -    sqlite3VdbeAddOp3(v, OP_Jump, j2+2, iContinue, j2+2); VdbeCoverage(v);
  2586         -    sqlite3VdbeJumpHere(v, j1);
         2585  +    sqlite3VdbeAddOp3(v, OP_Jump, addr2+2, iContinue, addr2+2); VdbeCoverage(v);
         2586  +    sqlite3VdbeJumpHere(v, addr1);
  2587   2587       sqlite3VdbeAddOp3(v, OP_Copy, pIn->iSdst, regPrev+1, pIn->nSdst-1);
  2588   2588       sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
  2589   2589     }
  2590   2590     if( pParse->db->mallocFailed ) return 0;
  2591   2591   
  2592   2592     /* Suppress the first OFFSET entries if there is an OFFSET clause
  2593   2593     */
................................................................................
  2796   2796     int regLimitA;        /* Limit register for select-A */
  2797   2797     int regLimitB;        /* Limit register for select-A */
  2798   2798     int regPrev;          /* A range of registers to hold previous output */
  2799   2799     int savedLimit;       /* Saved value of p->iLimit */
  2800   2800     int savedOffset;      /* Saved value of p->iOffset */
  2801   2801     int labelCmpr;        /* Label for the start of the merge algorithm */
  2802   2802     int labelEnd;         /* Label for the end of the overall SELECT stmt */
  2803         -  int j1;               /* Jump instructions that get retargetted */
         2803  +  int addr1;            /* Jump instructions that get retargetted */
  2804   2804     int op;               /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
  2805   2805     KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
  2806   2806     KeyInfo *pKeyMerge;   /* Comparison information for merging rows */
  2807   2807     sqlite3 *db;          /* Database connection */
  2808   2808     ExprList *pOrderBy;   /* The ORDER BY clause */
  2809   2809     int nOrderBy;         /* Number of terms in the ORDER BY clause */
  2810   2810     int *aPermute;        /* Mapping from ORDER BY terms to result set columns */
................................................................................
  2932   2932     sqlite3SelectDestInit(&destA, SRT_Coroutine, regAddrA);
  2933   2933     sqlite3SelectDestInit(&destB, SRT_Coroutine, regAddrB);
  2934   2934   
  2935   2935     /* Generate a coroutine to evaluate the SELECT statement to the
  2936   2936     ** left of the compound operator - the "A" select.
  2937   2937     */
  2938   2938     addrSelectA = sqlite3VdbeCurrentAddr(v) + 1;
  2939         -  j1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
         2939  +  addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrA, 0, addrSelectA);
  2940   2940     VdbeComment((v, "left SELECT"));
  2941   2941     pPrior->iLimit = regLimitA;
  2942   2942     explainSetInteger(iSub1, pParse->iNextSelectId);
  2943   2943     sqlite3Select(pParse, pPrior, &destA);
  2944   2944     sqlite3VdbeAddOp1(v, OP_EndCoroutine, regAddrA);
  2945         -  sqlite3VdbeJumpHere(v, j1);
         2945  +  sqlite3VdbeJumpHere(v, addr1);
  2946   2946   
  2947   2947     /* Generate a coroutine to evaluate the SELECT statement on 
  2948   2948     ** the right - the "B" select
  2949   2949     */
  2950   2950     addrSelectB = sqlite3VdbeCurrentAddr(v) + 1;
  2951         -  j1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
         2951  +  addr1 = sqlite3VdbeAddOp3(v, OP_InitCoroutine, regAddrB, 0, addrSelectB);
  2952   2952     VdbeComment((v, "right SELECT"));
  2953   2953     savedLimit = p->iLimit;
  2954   2954     savedOffset = p->iOffset;
  2955   2955     p->iLimit = regLimitB;
  2956   2956     p->iOffset = 0;  
  2957   2957     explainSetInteger(iSub2, pParse->iNextSelectId);
  2958   2958     sqlite3Select(pParse, p, &destB);
................................................................................
  3035   3035       sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
  3036   3036     }
  3037   3037     sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
  3038   3038     sqlite3VdbeGoto(v, labelCmpr);
  3039   3039   
  3040   3040     /* This code runs once to initialize everything.
  3041   3041     */
  3042         -  sqlite3VdbeJumpHere(v, j1);
         3042  +  sqlite3VdbeJumpHere(v, addr1);
  3043   3043     sqlite3VdbeAddOp2(v, OP_Yield, regAddrA, addrEofA_noB); VdbeCoverage(v);
  3044   3044     sqlite3VdbeAddOp2(v, OP_Yield, regAddrB, addrEofB); VdbeCoverage(v);
  3045   3045   
  3046   3046     /* Implement the main merge loop
  3047   3047     */
  3048   3048     sqlite3VdbeResolveLabel(v, labelCmpr);
  3049   3049     sqlite3VdbeAddOp4(v, OP_Permutation, 0, 0, 0, (char*)aPermute, P4_INTARRAY);
................................................................................
  5209   5209       if( db->mallocFailed ) goto select_end;
  5210   5210   
  5211   5211       /* Processing for aggregates with GROUP BY is very different and
  5212   5212       ** much more complex than aggregates without a GROUP BY.
  5213   5213       */
  5214   5214       if( pGroupBy ){
  5215   5215         KeyInfo *pKeyInfo;  /* Keying information for the group by clause */
  5216         -      int j1;             /* A-vs-B comparision jump */
         5216  +      int addr1;          /* A-vs-B comparision jump */
  5217   5217         int addrOutputRow;  /* Start of subroutine that outputs a result row */
  5218   5218         int regOutputRow;   /* Return address register for output subroutine */
  5219   5219         int addrSetAbort;   /* Set the abort flag and return */
  5220   5220         int addrTopOfLoop;  /* Top of the input loop */
  5221   5221         int addrSortingIdx; /* The OP_OpenEphemeral for the sorting index */
  5222   5222         int addrReset;      /* Subroutine for resetting the accumulator */
  5223   5223         int regReset;       /* Return address register for reset subroutine */
................................................................................
  5357   5357           }else{
  5358   5358             sAggInfo.directMode = 1;
  5359   5359             sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
  5360   5360           }
  5361   5361         }
  5362   5362         sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
  5363   5363                             (char*)sqlite3KeyInfoRef(pKeyInfo), P4_KEYINFO);
  5364         -      j1 = sqlite3VdbeCurrentAddr(v);
  5365         -      sqlite3VdbeAddOp3(v, OP_Jump, j1+1, 0, j1+1); VdbeCoverage(v);
         5364  +      addr1 = sqlite3VdbeCurrentAddr(v);
         5365  +      sqlite3VdbeAddOp3(v, OP_Jump, addr1+1, 0, addr1+1); VdbeCoverage(v);
  5366   5366   
  5367   5367         /* Generate code that runs whenever the GROUP BY changes.
  5368   5368         ** Changes in the GROUP BY are detected by the previous code
  5369   5369         ** block.  If there were no changes, this block is skipped.
  5370   5370         **
  5371   5371         ** This code copies current group by terms in b0,b1,b2,...
  5372   5372         ** over to a0,a1,a2.  It then calls the output subroutine
................................................................................
  5380   5380         VdbeComment((v, "check abort flag"));
  5381   5381         sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset);
  5382   5382         VdbeComment((v, "reset accumulator"));
  5383   5383   
  5384   5384         /* Update the aggregate accumulators based on the content of
  5385   5385         ** the current row
  5386   5386         */
  5387         -      sqlite3VdbeJumpHere(v, j1);
         5387  +      sqlite3VdbeJumpHere(v, addr1);
  5388   5388         updateAccumulator(pParse, &sAggInfo);
  5389   5389         sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag);
  5390   5390         VdbeComment((v, "indicate data in accumulator"));
  5391   5391   
  5392   5392         /* End of the loop
  5393   5393         */
  5394   5394         if( groupBySort ){

Changes to src/update.c.

   560    560         if( aXRef[i]<0 && i!=pTab->iPKey ){
   561    561           sqlite3ExprCodeGetColumnOfTable(v, pTab, iDataCur, i, regNew+i);
   562    562         }
   563    563       }
   564    564     }
   565    565   
   566    566     if( !isView ){
   567         -    int j1 = 0;           /* Address of jump instruction */
          567  +    int addr1 = 0;        /* Address of jump instruction */
   568    568       int bReplace = 0;     /* True if REPLACE conflict resolution might happen */
   569    569   
   570    570       /* Do constraint checks. */
   571    571       assert( regOldRowid>0 );
   572    572       sqlite3GenerateConstraintChecks(pParse, pTab, aRegIdx, iDataCur, iIdxCur,
   573    573           regNewRowid, regOldRowid, chngKey, onError, labelContinue, &bReplace);
   574    574   
................................................................................
   576    576       if( hasFK ){
   577    577         sqlite3FkCheck(pParse, pTab, regOldRowid, 0, aXRef, chngKey);
   578    578       }
   579    579   
   580    580       /* Delete the index entries associated with the current record.  */
   581    581       if( bReplace || chngKey ){
   582    582         if( pPk ){
   583         -        j1 = sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, 0, regKey, nKey);
          583  +        addr1 = sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, 0, regKey, nKey);
   584    584         }else{
   585         -        j1 = sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, 0, regOldRowid);
          585  +        addr1 = sqlite3VdbeAddOp3(v, OP_NotExists, iDataCur, 0, regOldRowid);
   586    586         }
   587    587         VdbeCoverageNeverTaken(v);
   588    588       }
   589    589       sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur, aRegIdx, -1);
   590    590     
   591    591       /* If changing the record number, delete the old record.  */
   592    592       if( hasFK || chngKey || pPk!=0 ){
   593    593         sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, 0);
   594    594       }
   595    595       if( bReplace || chngKey ){
   596         -      sqlite3VdbeJumpHere(v, j1);
          596  +      sqlite3VdbeJumpHere(v, addr1);
   597    597       }
   598    598   
   599    599       if( hasFK ){
   600    600         sqlite3FkCheck(pParse, pTab, 0, regNewRowid, aXRef, chngKey);
   601    601       }
   602    602     
   603    603       /* Insert the new index entries and the new record. */

Changes to src/wherecode.c.

  1262   1262                   | WHERE_ONETABLE_ONLY
  1263   1263                   | WHERE_NO_AUTOINDEX;
  1264   1264       for(ii=0; ii<pOrWc->nTerm; ii++){
  1265   1265         WhereTerm *pOrTerm = &pOrWc->a[ii];
  1266   1266         if( pOrTerm->leftCursor==iCur || (pOrTerm->eOperator & WO_AND)!=0 ){
  1267   1267           WhereInfo *pSubWInfo;           /* Info for single OR-term scan */
  1268   1268           Expr *pOrExpr = pOrTerm->pExpr; /* Current OR clause term */
  1269         -        int j1 = 0;                     /* Address of jump operation */
         1269  +        int jmp1 = 0;                   /* Address of jump operation */
  1270   1270           if( pAndExpr && !ExprHasProperty(pOrExpr, EP_FromJoin) ){
  1271   1271             pAndExpr->pLeft = pOrExpr;
  1272   1272             pOrExpr = pAndExpr;
  1273   1273           }
  1274   1274           /* Loop through table entries that match term pOrTerm. */
  1275   1275           WHERETRACE(0xffff, ("Subplan for OR-clause:\n"));
  1276   1276           pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrExpr, 0, 0,
................................................................................
  1289   1289             ** row will be skipped in subsequent sub-WHERE clauses.
  1290   1290             */
  1291   1291             if( (pWInfo->wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
  1292   1292               int r;
  1293   1293               int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
  1294   1294               if( HasRowid(pTab) ){
  1295   1295                 r = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, regRowid, 0);
  1296         -              j1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0, r,iSet);
         1296  +              jmp1 = sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset, 0,
         1297  +                                           r,iSet);
  1297   1298                 VdbeCoverage(v);
  1298   1299               }else{
  1299   1300                 Index *pPk = sqlite3PrimaryKeyIndex(pTab);
  1300   1301                 int nPk = pPk->nKeyCol;
  1301   1302                 int iPk;
  1302   1303   
  1303   1304                 /* Read the PK into an array of temp registers. */
................................................................................
  1319   1320                 **
  1320   1321                 ** Use some of the same optimizations as OP_RowSetTest: If iSet
  1321   1322                 ** is zero, assume that the key cannot already be present in
  1322   1323                 ** the temp table. And if iSet is -1, assume that there is no 
  1323   1324                 ** need to insert the key into the temp table, as it will never 
  1324   1325                 ** be tested for.  */ 
  1325   1326                 if( iSet ){
  1326         -                j1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
         1327  +                jmp1 = sqlite3VdbeAddOp4Int(v, OP_Found, regRowset, 0, r, nPk);
  1327   1328                   VdbeCoverage(v);
  1328   1329                 }
  1329   1330                 if( iSet>=0 ){
  1330   1331                   sqlite3VdbeAddOp3(v, OP_MakeRecord, r, nPk, regRowid);
  1331   1332                   sqlite3VdbeAddOp3(v, OP_IdxInsert, regRowset, regRowid, 0);
  1332   1333                   if( iSet ) sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
  1333   1334                 }
................................................................................
  1338   1339             }
  1339   1340   
  1340   1341             /* Invoke the main loop body as a subroutine */
  1341   1342             sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
  1342   1343   
  1343   1344             /* Jump here (skipping the main loop body subroutine) if the
  1344   1345             ** current sub-WHERE row is a duplicate from prior sub-WHEREs. */
  1345         -          if( j1 ) sqlite3VdbeJumpHere(v, j1);
         1346  +          if( jmp1 ) sqlite3VdbeJumpHere(v, jmp1);
  1346   1347   
  1347   1348             /* The pSubWInfo->untestedTerms flag means that this OR term
  1348   1349             ** contained one or more AND term from a notReady table.  The
  1349   1350             ** terms from the notReady table could not be tested and will
  1350   1351             ** need to be tested later.
  1351   1352             */
  1352   1353             if( pSubWInfo->untestedTerms ) untestedTerms = 1;