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

Fix a performance regression: Keep two btree masks in each prepared

statement; one for btrees used and another for btrees that require locks.
Only try to lock the btrees identified by the second mask.

FossilOrigin-Name: 614de91a504d2231009a9de1305e31fce1b1c5a6
This commit is contained in:
drh
2011-04-06 22:05:53 +00:00
parent dc5df0f824
commit dc5b047ec3
7 changed files with 44 additions and 24 deletions

View File

@@ -203,6 +203,14 @@ void sqlite3BtreeLeaveAll(sqlite3 *db){
}
}
/*
** Return true if a particular Btree requires a lock. Return FALSE if
** no lock is ever required since it is not sharable.
*/
int sqlite3BtreeSharable(Btree *p){
return p->sharable;
}
#ifndef NDEBUG
/*
** Return true if the current thread holds the database connection