mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Fix an assertion fault in balance_quick() that occurs when an interior
btree node has zero cells due to database corruption. Also update the corrupt7.test result vectors for a couple of cases where the error report on database corruption changed due to earlier detection. (CVS 6717) FossilOrigin-Name: 1335e4440f5a3d24ce9ce187e0e23fc9b166ca98
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** $Id: btree.c,v 1.615 2009/06/04 16:14:34 drh Exp $
|
||||
** $Id: btree.c,v 1.616 2009/06/04 17:02:51 drh Exp $
|
||||
**
|
||||
** This file implements a external (disk-based) database using BTrees.
|
||||
** See the header comment on "btreeInt.h" for additional information.
|
||||
@@ -5205,7 +5205,7 @@ static int balance_quick(BtCursor *pCur){
|
||||
Pgno pgnoNew; /* Page number of pNew */
|
||||
|
||||
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
|
||||
assert( pPage->nCell>0 );
|
||||
if( pPage->nCell<=0 ) return SQLITE_CORRUPT_BKPT;
|
||||
|
||||
/* Allocate a new page. This page will become the right-sibling of pPage */
|
||||
rc = allocateBtreePage(pBt, &pNew, &pgnoNew, 0, 0);
|
||||
|
Reference in New Issue
Block a user