aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-01-20 19:19:24 +0000
committerdrh <>2023-01-20 19:19:24 +0000
commit42d652c0472793cd7b985c20a762cd24f4962bc3 (patch)
treea7c20e4775e891532dadd1cd917dfc58739f8a32 /src
parentd993b15aa3615ef0cf8e8117156b00b03d65c1bf (diff)
downloadsqlite-42d652c0472793cd7b985c20a762cd24f4962bc3.tar.gz
sqlite-42d652c0472793cd7b985c20a762cd24f4962bc3.zip
Two branches associated with memdb are now always taken (I believe). Tag
them with ALWAYS() to verify this. FossilOrigin-Name: 20b9b5aa4fa6136059cf1123f00d86cb7bd8fb0f0f86f971e9714f22725e60b5
Diffstat (limited to 'src')
-rw-r--r--src/attach.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attach.c b/src/attach.c
index 917fcad67..ae19adb89 100644
--- a/src/attach.c
+++ b/src/attach.c
@@ -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 ){