/ Check-in [f97d7274]
Login

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

Overview
Comment:Remove an unreachable branch in the direct blob I/O logic of btree.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental-mmap
Files: files | file ages | folders
SHA1: f97d7274f48e3bb98ed17eae11abb55064134874
User & Date: drh 2013-04-03 20:04:04
Context
2013-04-03
21:23
Release resources prior to bailing out of the btreeCreateTable() routine following an OOM error. Closed-Leaf check-in: b2a72be9 user: drh tags: experimental-mmap
20:04
Remove an unreachable branch in the direct blob I/O logic of btree.c. check-in: f97d7274 user: drh tags: experimental-mmap
13:38
Fix a bug in the detection of iOS when setting the default mmap_limit. check-in: ac1432b3 user: drh tags: experimental-mmap
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  8376   8376     if( pCsr->eState!=CURSOR_VALID ){
  8377   8377       return SQLITE_ABORT;
  8378   8378     }
  8379   8379   
  8380   8380     /* Save the positions of all other cursors open on this table. This is
  8381   8381     ** required in case any of them are holding references to an xFetch
  8382   8382     ** version of the b-tree page modified by the accessPayload call below.
         8383  +  **
         8384  +  ** Note that pCsr must be open on a BTREE_INTKEY table and saveCursorPosition()
         8385  +  ** and hence saveAllCursors() cannot fail on a BTREE_INTKEY table, hence
         8386  +  ** saveAllCursors can only return SQLITE_OK.
  8383   8387     */
  8384         -  rc = saveAllCursors(pCsr->pBt, pCsr->pgnoRoot, pCsr);
  8385         -  if( rc!=SQLITE_OK ){
  8386         -    return SQLITE_OK;
  8387         -  }
         8388  +  VVA_ONLY(rc =) saveAllCursors(pCsr->pBt, pCsr->pgnoRoot, pCsr);
         8389  +  assert( rc==SQLITE_OK );
  8388   8390   
  8389   8391     /* Check some assumptions: 
  8390   8392     **   (a) the cursor is open for writing,
  8391   8393     **   (b) there is a read/write transaction open,
  8392   8394     **   (c) the connection holds a write-lock on the table (if required),
  8393   8395     **   (d) there are no conflicting read-locks, and
  8394   8396     **   (e) the cursor points at a valid row of an intKey table.