aboutsummaryrefslogtreecommitdiff
path: root/src/insert.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/insert.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/insert.c')
-rw-r--r--src/insert.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/insert.c b/src/insert.c
index e24968690..d38e24f92 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle INSERT statements in SQLite.
**
-** $Id: insert.c,v 1.157 2006/01/11 21:41:22 drh Exp $
+** $Id: insert.c,v 1.158 2006/01/18 16:51:35 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -225,7 +225,7 @@ void sqlite3Insert(
int counterRowid; /* Memory cell holding rowid of autoinc counter */
#endif
- if( pParse->nErr || sqlite3ThreadDataReadOnly()->mallocFailed ){
+ if( pParse->nErr || sqlite3MallocFailed() ){
goto insert_cleanup;
}
db = pParse->db;
@@ -333,7 +333,7 @@ void sqlite3Insert(
/* Resolve the expressions in the SELECT statement and execute it. */
rc = sqlite3Select(pParse, pSelect, SRT_Subroutine, iInsertBlock,0,0,0,0);
- if( rc || pParse->nErr || sqlite3ThreadDataReadOnly()->mallocFailed ){
+ if( rc || pParse->nErr || sqlite3MallocFailed() ){
goto insert_cleanup;
}