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

Avoid many unnecessary calls to sqlite3ReadSchema() and sqlite3Init() when

the schema is known to be valid already.

FossilOrigin-Name: 58cf812fd81329e82b3fdd61b7ad2040c9b90d2d80f592b9231e0e1902c8d577
This commit is contained in:
drh
2018-04-25 12:01:45 +00:00
parent 3215872446
commit b2c8559fad
7 changed files with 35 additions and 26 deletions

View File

@@ -195,10 +195,10 @@ static void SQLITE_NOINLINE btreeEnterAll(sqlite3 *db){
skipOk = 0;
}
}
db->skipBtreeMutex = skipOk;
db->noSharedCache = skipOk;
}
void sqlite3BtreeEnterAll(sqlite3 *db){
if( db->skipBtreeMutex==0 ) btreeEnterAll(db);
if( db->noSharedCache==0 ) btreeEnterAll(db);
}
static void SQLITE_NOINLINE btreeLeaveAll(sqlite3 *db){
int i;
@@ -210,7 +210,7 @@ static void SQLITE_NOINLINE btreeLeaveAll(sqlite3 *db){
}
}
void sqlite3BtreeLeaveAll(sqlite3 *db){
if( db->skipBtreeMutex==0 ) btreeLeaveAll(db);
if( db->noSharedCache==0 ) btreeLeaveAll(db);
}
#ifndef NDEBUG