aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vdbe.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/vdbe.c b/src/vdbe.c
index d2e60a570..ce62d7f12 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -5300,24 +5300,6 @@ case OP_JournalMode: { /* out2-prerelease */
);
assert( pOp->p1>=0 && pOp->p1<db->nDb );
- /* This opcode is used in two places: PRAGMA journal_mode and ATTACH.
- ** In PRAGMA journal_mode, the sqlite3VdbeUsesBtree() routine is called
- ** when the statement is prepared and so p->btreeMask!=0. All mutexes
- ** are already acquired. But when used in ATTACH, sqlite3VdbeUsesBtree()
- ** is not called when the statement is prepared because it requires the
- ** iDb index of the database as a parameter, and the database has not
- ** yet been attached so that index is unavailable. We have to wait
- ** until runtime (now) to get the mutex on the newly attached database.
- ** No other mutexes are required by the ATTACH command so this is safe
- ** to do.
- */
- if( p->btreeMask==0 ){
- /* This occurs right after ATTACH. Get a mutex on the newly ATTACHed
- ** database. */
- sqlite3VdbeUsesBtree(p, pOp->p1);
- sqlite3VdbeEnter(p);
- }
-
pBt = db->aDb[pOp->p1].pBt;
pPager = sqlite3BtreePager(pBt);
eOld = sqlite3PagerGetJournalMode(pPager);