1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Change the journal_mode pragma to remove the "default journal mode" concept.

The journal_mode pragma only effects currently attached databases and does 
not change the behavior of future attachments.

FossilOrigin-Name: e396184cd3bdb96e29ac33af5d1f631cac553341
This commit is contained in:
drh
2010-07-08 17:40:37 +00:00
parent 4677ddff7e
commit c6b2a0ff99
10 changed files with 66 additions and 77 deletions

View File

@@ -143,8 +143,6 @@ static void attachFunc(
}
pPager = sqlite3BtreePager(aNew->pBt);
sqlite3PagerLockingMode(pPager, db->dfltLockMode);
/* journal_mode set by the OP_JournalMode opcode that will following
** the OP_Function opcode that invoked this function. */
sqlite3BtreeSecureDelete(aNew->pBt,
sqlite3BtreeSecureDelete(db->aDb[0].pBt,-1) );
}
@@ -340,17 +338,6 @@ static void codeAttach(
sqlite3VdbeChangeP5(v, (u8)(pFunc->nArg));
sqlite3VdbeChangeP4(v, -1, (char *)pFunc, P4_FUNCDEF);
if( type==SQLITE_ATTACH ){
/* On an attach, also set the journal mode. Note that
** sqlite3VdbeUsesBtree() is not call here since the iDb index
** will be out of range prior to the new database being attached.
** The OP_JournalMode opcode will all sqlite3VdbeUsesBtree() for us.
*/
sqlite3VdbeAddOp3(v, OP_JournalMode, db->nDb, regArgs+3,
db->dfltJournalMode);
sqlite3VdbeChangeP5(v, 1);
}
/* Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this
** statement only). For DETACH, set it to false (expire all existing
** statements).