Remove the SQLITE_MUTEX_APPDEF compile-time option. The SQLITE_THREADSAFE=0
option always removes all mutex code. For application-defined mutexes only,
use SQLITE_THREADSAFE=1 with SQLITE_MUTEX_NOOP=1. Ticket #3421. (CVS 5779)
FossilOrigin-Name: 02a12eb1cfe9307c66556105a1a99d657cc01ab5
diff --git a/src/vdbeapi.c b/src/vdbeapi.c
index 46ccf51..5ec1a34 100644
--- a/src/vdbeapi.c
+++ b/src/vdbeapi.c
@@ -13,7 +13,7 @@
** This file contains code use to implement APIs that are part of the
** VDBE.
**
-** $Id: vdbeapi.c,v 1.143 2008/10/07 14:06:11 danielk1977 Exp $
+** $Id: vdbeapi.c,v 1.144 2008/10/07 15:25:49 drh Exp $
*/
#include "sqliteInt.h"
#include "vdbeInt.h"
@@ -202,7 +202,7 @@
rc = SQLITE_OK;
}else{
Vdbe *v = (Vdbe*)pStmt;
-#ifndef SQLITE_MUTEX_NOOP
+#if SQLITE_THREADSAFE
sqlite3_mutex *mutex = v->db->mutex;
#endif
sqlite3_mutex_enter(mutex);
@@ -244,7 +244,7 @@
int i;
int rc = SQLITE_OK;
Vdbe *p = (Vdbe*)pStmt;
-#ifndef SQLITE_MUTEX_NOOP
+#if SQLITE_THREADSAFE
sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
#endif
sqlite3_mutex_enter(mutex);