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

Add an assert() to check that the database mutex is held in sqlite3BtreeLeave().

FossilOrigin-Name: 31f54d7b0798e70da6a60b8ea3c5d9e35dce164c
This commit is contained in:
dan
2015-03-19 15:04:23 +00:00
parent ba132c7728
commit b77009fdd9
3 changed files with 9 additions and 8 deletions

View File

@@ -141,6 +141,7 @@ static void SQLITE_NOINLINE btreeLockCarefully(Btree *p){
** Exit the recursive mutex on a Btree.
*/
void sqlite3BtreeLeave(Btree *p){
assert( sqlite3_mutex_held(p->db->mutex) );
if( p->sharable ){
assert( p->wantToLock>0 );
p->wantToLock--;