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

Remove dead code from the OP_JournalMode opcode in the VDBE.

This code seems to have been useless since [f88c6367d2] on [20010-08-07].

FossilOrigin-Name: a89f24e2c9591d09cbe329895ceec87885059184
This commit is contained in:
drh
2011-04-05 18:34:10 +00:00
parent e54e051800
commit 8d4991e7ba
3 changed files with 7 additions and 25 deletions

View File

@@ -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);