-C Add\stests\sfor\smalloc()\sfailure\swhen\sthe\satomic-write\soptimization\sis\sbeing\sused.\sAlso\sfix\sthings\sso\sthat\srollback\scan\soccur\swithout\sa\smalloc(),\seven\sif\sthere\sis\sa\smaster\sjournal\sfile.\s(CVS\s4330)
-D 2007-08-30T08:08:17
+C Fix\sa\sbug\sin\sa\stest\sfile\scausing\smalloc5.test\sto\scrash.\s(CVS\s4331)
+D 2007-08-30T08:27:40
F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3
F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
F src/tclsqlite.c d76af53f45c9e9f7f7d39531fa4c7bee7d0adad6
F src/test1.c 8b20d1f05777ac480d3caf8d5f79ab7a543513fc
F src/test2.c 4ab230fbdc0decfa7422f6a052b609ba54f4dfac
-F src/test3.c 09098991c3a94a1c7f54d28888fca2951d459585
+F src/test3.c 199a440ba2b38b26251393b609451a3484a15907
F src/test4.c c2c0f5dc907f1346f5d4b65eb5799f11eb9e4071
F src/test5.c 3a6a5717a149d7ca2e6d14f5be72cf7555d54dc4
F src/test6.c a6223d9d938aba83f20611a2c01680d8043cd2f7
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
-P cddce4950569ac49c1a5224b200b00dcd83a2ba4
-R e861f1719df1b7e8bf2776501010b8d3
+P 481fd3a89e50e329596d96565170e3d9977aae29
+R d13eabcd88c2079e0e183a72f4935be0
U danielk1977
-Z d772ae35eed9ac8826bc4538e7174609
+Z 1ec28bb5a6454a9a162a1baa77f48c30
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test3.c,v 1.84 2007/08/29 17:43:20 drh Exp $
+** $Id: test3.c,v 1.85 2007/08/30 08:27:40 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "btreeInt.h"
return TCL_ERROR;
}
pBt = sqlite3TextToPtr(argv[1]);
+
+ /* Normally in this file, with a b-tree handle opened using the
+ ** [btree_open] command it is safe to call sqlite3BtreeEnter() directly.
+ ** But this function is sometimes called with a btree handle obtained
+ ** from an open SQLite connection (using [btree_from_db]). In this case
+ ** we need to obtain the mutex for the controlling SQLite handle before
+ ** it is safe to call sqlite3BtreeEnter().
+ */
+ sqlite3_mutex_enter(pBt->pSqlite->mutex);
+
sqlite3BtreeEnter(pBt);
a = sqlite3PagerStats(sqlite3BtreePager(pBt));
for(i=0; i<11; i++){
Tcl_AppendElement(interp, zBuf);
}
sqlite3BtreeLeave(pBt);
+
+ /* Release the mutex on the SQLite handle that controls this b-tree */
+ sqlite3_mutex_leave(pBt->pSqlite->mutex);
return TCL_OK;
}