SQLite

Check-in [f97d7274f4]
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
Timelines: family | ancestors | descendants | both | experimental-mmap
Files: files | file ages | folders
SHA1: f97d7274f48e3bb98ed17eae11abb55064134874
User & Date: drh 2013-04-03 20:04:04.697
Context
2013-04-03
21:23
Release resources prior to bailing out of the btreeCreateTable() routine following an OOM error. (Closed-Leaf check-in: b2a72be9ba user: drh tags: experimental-mmap)
20:04
Remove an unreachable branch in the direct blob I/O logic of btree.c. (check-in: f97d7274f4 user: drh tags: experimental-mmap)
13:38
Fix a bug in the detection of iOS when setting the default mmap_limit. (check-in: ac1432b3a8 user: drh tags: experimental-mmap)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.c.
8376
8377
8378
8379
8380
8381
8382




8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
  if( pCsr->eState!=CURSOR_VALID ){
    return SQLITE_ABORT;
  }

  /* Save the positions of all other cursors open on this table. This is
  ** required in case any of them are holding references to an xFetch
  ** version of the b-tree page modified by the accessPayload call below.




  */
  rc = saveAllCursors(pCsr->pBt, pCsr->pgnoRoot, pCsr);
  if( rc!=SQLITE_OK ){
    return SQLITE_OK;
  }

  /* Check some assumptions: 
  **   (a) the cursor is open for writing,
  **   (b) there is a read/write transaction open,
  **   (c) the connection holds a write-lock on the table (if required),
  **   (d) there are no conflicting read-locks, and
  **   (e) the cursor points at a valid row of an intKey table.







>
>
>
>

|
|
<
<







8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389


8390
8391
8392
8393
8394
8395
8396
  if( pCsr->eState!=CURSOR_VALID ){
    return SQLITE_ABORT;
  }

  /* Save the positions of all other cursors open on this table. This is
  ** required in case any of them are holding references to an xFetch
  ** version of the b-tree page modified by the accessPayload call below.
  **
  ** Note that pCsr must be open on a BTREE_INTKEY table and saveCursorPosition()
  ** and hence saveAllCursors() cannot fail on a BTREE_INTKEY table, hence
  ** saveAllCursors can only return SQLITE_OK.
  */
  VVA_ONLY(rc =) saveAllCursors(pCsr->pBt, pCsr->pgnoRoot, pCsr);
  assert( rc==SQLITE_OK );



  /* Check some assumptions: 
  **   (a) the cursor is open for writing,
  **   (b) there is a read/write transaction open,
  **   (c) the connection holds a write-lock on the table (if required),
  **   (d) there are no conflicting read-locks, and
  **   (e) the cursor points at a valid row of an intKey table.