1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +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

@@ -303,6 +303,7 @@ struct Vdbe {
u8 isPrepareV2; /* True if prepared with prepare_v2() */
int nChange; /* Number of db changes made since last reset */
yDbMask btreeMask; /* Bitmask of db->aDb[] entries referenced */
yDbMask lockMask; /* Subset of btreeMask that requires a lock */
int iStatement; /* Statement number (or 0 if has not opened stmt) */
int aCounter[3]; /* Counters used by sqlite3_stmt_status() */
#ifndef SQLITE_OMIT_TRACE