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

Fix an assert in btree.c that can be false when using a corrupted database

file.

FossilOrigin-Name: a6eb2a39357c35dc13d549ef86c785ff5c69938a
This commit is contained in:
drh
2015-05-22 12:37:37 +00:00
parent acd3374556
commit 499e15bee1
3 changed files with 9 additions and 8 deletions

View File

@@ -7860,7 +7860,8 @@ static int btreeCreateTable(Btree *p, int *piTable, int createTabFlags){
pgnoRoot==PENDING_BYTE_PAGE(pBt) ){
pgnoRoot++;
}
assert( pgnoRoot>=3 );
assert( pgnoRoot>=3 || CORRUPT_DB );
testcase( pgnoRoot<3 );
/* Allocate a page. The page that currently resides at pgnoRoot will
** be moved to the allocated page (unless the allocated page happens