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

Add the journal_mode pragma. This is currently just syntax - it is not

operational. (CVS 5024)

FossilOrigin-Name: 8eaa0c71023ac428f6f9f8091341584caa773ab9
This commit is contained in:
drh
2008-04-17 17:02:01 +00:00
parent f3a87624a2
commit 3b02013e73
7 changed files with 109 additions and 18 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.74 2008/03/20 14:03:29 drh Exp $
** $Id: attach.c,v 1.75 2008/04/17 17:02:01 drh Exp $
*/
#include "sqliteInt.h"
@@ -137,6 +137,7 @@ static void attachFunc(
db->openFlags | SQLITE_OPEN_MAIN_DB,
&aNew->pBt);
if( rc==SQLITE_OK ){
Pager *pPager;
aNew->pSchema = sqlite3SchemaGet(db, aNew->pBt);
if( !aNew->pSchema ){
rc = SQLITE_NOMEM;
@@ -145,7 +146,9 @@ static void attachFunc(
"attached databases must use the same text encoding as main database");
goto attach_error;
}
sqlite3PagerLockingMode(sqlite3BtreePager(aNew->pBt), db->dfltLockMode);
pPager = sqlite3BtreePager(aNew->pBt);
sqlite3PagerLockingMode(pPager, db->dfltLockMode);
sqlite3PagerJournalMode(pPager, db->dfltJournalMode);
}
aNew->zName = sqlite3DbStrDup(db, zName);
aNew->safety_level = 3;