SQLite

Check-in [0611770d6a]
Login

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

Overview
Comment:Back out [ec8ff892ac] which is causing missed OOM errors on some tests.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0611770d6a2fcb9fa0bedee19df9916820ae8f3b
User & Date: drh 2017-02-07 03:44:42.867
Context
2017-02-07
12:58
Make the cellMargin() routine of R-Tree slightly smaller and faster while also fixing a harmless compiler warning. (check-in: 07fe622820 user: drh tags: trunk)
03:44
Back out [ec8ff892ac] which is causing missed OOM errors on some tests. (check-in: 0611770d6a user: drh tags: trunk)
00:55
Fix a minor typo in a comment in R-Tree. No changes to code. (check-in: f77ee9e941 user: drh tags: trunk)
2017-02-04
20:15
Simplification to the error handling to extension loading in sqlite3_open(). (check-in: ec8ff892ac user: drh tags: trunk)
Changes
Side-by-Side Diff Show Whitespace Changes Patch
Changes to src/main.c.
2985
2986
2987
2988
2989
2990
2991


2992
2993

2994
2995
2996
2997
2998

2999
3000
3001
3002
3003
3004
3005
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994

2995


2996
2997

2998
2999
3000
3001
3002
3003
3004
3005







+
+

-
+
-
-


-
+








  /* Load automatic extensions - extensions that have been registered
  ** using the sqlite3_automatic_extension() API.
  */
  if( rc==SQLITE_OK ){
    sqlite3AutoLoadExtensions(db);
    rc = sqlite3_errcode(db);
    if( rc!=SQLITE_OK ){
      goto opendb_out;
  }

  }
  testcase( rc!=SQLITE_OK && rc!=SQLITE_NOMEM );
  testcase( rc!=SQLITE_OK && !db->mallocFailed );

#ifdef SQLITE_ENABLE_FTS1
  if( !db->mallocFailed && rc==SQLITE_OK ){
  if( !db->mallocFailed ){
    extern int sqlite3Fts1Init(sqlite3*);
    rc = sqlite3Fts1Init(db);
  }
#endif

#ifdef SQLITE_ENABLE_FTS2
  if( !db->mallocFailed && rc==SQLITE_OK ){
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050


3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3034
3035
3036
3037
3038
3039
3040

3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057

3058
3059
3060
3061
3062
3063
3064







-









+
+






-








#ifdef SQLITE_ENABLE_JSON1
  if( !db->mallocFailed && rc==SQLITE_OK){
    rc = sqlite3Json1Init(db);
  }
#endif

  if( rc==SQLITE_OK ){
    /* -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

  if( rc ) sqlite3Error(db, rc);

    /* Enable the lookaside-malloc subsystem */
    setupLookaside(db, 0, sqlite3GlobalConfig.szLookaside,
                          sqlite3GlobalConfig.nLookaside);

    sqlite3_wal_autocheckpoint(db, SQLITE_DEFAULT_WAL_AUTOCHECKPOINT);
  }

opendb_out:
  if( db ){
    assert( db->mutex!=0 || isThreadsafe==0
           || sqlite3GlobalConfig.bFullMutex==0 );
    sqlite3_mutex_leave(db->mutex);
  }