/ Check-in [93a41510]
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 | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 93a41510f02dc5649dbbc22c4e4fbee545bd76d8
User & Date: drh 2007-04-02 16:40:38
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: 4fdafd3f user: drh tags: trunk
16:40
Provide a compile-time option to enable exclusive access mode by default. (CVS 3800) check-in: 93a41510 user: drh tags: trunk
15:31
Version 3.3.14 (CVS 3799) check-in: 3dbf4f98 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.367 2007/03/31 15:28:00 drh Exp $
           17  +** $Id: main.c,v 1.368 2007/04/02 16:40:38 drh Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include "os.h"
    21     21   #include <ctype.h>
    22     22   
    23     23   /*
    24     24   ** The version of the library
................................................................................
   972    972   
   973    973   #ifdef SQLITE_ENABLE_FTS2
   974    974     {
   975    975       extern int sqlite3Fts2Init(sqlite3*);
   976    976       sqlite3Fts2Init(db);
   977    977     }
   978    978   #endif
          979  +
          980  +  /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking
          981  +  ** mode.  -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking
          982  +  ** mode.  Doing nothing at all also makes NORMAL the default.
          983  +  */
          984  +#ifdef SQLITE_DEFAULT_LOCKING_MODE
          985  +  db->dfltLockMode = SQLITE_DEFAULT_LOCKING_MODE;
          986  +  sqlite3PagerLockingMode(sqlite3BtreePager(db->aDb[0].pBt),
          987  +                          SQLITE_DEFAULT_LOCKING_MODE);
          988  +#endif
   979    989   
   980    990   opendb_out:
   981    991     if( SQLITE_NOMEM==(rc = sqlite3_errcode(db)) ){
   982    992       sqlite3_close(db);
   983    993       db = 0;
   984    994     }
   985    995     *ppDb = db;