/ Check-in [c6dfc8bd]
Login

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

Overview
Comment:Fix a pager reference count leak in btree that occurs on an OOM following a database page size change. (CVS 6875)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c6dfc8bd3911b4c93969bfc13d9931965feed674
User & Date: drh 2009-07-10 16:51:30
Context
2009-07-11
05:06
Remove unreachable condition from btree.c. (CVS 6876) check-in: 47b40fef user: danielk1977 tags: trunk
2009-07-10
16:51
Fix a pager reference count leak in btree that occurs on an OOM following a database page size change. (CVS 6875) check-in: c6dfc8bd user: drh tags: trunk
09:24
Fix a double-free that can occur when using the fts3 legacy syntax '-' operator. Add tests for the same operator. Ticket #3960. (CVS 6874) check-in: c19d419e user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

     5      5   ** a legal notice, here is a blessing:
     6      6   **
     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12         -** $Id: btree.c,v 1.673 2009/07/10 02:52:21 drh Exp $
           12  +** $Id: btree.c,v 1.674 2009/07/10 16:51:30 drh Exp $
    13     13   **
    14     14   ** This file implements a external (disk-based) database using BTrees.
    15     15   ** See the header comment on "btreeInt.h" for additional information.
    16     16   ** Including a description of file format and an overview of operation.
    17     17   */
    18     18   #include "btreeInt.h"
    19     19   
................................................................................
  2244   2244         */
  2245   2245         releasePage(pPage1);
  2246   2246         pBt->usableSize = (u16)usableSize;
  2247   2247         pBt->pageSize = (u16)pageSize;
  2248   2248         freeTempSpace(pBt);
  2249   2249         rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize,
  2250   2250                                      pageSize-usableSize);
  2251         -      if( rc ) goto page1_init_failed;
  2252         -      return SQLITE_OK;
         2251  +      return rc;
  2253   2252       }
  2254   2253       if( usableSize<480 ){
  2255   2254         goto page1_init_failed;
  2256   2255       }
  2257   2256       pBt->pageSize = (u16)pageSize;
  2258   2257       pBt->usableSize = (u16)usableSize;
  2259   2258   #ifndef SQLITE_OMIT_AUTOVACUUM