mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-10 01:02:56 +03:00
Provide a compile-time option to enable exclusive access mode by default. (CVS 3800)
FossilOrigin-Name: 93a41510f02dc5649dbbc22c4e4fbee545bd76d8
This commit is contained in:
12
src/main.c
12
src/main.c
@@ -14,7 +14,7 @@
|
||||
** other files are for internal use by SQLite and should not be
|
||||
** accessed by users of the library.
|
||||
**
|
||||
** $Id: main.c,v 1.367 2007/03/31 15:28:00 drh Exp $
|
||||
** $Id: main.c,v 1.368 2007/04/02 16:40:38 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -977,6 +977,16 @@ static int openDatabase(
|
||||
}
|
||||
#endif
|
||||
|
||||
/* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking
|
||||
** mode. -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking
|
||||
** mode. Doing nothing at all also makes NORMAL the default.
|
||||
*/
|
||||
#ifdef SQLITE_DEFAULT_LOCKING_MODE
|
||||
db->dfltLockMode = SQLITE_DEFAULT_LOCKING_MODE;
|
||||
sqlite3PagerLockingMode(sqlite3BtreePager(db->aDb[0].pBt),
|
||||
SQLITE_DEFAULT_LOCKING_MODE);
|
||||
#endif
|
||||
|
||||
opendb_out:
|
||||
if( SQLITE_NOMEM==(rc = sqlite3_errcode(db)) ){
|
||||
sqlite3_close(db);
|
||||
|
Reference in New Issue
Block a user