/ Check-in [d9ba023c]
Login

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

Overview
Comment:Remove an unnecessary condition.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | uninit-vdbe-mem
Files: files | file ages | folders
SHA1: d9ba023c608bce7768bc08478f9df9243f2e73ce
User & Date: drh 2011-12-09 17:51:30
Context
2011-12-09
18:06
Change the VDBE so that all registers are initialized to "Invalid" instead of NULL and report errors on any attempted read of an Invalid register. This will help prevent future bugs similar to [7bbfb7d442]. check-in: 0064bab7 user: drh tags: trunk
17:51
Remove an unnecessary condition. Closed-Leaf check-in: d9ba023c user: drh tags: uninit-vdbe-mem
17:38
Remove an unnecessary initialization of Vdbe.aOnceFlag. check-in: 421714da user: drh tags: uninit-vdbe-mem
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vdbeaux.c.

  2132   2132     ** state.  We need to rollback the statement transaction, if there is
  2133   2133     ** one, or the complete transaction if there is no statement transaction.
  2134   2134     */
  2135   2135   
  2136   2136     if( p->db->mallocFailed ){
  2137   2137       p->rc = SQLITE_NOMEM;
  2138   2138     }
  2139         -  if( p->aOnceFlag ) memset(p->aOnceFlag, 0, p->nOnceFlag);
         2139  +  memset(p->aOnceFlag, 0, p->nOnceFlag);
  2140   2140     closeAllCursors(p);
  2141   2141     if( p->magic!=VDBE_MAGIC_RUN ){
  2142   2142       return SQLITE_OK;
  2143   2143     }
  2144   2144     checkActiveVdbeCnt(db);
  2145   2145   
  2146   2146     /* No commit or rollback needed if the program never started */