]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix locking bug in btshared.c. (CVS 4313)
authordrh <drh@noemail.net>
Tue, 28 Aug 2007 16:44:20 +0000 (16:44 +0000)
committerdrh <drh@noemail.net>
Tue, 28 Aug 2007 16:44:20 +0000 (16:44 +0000)
FossilOrigin-Name: af24e7d01a7fab5e33080a0f786e0bc6f610a6f3

manifest
manifest.uuid
src/btmutex.c

index 45b9e20fbbbd6b6f8e8b3df7fe0b7bde4fc30c99..f5fcaf272dd616e925da413a3c3e738256f39c87 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Break\sup\sthe\smutex\simplementation\sinto\sseparate\ssource\sfiles,\sone\neach\sfor\sunix,\sw32,\sand\sos2.\s(CVS\s4312)
-D 2007-08-28T16:34:43
+C Fix\slocking\sbug\sin\sbtshared.c.\s(CVS\s4313)
+D 2007-08-28T16:44:20
 F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -80,7 +80,7 @@ F src/alter.c fd78c6005456c727a6cb7c01c5266f2aacf6d401
 F src/analyze.c a14237d869c6bea0846493b59317e4097e81a0b6
 F src/attach.c a52225c75b107be8c5bc144a2b6d20201be3f8f8
 F src/auth.c 083c1205b45e3f52291ec539d396b4fc557856b3
-F src/btmutex.c e11c59a7a68d9f295a1abfb753ffa4755b5037b1
+F src/btmutex.c 3a19fcb311d0d09e63d397779be881d4273f4518
 F src/btree.c 850cd5de860e01233153ade9b24ffc775a794e8e
 F src/btree.h a8fb26c56b745b57446c2bf29133619261313051
 F src/btreeInt.h c1ba892252bc4dd76ad66da056536c64b23456e3
@@ -567,7 +567,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P 5f55b2fc4ecdfc1bb68f479751b8642926fd8833
-R 51f416da38767e7822a0835f98d9ee97
+P fc5cd71aef5ac194f51d73350d773d532020967e
+R 7b6245a3074068afb2d3762f9a7bccba
 U drh
-Z 49f77ee210b93cd481f8532fcc9bb445
+Z 99b073af6f11ba04ffcb0335f999b621
index 771e6f537c224279d3c18ca2c985e7de3fa98f43..eb04c00295503706b6b09d677b016f3492702927 100644 (file)
@@ -1 +1 @@
-fc5cd71aef5ac194f51d73350d773d532020967e
\ No newline at end of file
+af24e7d01a7fab5e33080a0f786e0bc6f610a6f3
\ No newline at end of file
index 4725910f206af79cbbd17d401e913840c0551b1e..3b4d2737185de221732e6db0ea62c8be1c29a383 100644 (file)
@@ -10,7 +10,7 @@
 **
 *************************************************************************
 **
-** $Id: btmutex.c,v 1.1 2007/08/28 02:27:52 drh Exp $
+** $Id: btmutex.c,v 1.2 2007/08/28 16:44:20 drh Exp $
 **
 ** This file contains code used to implement mutexes on Btree objects.
 ** This code really belongs in btree.c.  But btree.c is getting too
@@ -85,6 +85,7 @@ void sqlite3BtreeEnter(Btree *p){
     }
   }
   sqlite3_mutex_enter(p->pBt->mutex);
+  p->locked = 1;
   for(pLater=p->pNext; pLater; pLater=pLater->pNext){
     if( pLater->wantToLock ){
       sqlite3_mutex_enter(pLater->pBt->mutex);
@@ -168,6 +169,7 @@ void sqlite3BtreeMutexSetEnter(BtreeMutexSet *pSet){
     p->wantToLock++;
     if( !p->locked ){
       sqlite3_mutex_enter(p->pBt->mutex);
+      p->locked = 1;
     }
   }
 }
@@ -191,6 +193,7 @@ void sqlite3BtreeMutexSetLeave(BtreeMutexSet *pSet){
     p->wantToLock--;
     if( p->wantToLock==0 ){
       sqlite3_mutex_leave(p->pBt->mutex);
+      p->locked = 0;
     }
   }
 }