1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Automatically deallocate thread-specific data when it is no longer

being used.  Ticket #1601.  Also implemented the suggestion of
ticket #1603. Memory management is now off by default at compile-time.
The sqlite3_enable_memory_management() API has been removed. (CVS 2919)

FossilOrigin-Name: 5d9c6aa964305c3f36741ff0058da5b5f3ce0d24
This commit is contained in:
drh
2006-01-11 21:41:20 +00:00
parent 0203bde908
commit 6f7adc8a80
31 changed files with 334 additions and 299 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
** $Id: attach.c,v 1.45 2006/01/11 14:09:31 danielk1977 Exp $
** $Id: attach.c,v 1.46 2006/01/11 21:41:22 drh Exp $
*/
#include "sqliteInt.h"
@@ -272,7 +272,7 @@ static void codeAttach(
sqlite3* db = pParse->db;
#ifndef SQLITE_OMIT_AUTHORIZATION
assert( sqlite3ThreadData()->mallocFailed || pAuthArg );
assert( sqlite3ThreadDataReadOnly()->mallocFailed || 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 || sqlite3ThreadData()->mallocFailed);
assert(v || sqlite3ThreadDataReadOnly()->mallocFailed);
if( v ){
sqlite3VdbeAddOp(v, OP_Function, 0, nFunc);
pFunc = sqlite3FindFunction(db, zFunc, strlen(zFunc), nFunc, SQLITE_UTF8,0);