aboutsummaryrefslogtreecommitdiff
path: root/src/attach.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2006-01-18 16:51:35 +0000
committerdanielk1977 <danielk1977@noemail.net>2006-01-18 16:51:35 +0000
commit9e12800dec214b7ce95e5d4a16a66e37e65776be (patch)
tree91ef04a67e93512843040f3d9028308869cef678 /src/attach.c
parent1de57847f8b9516f0048a991afe711d2add06487 (diff)
downloadsqlite-9e12800dec214b7ce95e5d4a16a66e37e65776be.tar.gz
sqlite-9e12800dec214b7ce95e5d4a16a66e37e65776be.zip
Use a global variable protected by a mutex instead of thread-specific-data to record malloc() failures. (CVS 2972)
FossilOrigin-Name: ac090f2ab3b5a792c2fdf897e10060f263e0d408
Diffstat (limited to 'src/attach.c')
-rw-r--r--src/attach.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/attach.c b/src/attach.c
index 65628f5c8..26fc53101 100644
--- a/src/attach.c
+++ b/src/attach.c
@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
-** $Id: attach.c,v 1.47 2006/01/17 13:21:40 danielk1977 Exp $
+** $Id: attach.c,v 1.48 2006/01/18 16:51:35 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -272,7 +272,7 @@ static void codeAttach(
sqlite3* db = pParse->db;
#ifndef SQLITE_OMIT_AUTHORIZATION
- assert( sqlite3ThreadDataReadOnly()->mallocFailed || pAuthArg );
+ assert( sqlite3MallocFailed() || pAuthArg );
if( pAuthArg ){
char *zAuthArg = sqlite3NameFromToken(&pAuthArg->span);
if( !zAuthArg ){
@@ -303,7 +303,7 @@ static void codeAttach(
sqlite3ExprCode(pParse, pDbname);
sqlite3ExprCode(pParse, pKey);
- assert(v || sqlite3ThreadDataReadOnly()->mallocFailed);
+ assert( v || sqlite3MallocFailed() );
if( v ){
sqlite3VdbeAddOp(v, OP_Function, 0, nFunc);
pFunc = sqlite3FindFunction(db, zFunc, strlen(zFunc), nFunc, SQLITE_UTF8,0);