1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Fix an assert that can fail if the database file is corrupted.

FossilOrigin-Name: 3f45b8192dad7fb1f027cbaa694046e3c1b3e278
This commit is contained in:
dan
2014-08-14 19:53:37 +00:00
parent 4ed2fb9d84
commit f216e324f9
4 changed files with 37 additions and 10 deletions

View File

@@ -5741,7 +5741,8 @@ static void insertCell(
if( *pRC ) return;
assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
assert( pPage->nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=10921 );
assert( MX_CELL(pPage->pBt)<=10921 );
assert( pPage->nCell<=MX_CELL(pPage->pBt) || CORRUPT_DB );
assert( pPage->nOverflow<=ArraySize(pPage->apOvfl) );
assert( ArraySize(pPage->apOvfl)==ArraySize(pPage->aiOvfl) );
assert( sqlite3_mutex_held(pPage->pBt->mutex) );