]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
If the SQLITE_EXTRA_INIT function is defined, make sure it is called only
authordrh <drh@noemail.net>
Thu, 8 Aug 2013 14:38:45 +0000 (14:38 +0000)
committerdrh <drh@noemail.net>
Thu, 8 Aug 2013 14:38:45 +0000 (14:38 +0000)
once by the effective sqlite3_initialize() call.

FossilOrigin-Name: e2b597cafe7c8a8313b051d6a302fed54f235727

manifest
manifest.uuid
src/main.c

index c9e8d0b68242bf6e06655b4e039a682ab7d6fd51..6cc104b469c3cb1e03395cbd466d1b01023450ee 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C If\sthe\sSQLITE_ALLOW_URI_AUTHORITY\scompile-time\soption\sis\sset,\sthen\sallow\nnon-localhost\sauthorities\son\sURI\sfilenames\sand\spass\sthem\sthrough\sas\sa\sUNC\nto\sthe\sunderlying\sVFS.
-D 2013-08-07T23:15:52.266
+C If\sthe\sSQLITE_EXTRA_INIT\sfunction\sis\sdefined,\smake\ssure\sit\sis\scalled\sonly\nonce\sby\sthe\seffective\ssqlite3_initialize()\scall.
+D 2013-08-08T14:38:45.404
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -185,7 +185,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d
 F src/legacy.c 0df0b1550b9cc1f58229644735e317ac89131f12
 F src/lempar.c cdf0a000315332fc9b50b62f3b5e22e080a0952b
 F src/loadext.c 867c7b330b740c6c917af9956b13b81d0a048303
-F src/main.c 482135b0bf855d621ef10c5bb56c63df23b2ddec
+F src/main.c f6eb795f17eb88205b55e5116fb37e6593707d82
 F src/malloc.c fe085aa851b666b7c375c1ff957643dc20a04bf6
 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
 F src/mem1.c 437c7c4af964895d4650f29881df63535caaa1fa
@@ -1105,7 +1105,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
 F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
-P 0ad83ceb79767738bd06a28840cf84da0464ab4f
-R a230045986289598d392f4ac16d8f85f
+P 3adb6c1bfda897859dc9cf9ae7f1e6719855ee68
+R f58cae922c11c825e7cdfcd2f4c52823
 U drh
-Z 3dff46ea9ed1198b77cd17bced6ea4de
+Z 6adac74ecb750c6ba6eb610c8156f9d8
index bb59190386ca4a601436dc1ccffbb7768109f173..cb24e03baad7ecdcfbfff5c462bcd94aa7fad934 100644 (file)
@@ -1 +1 @@
-3adb6c1bfda897859dc9cf9ae7f1e6719855ee68
\ No newline at end of file
+e2b597cafe7c8a8313b051d6a302fed54f235727
\ No newline at end of file
index 9e8a6ed06387030ead968c9c3996e0af2d60ea2b..217221d2380a5bb66a3ddf03ee175bcd230e1808 100644 (file)
@@ -117,6 +117,9 @@ char *sqlite3_data_directory = 0;
 int sqlite3_initialize(void){
   MUTEX_LOGIC( sqlite3_mutex *pMaster; )       /* The main static mutex */
   int rc;                                      /* Result code */
+#ifdef SQLITE_EXTRA_INIT
+  int bRunExtraInit = 0;                       /* Extra initialization needed */
+#endif
 
 #ifdef SQLITE_OMIT_WSD
   rc = sqlite3_wsd_init(4096, 24);
@@ -214,6 +217,9 @@ int sqlite3_initialize(void){
       sqlite3PCacheBufferSetup( sqlite3GlobalConfig.pPage, 
           sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage);
       sqlite3GlobalConfig.isInit = 1;
+#ifdef SQLITE_EXTRA_INIT
+      bRunExtraInit = 1;
+#endif
     }
     sqlite3GlobalConfig.inProgress = 0;
   }
@@ -254,7 +260,7 @@ int sqlite3_initialize(void){
   ** compile-time option.
   */
 #ifdef SQLITE_EXTRA_INIT
-  if( rc==SQLITE_OK && sqlite3GlobalConfig.isInit ){
+  if( bRunExtraInit ){
     int SQLITE_EXTRA_INIT(const char*);
     rc = SQLITE_EXTRA_INIT(0);
   }