SQLite

Check-in [d9ba023c60]
Login

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

Overview
Comment:Remove an unnecessary condition.
Downloads: Tarball | ZIP 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.877
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: 0064bab771 user: drh tags: trunk)
17:51
Remove an unnecessary condition. (Closed-Leaf check-in: d9ba023c60 user: drh tags: uninit-vdbe-mem)
17:38
Remove an unnecessary initialization of Vdbe.aOnceFlag. (check-in: 421714dad3 user: drh tags: uninit-vdbe-mem)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbeaux.c.
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
  ** state.  We need to rollback the statement transaction, if there is
  ** one, or the complete transaction if there is no statement transaction.
  */

  if( p->db->mallocFailed ){
    p->rc = SQLITE_NOMEM;
  }
  if( p->aOnceFlag ) memset(p->aOnceFlag, 0, p->nOnceFlag);
  closeAllCursors(p);
  if( p->magic!=VDBE_MAGIC_RUN ){
    return SQLITE_OK;
  }
  checkActiveVdbeCnt(db);

  /* No commit or rollback needed if the program never started */







|







2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
  ** state.  We need to rollback the statement transaction, if there is
  ** one, or the complete transaction if there is no statement transaction.
  */

  if( p->db->mallocFailed ){
    p->rc = SQLITE_NOMEM;
  }
  memset(p->aOnceFlag, 0, p->nOnceFlag);
  closeAllCursors(p);
  if( p->magic!=VDBE_MAGIC_RUN ){
    return SQLITE_OK;
  }
  checkActiveVdbeCnt(db);

  /* No commit or rollback needed if the program never started */