/ Check-in [14b181e8]
Login

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

Overview
Comment:Fix C99-style variable declaration issue seen with older versions of MSVC.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 14b181e862bd742555c51b87fab59d6f8f6602fe2c18dde3ef3b020779912419
User & Date: mistachkin 2017-10-07 23:31:33
Context
2017-10-07
23:35
Revise variable declaration moved in the previous check-in so sqlite3VdbeReset() is consistent with sqlite3VdbeRewind(). check-in: 63d1b425 user: mistachkin tags: trunk
23:31
Fix C99-style variable declaration issue seen with older versions of MSVC. check-in: 14b181e8 user: mistachkin tags: trunk
2017-10-06
18:00
Add tests for the example fts3 "rank" function that appears in the documentation. check-in: 702b137a user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

  2864   2864   ** again.
  2865   2865   **
  2866   2866   ** To look at it another way, this routine resets the state of the
  2867   2867   ** virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to
  2868   2868   ** VDBE_MAGIC_INIT.
  2869   2869   */
  2870   2870   int sqlite3VdbeReset(Vdbe *p){
         2871  +#ifdef SQLITE_DEBUG
         2872  +  int i;
         2873  +#endif
         2874  +
  2871   2875     sqlite3 *db;
  2872   2876     db = p->db;
  2873   2877   
  2874   2878     /* If the VM did not run to completion or if it encountered an
  2875   2879     ** error, then it might not have been halted properly.  So halt
  2876   2880     ** it now.
  2877   2881     */
................................................................................
  2895   2899     }
  2896   2900   
  2897   2901     /* Reset register contents and reclaim error message memory.
  2898   2902     */
  2899   2903   #ifdef SQLITE_DEBUG
  2900   2904     /* Execute assert() statements to ensure that the Vdbe.apCsr[] and 
  2901   2905     ** Vdbe.aMem[] arrays have already been cleaned up.  */
  2902         -  int i;
  2903   2906     if( p->apCsr ) for(i=0; i<p->nCursor; i++) assert( p->apCsr[i]==0 );
  2904   2907     if( p->aMem ){
  2905   2908       for(i=0; i<p->nMem; i++) assert( p->aMem[i].flags==MEM_Undefined );
  2906   2909     }
  2907   2910   #endif
  2908   2911     sqlite3DbFree(db, p->zErrMsg);
  2909   2912     p->zErrMsg = 0;