1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Two branches associated with memdb are now always taken (I believe). Tag

them with ALWAYS() to verify this.

FossilOrigin-Name: 20b9b5aa4fa6136059cf1123f00d86cb7bd8fb0f0f86f971e9714f22725e60b5
This commit is contained in:
drh
2023-01-20 19:19:24 +00:00
parent d993b15aa3
commit 42d652c047
3 changed files with 10 additions and 10 deletions

View File

@@ -116,7 +116,7 @@ static void attachFunc(
** Close the old db and update the aDb[] slot with the new memdb
** values. */
pNew = &db->aDb[db->init.iDb];
if( pNew->pBt ) sqlite3BtreeClose(pNew->pBt);
if( ALWAYS(pNew->pBt) ) sqlite3BtreeClose(pNew->pBt);
pNew->pBt = pNewBt;
pNew->pSchema = pNewSchema;
}else{
@@ -237,7 +237,7 @@ static void attachFunc(
}
#endif
if( rc ){
if( !REOPEN_AS_MEMDB(db) ){
if( ALWAYS(!REOPEN_AS_MEMDB(db)) ){
int iDb = db->nDb - 1;
assert( iDb>=2 );
if( db->aDb[iDb].pBt ){