SQLite

Check-in [dc2cf89743]
Login

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

Overview
Comment:Make sure that the mutex implementation can be altered after calling sqlite3_shutdown().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | mutexInitCmpSwap
Files: files | file ages | folders
SHA1: dc2cf8974337ca1ef705aee4efd4a96b91ca3edd
User & Date: mistachkin 2015-09-11 23:24:50.447
Context
2015-09-12
01:17
Fix typo in the Win32 implementation of sqlite3CompareAndSwap. (check-in: 31a26a1dd7 user: mistachkin tags: mutexInitCmpSwap)
2015-09-11
23:24
Make sure that the mutex implementation can be altered after calling sqlite3_shutdown(). (check-in: dc2cf89743 user: mistachkin tags: mutexInitCmpSwap)
05:06
Enhance mutex initialization to prevent possible race conditions between sqlite3_initialize() and sqlite3_config(). Also, re-check sqlite3GlobalConfig.isInit after the mutex subsystem has been initialized. (check-in: f6a8f57795 user: mistachkin tags: mutexInitCmpSwap)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
330
331
332
333
334
335
336

337
338
339
340
341
342
343
    sqlite3_temp_directory = 0;
#endif
  }
  if( sqlite3GlobalConfig.isMutexInit ){
    sqlite3MutexEnd();
    sqlite3GlobalConfig.isMutexInit = 0;
  }


  return SQLITE_OK;
}

/*
** This API allows applications to modify the global configuration of
** the SQLite library at run-time.







>







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
    sqlite3_temp_directory = 0;
#endif
  }
  if( sqlite3GlobalConfig.isMutexInit ){
    sqlite3MutexEnd();
    sqlite3GlobalConfig.isMutexInit = 0;
  }
  sqlite3GlobalConfig.pMutex = 0;

  return SQLITE_OK;
}

/*
** This API allows applications to modify the global configuration of
** the SQLite library at run-time.