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

Add a NEVER macro around a test in btree.c that can not longer be true.

FossilOrigin-Name: c117f99236a009778bb7878da464918554391f0a
This commit is contained in:
drh
2010-03-30 15:51:12 +00:00
parent 7ba4597135
commit bf59283ba2
3 changed files with 25 additions and 9 deletions

View File

@@ -6882,8 +6882,14 @@ static int btreeCreateTable(Btree *p, int *piTable, int flags){
releasePage(pRoot);
return rc;
}
/* When the new root page was allocated, page 1 was made writable in
** order either to increase the database filesize, or to decrement the
** freelist count. Hence, the sqlite3BtreeUpdateMeta() call cannot fail.
*/
assert( sqlite3PagerIswriteable(pBt->pPage1->pDbPage) );
rc = sqlite3BtreeUpdateMeta(p, 4, pgnoRoot);
if( rc ){
if( NEVER(rc) ){
releasePage(pRoot);
return rc;
}