1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Fix slightly-incorrect assert() statements.

[forum:/forumpost/f1e83b77b5ff37db|Forum post f1e83b77b5ff37db]

FossilOrigin-Name: 3c9f5c9defd7d36684132ae4ade9db2e2148dad4bd91bfe9374620ecafc35348
This commit is contained in:
drh
2022-03-01 15:48:16 +00:00
parent 90368c5dcb
commit e7fae604a0
4 changed files with 11 additions and 10 deletions

View File

@@ -9041,7 +9041,7 @@ int sqlite3BtreeInsert(
assert( pPage->intKey || pX->nKey>=0 || (flags & BTREE_PREFORMAT) );
assert( pPage->leaf || !pPage->intKey );
if( pPage->nFree<0 ){
if( NEVER(pCur->eState>CURSOR_INVALID) ){
if( pCur->eState>CURSOR_INVALID ){
rc = SQLITE_CORRUPT_BKPT;
}else{
rc = btreeComputeFreeSpace(pPage);