1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

A complete run of quick.test with mutex debugging enabled. (CVS 4266)

FossilOrigin-Name: 783e07d561d1f5509de9475f3b9f38315f247002
This commit is contained in:
drh
2007-08-22 02:56:42 +00:00
parent 86f8c197dd
commit 27641703cc
17 changed files with 238 additions and 156 deletions

View File

@@ -13,7 +13,7 @@
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
** $Id: test3.c,v 1.80 2007/08/21 10:44:16 drh Exp $
** $Id: test3.c,v 1.81 2007/08/22 02:56:44 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -78,6 +78,7 @@ static int btree_open(
if( nRefSqlite3==1 ){
sDb.pVfs = sqlite3_vfs_find(0);
sDb.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_RECURSIVE);
sqlite3_mutex_enter(sDb.mutex);
}
rc = sqlite3BtreeOpen(argv[1], &sDb, &pBt, flags);
if( rc!=SQLITE_OK ){
@@ -116,6 +117,7 @@ static int btree_close(
}
nRefSqlite3--;
if( nRefSqlite3==0 ){
sqlite3_mutex_leave(sDb.mutex);
sqlite3_mutex_free(sDb.mutex);
sDb.mutex = 0;
sqlite3_vfs_release(sDb.pVfs);
@@ -124,6 +126,7 @@ static int btree_close(
return TCL_OK;
}
/*
** Usage: btree_begin_transaction ID
**
@@ -528,6 +531,7 @@ static int btree_pager_stats(
return TCL_ERROR;
}
pBt = sqlite3TextToPtr(argv[1]);
sqlite3BtreeEnter(pBt);
a = sqlite3PagerStats(sqlite3BtreePager(pBt));
for(i=0; i<11; i++){
static char *zName[] = {
@@ -539,6 +543,7 @@ static int btree_pager_stats(
sqlite3_snprintf(sizeof(zBuf), zBuf,"%d",a[i]);
Tcl_AppendElement(interp, zBuf);
}
sqlite3BtreeLeave(pBt);
return TCL_OK;
}