/ Check-in [04fc9c76]
Login

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

Overview
Comment:Remove an assert() in btree.c:releasePage() that is not necessarily true when the btree is recovering from an OOM that occurs in the middle of a balance().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:04fc9c7661dd24d080f965e7eae9010a2d346e6a
User & Date: drh 2009-12-04 22:51:40
Context
2009-12-04
23:10
Add the SQLITE_4_BYTE_ALIGNED_MALLOC compile-time option which tells some assert() statements that the underlying system only requires 4-byte alignment of 8-byte data objects like double or int64 and that system malloc() only guarantees 4-byte alignment of returned pointers. check-in: 08faee68 user: drh tags: trunk
22:51
Remove an assert() in btree.c:releasePage() that is not necessarily true when the btree is recovering from an OOM that occurs in the middle of a balance(). check-in: 04fc9c76 user: drh tags: trunk
19:07
Fix a problem involving a 3-way NEAR query. check-in: 507890a9 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/btree.c.

1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616

/*
** Release a MemPage.  This should be called once for each prior
** call to btreeGetPage.
*/
static void releasePage(MemPage *pPage){
  if( pPage ){
    assert( pPage->nOverflow==0 || sqlite3PagerPageRefcount(pPage->pDbPage)>1 );
    assert( pPage->aData );
    assert( pPage->pBt );
    assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
    assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
    assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    sqlite3PagerUnref(pPage->pDbPage);
  }







<







1602
1603
1604
1605
1606
1607
1608

1609
1610
1611
1612
1613
1614
1615

/*
** Release a MemPage.  This should be called once for each prior
** call to btreeGetPage.
*/
static void releasePage(MemPage *pPage){
  if( pPage ){

    assert( pPage->aData );
    assert( pPage->pBt );
    assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
    assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
    assert( sqlite3_mutex_held(pPage->pBt->mutex) );
    sqlite3PagerUnref(pPage->pDbPage);
  }