aboutsummaryrefslogtreecommitdiff
path: root/src/test_sqllog.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2020-07-13 18:04:27 +0000
committerdan <dan@noemail.net>2020-07-13 18:04:27 +0000
commita7f82d9f47ca75a2f47dc14f8a8deb6730d718d0 (patch)
treee2000d1d8b1b14297c1a8790c65dd90c4a20e2b9 /src/test_sqllog.c
parent7465787b97a0a09841e343630a07ba80f1399e4a (diff)
parent5b107654e965973e68c88f90a09a3cc53bac9d8b (diff)
downloadsqlite-a7f82d9f47ca75a2f47dc14f8a8deb6730d718d0.tar.gz
sqlite-a7f82d9f47ca75a2f47dc14f8a8deb6730d718d0.zip
Merge latest trunk changes with this branch.
FossilOrigin-Name: 5ee3c27e20d12a126fb773b428bb864102b949a5b26a8d5c523753dcedf4be10
Diffstat (limited to 'src/test_sqllog.c')
-rw-r--r--src/test_sqllog.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/test_sqllog.c b/src/test_sqllog.c
index 9b207cf07..9ae0e5068 100644
--- a/src/test_sqllog.c
+++ b/src/test_sqllog.c
@@ -118,7 +118,7 @@ struct SLConn {
/* This object is a singleton that keeps track of all data loggers.
*/
static struct SLGlobal {
- /* Protected by MUTEX_STATIC_MASTER */
+ /* Protected by MUTEX_STATIC_MAIN */
sqlite3_mutex *mutex; /* Recursive mutex */
int nConn; /* Size of aConn[] array */
@@ -467,28 +467,28 @@ static int sqllogTraceDb(sqlite3 *db){
*/
static void testSqllog(void *pCtx, sqlite3 *db, const char *zSql, int eType){
struct SLConn *p = 0;
- sqlite3_mutex *master = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MASTER);
+ sqlite3_mutex *mainmtx = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_MAIN);
assert( eType==0 || eType==1 || eType==2 );
assert( (eType==2)==(zSql==0) );
/* This is a database open command. */
if( eType==0 ){
- sqlite3_mutex_enter(master);
+ sqlite3_mutex_enter(mainmtx);
if( sqllogglobal.mutex==0 ){
sqllogglobal.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_RECURSIVE);
}
- sqlite3_mutex_leave(master);
+ sqlite3_mutex_leave(mainmtx);
sqlite3_mutex_enter(sqllogglobal.mutex);
if( sqllogglobal.bRec==0 && sqllogTraceDb(db) ){
- sqlite3_mutex_enter(master);
+ sqlite3_mutex_enter(mainmtx);
p = &sqllogglobal.aConn[sqllogglobal.nConn++];
p->fd = 0;
p->db = db;
p->iLog = sqllogglobal.iNextLog++;
- sqlite3_mutex_leave(master);
+ sqlite3_mutex_leave(mainmtx);
/* Open the log and take a copy of the main database file */
sqllogOpenlog(p);
@@ -507,7 +507,7 @@ static void testSqllog(void *pCtx, sqlite3 *db, const char *zSql, int eType){
/* A database handle close command */
if( eType==2 ){
- sqlite3_mutex_enter(master);
+ sqlite3_mutex_enter(mainmtx);
if( i<sqllogglobal.nConn ){
if( p->fd ) fclose(p->fd);
p->db = 0;
@@ -524,7 +524,7 @@ static void testSqllog(void *pCtx, sqlite3 *db, const char *zSql, int eType){
memmove(p, &p[1], nShift*sizeof(struct SLConn));
}
}
- sqlite3_mutex_leave(master);
+ sqlite3_mutex_leave(mainmtx);
/* An ordinary SQL command. */
}else if( i<sqllogglobal.nConn && p->fd ){