From 3eb8db90ba47b2b89f14e9edd5dbc84f586a1b51 Mon Sep 17 00:00:00 2001 From: danielk1977 Date: Tue, 29 Mar 2005 23:34:58 +0000 Subject: [PATCH] Fix a problem with threads and the global database list in main.c. (CVS 2434) FossilOrigin-Name: 4aa05d2251b0cf6323ea695330de9ccf7e071bed --- manifest | 14 +++++++------- manifest.uuid | 2 +- src/main.c | 5 +++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/manifest b/manifest index 9c532da98a..a3753cbd6a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Version\s3.2.1\s(CVS\s2433) -D 2005-03-29T13:37:46 +C Fix\sa\sproblem\swith\sthreads\sand\sthe\sglobal\sdatabase\slist\sin\smain.c.\s(CVS\s2434) +D 2005-03-29T23:34:58 F Makefile.in 5c00d0037104de2a50ac7647a5f12769795957a3 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -42,7 +42,7 @@ F src/hash.c 2b1b13f7400e179631c83a1be0c664608c8f021f F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84 F src/insert.c 34c25c33f51a43644a42cc091ac967b070c6b6d5 F src/legacy.c d58ea507bce885298a2c8c3cbb0f4bff5d47830b -F src/main.c 531fab947f72d3b6e86476ed4594838a2fa277f5 +F src/main.c 336ab4bf0e398471a0607875f9b90b698b49ce92 F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070 F src/os.h 0c805df3df02b98eb78a7a86756c3cbd4e190939 F src/os_common.h 0e7f428ba0a6c40a61bc56c4e96f493231301b73 @@ -278,7 +278,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b -P afa42e2fa4487e4671ee481df09659a447f9c2a8 -R 033dbae23f2b3e90549460ac03d826a9 -U drh -Z cf6dcb13b78bca9d8e0428ebc0ec39f2 +P 844f01af726f5e478a4ef32f39be9f20360a0d96 +R 1c3790c82c48862642a6dbd8402d2f28 +U danielk1977 +Z cea0fd35b8cef97f59b2f45aa29f11bc diff --git a/manifest.uuid b/manifest.uuid index cf8e535da3..37104ba40f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -844f01af726f5e478a4ef32f39be9f20360a0d96 \ No newline at end of file +4aa05d2251b0cf6323ea695330de9ccf7e071bed \ No newline at end of file diff --git a/src/main.c b/src/main.c index 20335a01d3..42a031c699 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.284 2005/03/29 03:10:59 danielk1977 Exp $ +** $Id: main.c,v 1.285 2005/03/29 23:34:58 danielk1977 Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -531,8 +531,9 @@ int sqlite3_close(sqlite3 *db){ #ifndef SQLITE_OMIT_GLOBALRECOVER { - sqlite3 *pPrev = pDbList; + sqlite3 *pPrev; sqlite3OsEnterMutex(); + pPrev = pDbList; while( pPrev && pPrev->pNext!=db ){ pPrev = pPrev->pNext; }