diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-06-26 08:29:34 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-06-26 08:29:34 +0000 |
commit | 71bc31c68d1228c5ca8fcc6e50f5a77a91a06b97 (patch) | |
tree | 8426069ec3b504f6e836b5be6bb912e75e8959a0 /src/sqliteInt.h | |
parent | 4766b29d95d59a4d7e88b8d644a568d406643271 (diff) | |
download | sqlite-71bc31c68d1228c5ca8fcc6e50f5a77a91a06b97.tar.gz sqlite-71bc31c68d1228c5ca8fcc6e50f5a77a91a06b97.zip |
Fix a race condition in sqlite3_initialize(). (CVS 5310)
FossilOrigin-Name: 70b2ed2afcf1757d1c58f3a83dad4a5fb226ae63
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 65c374d40..942396a6f 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.729 2008/06/25 17:19:01 danielk1977 Exp $ +** @(#) $Id: sqliteInt.h,v 1.730 2008/06/26 08:29:34 danielk1977 Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -1734,12 +1734,6 @@ typedef struct { ** Structure containing global configuration data for the SQLite library. ** ** This structure also contains some state information. -** -** The Sqlite3Config.isInit variable indicates whether or not -** sqlite3_initialize() has already been called or not. Initially, isInit -** is 0. While sqlite3_initialize() is running, it is set to 1. After -** sqlite3_initialize has successfully run, the Sqlite3Config.isInit variable -** is set to 2. Calling sqlite3_shutdown() resets the value to 0. */ struct Sqlite3Config { int bMemstat; /* True to enable memory status */ @@ -1756,7 +1750,9 @@ struct Sqlite3Config { void *pPage; /* Page cache memory */ int szPage; /* Size of each page in pPage[] */ int nPage; /* Number of pages in pPage[] */ - int isInit; /* Initialization state */ + int isInit; /* True after initialization has finished */ + int isMallocInit; /* True after malloc is initialized */ + sqlite3_mutex *pInitMutex; /* Mutex used by sqlite3_initialize() */ }; /* |