1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Avoid unnecessary calls to sqlite3BtreeEnterAll() and sqlite3BtreeLeaveAll()

when no btree is using shared-cache.

FossilOrigin-Name: cfb3158204628eb2fd170090a7f212df0e4ce6c9
This commit is contained in:
drh
2017-01-02 18:19:29 +00:00
parent 197231b160
commit 38eef32172
5 changed files with 25 additions and 14 deletions

View File

@@ -137,6 +137,7 @@ static void attachFunc(
rc = sqlite3BtreeOpen(pVfs, zPath, db, &aNew->pBt, 0, flags);
sqlite3_free( zPath );
db->nDb++;
db->skipBtreeMutex = 0;
if( rc==SQLITE_CONSTRAINT ){
rc = SQLITE_ERROR;
zErrDyn = sqlite3MPrintf(db, "database is already attached");