SQLite

Check-in [a1ad7fb38b]
Login

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

Overview
Comment:Fix a harmless compiler warning (a shadowed local variable) in analyze.c.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a1ad7fb38bb38909ca2fddee31c7a8001f10686f
User & Date: drh 2011-01-24 19:14:06.711
Context
2011-01-24
19:45
Fix a typo in the documentation for sqlite3_snprintf(). No changes to code. (check-in: 8d1065411a user: drh tags: trunk)
19:14
Fix a harmless compiler warning (a shadowed local variable) in analyze.c. (check-in: a1ad7fb38b user: drh tags: trunk)
2011-01-22
13:32
Modify the trace callback mechanism so that SQL commands executed from within virtual table or user function callbacks are passed to the trace callback without parameter expansion and enclosed in SQL comments. (check-in: a764915b87 user: dan tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/analyze.c.
282
283
284
285
286
287
288
289

290
291

292
293

294
295
296
297
298
299
300
282
283
284
285
286
287
288

289
290

291
292

293
294
295
296
297
298
299
300







-
+

-
+

-
+







      ** passed as the second argument to the call to sqlite3VdbeJumpHere() 
      ** below may be negative. Which causes an assert() to fail (or an
      ** out-of-bounds write if SQLITE_DEBUG is not defined).  */
      return;
    }
    sqlite3VdbeAddOp2(v, OP_Goto, 0, endOfLoop);
    for(i=0; i<nCol; i++){
      int addr = sqlite3VdbeCurrentAddr(v) - (nCol*2);
      int addr2 = sqlite3VdbeCurrentAddr(v) - (nCol*2);
      if( i==0 ){
        sqlite3VdbeJumpHere(v, addr-1);  /* Set jump dest for the OP_IfNot */
        sqlite3VdbeJumpHere(v, addr2-1);  /* Set jump dest for the OP_IfNot */
      }
      sqlite3VdbeJumpHere(v, addr);      /* Set jump dest for the OP_Ne */
      sqlite3VdbeJumpHere(v, addr2);      /* Set jump dest for the OP_Ne */
      sqlite3VdbeAddOp2(v, OP_AddImm, iMem+i+1, 1);
      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, iMem+nCol+i+1);
    }

    /* End of the analysis loop. */
    sqlite3VdbeResolveLabel(v, endOfLoop);
    sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, topOfLoop);