aboutsummaryrefslogtreecommitdiff
path: root/src/wherecode.c
diff options
context:
space:
mode:
authordrh <>2022-08-22 02:00:26 +0000
committerdrh <>2022-08-22 02:00:26 +0000
commit41ce47c4f4bcae3882fdccec18a6100a85f4bba5 (patch)
treec756e648b83220679d2e330445822f0b5c25bce3 /src/wherecode.c
parent05cb948bf782cbcbd8e8ecffdddcd2fe807f5d08 (diff)
downloadsqlite-41ce47c4f4bcae3882fdccec18a6100a85f4bba5.tar.gz
sqlite-41ce47c4f4bcae3882fdccec18a6100a85f4bba5.zip
Add the new internal interface sqlite3DbNNFreeNN(db,ptr) where both the
db and ptr parameters are guaranteed to be non-NULL. Use this where appropriate to save more than 2 million CPU cycles on the standard performance test. FossilOrigin-Name: e5eaa80e81fdf86f2875a912b880272b8d099b82b08e945a7988c5dd0fe9d6b5
Diffstat (limited to 'src/wherecode.c')
-rw-r--r--src/wherecode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index 85df64279..4c34ea0dc 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -2109,8 +2109,8 @@ Bitmask sqlite3WhereCodeOneLoopStart(
}
nConstraint++;
}
- sqlite3DbFree(db, zStartAff);
- sqlite3DbFree(db, zEndAff);
+ if( zStartAff ) sqlite3DbNNFreeNN(db, zStartAff);
+ if( zEndAff ) sqlite3DbNNFreeNN(db, zEndAff);
/* Top of the loop body */
if( pLevel->p2==0 ) pLevel->p2 = sqlite3VdbeCurrentAddr(v);