/ Check-in [b2a72be9]
Login

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

Overview
Comment:Release resources prior to bailing out of the btreeCreateTable() routine following an OOM error.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental-mmap
Files: files | file ages | folders
SHA1: b2a72be9bab77f050bef75477a278a6294d3e854
User & Date: drh 2013-04-03 21:23:28
Context
2013-04-04
00:40
Try to use mmap() to speed access to the database file on windows, linux, and mac. check-in: fff2be60 user: drh tags: trunk
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
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  7238   7238         u8 eType = 0;
  7239   7239         Pgno iPtrPage = 0;
  7240   7240   
  7241   7241         /* Save the positions of any open cursors. This is required in
  7242   7242         ** case they are holding a reference to an xFetch reference
  7243   7243         ** corresponding to page pgnoRoot.  */
  7244   7244         rc = saveAllCursors(pBt, 0, 0);
         7245  +      releasePage(pPageMove);
  7245   7246         if( rc!=SQLITE_OK ){
  7246   7247           return rc;
  7247   7248         }
  7248   7249   
  7249         -      releasePage(pPageMove);
  7250         -
  7251   7250         /* Move the page currently at pgnoRoot to pgnoMove. */
  7252   7251         rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0, 0);
  7253   7252         if( rc!=SQLITE_OK ){
  7254   7253           return rc;
  7255   7254         }
  7256   7255         rc = ptrmapGet(pBt, pgnoRoot, &eType, &iPtrPage);
  7257   7256         if( eType==PTRMAP_ROOTPAGE || eType==PTRMAP_FREEPAGE ){