SQLite

Check-in [93a41510f0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Provide a compile-time option to enable exclusive access mode by default. (CVS 3800)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 93a41510f02dc5649dbbc22c4e4fbee545bd76d8
User & Date: drh 2007-04-02 16:40:38.000
Context
2007-04-02
16:45
If preprocessor macro OS_OTHER is defined, then ignore OS_UNIX, OS_WIN, and OS_OS2. This makes it easier to add proprietary backends.. (CVS 3801) (check-in: 4fdafd3f58 user: drh tags: trunk)
16:40
Provide a compile-time option to enable exclusive access mode by default. (CVS 3800) (check-in: 93a41510f0 user: drh tags: trunk)
15:31
Version 3.3.14 (CVS 3799) (check-in: 3dbf4f98ac user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to src/main.c.
10
11
12
13
14
15
16
17

18
19
20
21
22
23
24
10
11
12
13
14
15
16

17
18
19
20
21
22
23
24







-
+







**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** 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"
#include <ctype.h>

/*
** The version of the library
972
973
974
975
976
977
978










979
980
981
982
983
984
985
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995







+
+
+
+
+
+
+
+
+
+








#ifdef SQLITE_ENABLE_FTS2
  {
    extern int sqlite3Fts2Init(sqlite3*);
    sqlite3Fts2Init(db);
  }
#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);
    db = 0;
  }
  *ppDb = db;