From 6dc1d95dd8d0510fedc89fb4c74ddb9f698ada12 Mon Sep 17 00:00:00 2001 From: drh Date: Mon, 23 Jan 2006 00:04:54 +0000 Subject: [PATCH] Remove vestiges of the older TSD code for handling OOM exceptions. Prepare for the release of 3.3.2. (CVS 2991) FossilOrigin-Name: a65e85f0e01f3bca5f4e78999c10db3916824b5b --- VERSION | 2 +- manifest | 22 +++++++++++----------- manifest.uuid | 2 +- src/prepare.c | 11 +---------- src/sqliteInt.h | 9 ++------- src/vdbe.c | 15 +-------------- www/changes.tcl | 7 +++++++ www/index.tcl | 7 ++++++- 8 files changed, 30 insertions(+), 45 deletions(-) diff --git a/VERSION b/VERSION index bea438e9ad..4772543317 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.1 +3.3.2 diff --git a/manifest b/manifest index e95f6dc308..c6087d1d1b 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Performance\soptimization\sin\sbtree.c.\s(CVS\s2990) -D 2006-01-22T21:52:57 +C Remove\svestiges\sof\sthe\solder\sTSD\scode\sfor\shandling\sOOM\sexceptions.\nPrepare\sfor\sthe\srelease\sof\s3.3.2.\s(CVS\s2991) +D 2006-01-23T00:04:54 F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 -F VERSION c8f0db9f26a66d73b1a3a93e006fd0a5dc4cd764 +F VERSION dd67e1a7f1eae49ac8becb23f04d064c3cae6a5d F aclocal.m4 7daea4c35e88de30d5a3f6f7a2ab99720e803bbd F addopcodes.awk 701697fae48376375ec8532c3d04e910cfeef352 F art/2005osaward.gif 0d1851b2a7c1c9d0ccce545f3e14bca42d7fd248 @@ -63,14 +63,14 @@ F src/pager.c 0f1565938ca972490ff72a8dc0a90d3a1d563883 F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f F src/parse.y 83df51fea35f68f7e07384d75dce83d1ed30434c F src/pragma.c 4496cc77dc35824e1c978c3d1413b8a5a4c777d3 -F src/prepare.c 5d6f5b7194ee72cecd66cab49d15159e55d63f28 +F src/prepare.c 6349208568d7967a3d1b6625e5af736fd0d5d264 F src/printf.c f47a2f4b5387cd2ebb12e9117a1a5d6bd9a2b812 F src/random.c d40f8d356cecbd351ccfab6eaedd7ec1b54f5261 F src/select.c 11ad28afb33bb83b655074c87557d4686c67f92f F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96 F src/shell.c 66b073375efbdee19045e7e0cd38b85f9aff71da F src/sqlite.h.in 492580f7e3ff71eb43193eb7bb98e2d549889ce3 -F src/sqliteInt.h 7ddd6141a57748363fe42119f165d06260996aa3 +F src/sqliteInt.h 8cbeb4346a70ca47a2ec5935ec26b5c7f0b1948f F src/table.c 486dcfce532685b53b5a2b5da8bba0ded6fb2316 F src/tclsqlite.c d650bea0248fc0a310ddc2cb94273a3a5021fddf F src/test1.c bcdd1978cb4f576611917948728acd09ede9c85d @@ -87,7 +87,7 @@ F src/update.c 14be4ba2f438919b4217085c02feff569e6cf1f2 F src/utf.c 5ab8ca05d4e9ec81174b010f01ab12a232f0087d F src/util.c 2510e040166cb07b7e8ed0c1ccaec22350d57df4 F src/vacuum.c 3865673cc66acd0717ecd517f6b8fdb2a5e7924b -F src/vdbe.c 9eceb866b8197d25d07f700e16b1a50638d4bd6e +F src/vdbe.c e04bf3035a7dc547e80ba1130a716a7e8c9f7c93 F src/vdbe.h 8729a4ee16ff9aeab2af9667df3cf300ff978e13 F src/vdbeInt.h eb3f86ab08ef11635bc78eb88c3ff13f923c233b F src/vdbeapi.c 75eabedc09b3b2a6f2d256f85704b8b0cc0f50fa @@ -302,7 +302,7 @@ F www/autoinc.tcl b357f5ba954b046ee35392ce0f884a2fcfcdea06 F www/c_interface.tcl b51b08591554c16a0c3ef718364a508ac25abc7e F www/capi3.tcl 7a7cc225fe02eb7ab861a6019b08baa0014409e1 F www/capi3ref.tcl 6311fd30c07aa82b4bdaab9822bce95dd8ab0e7c -F www/changes.tcl fe45a019735518af9add1144bafd8ca3e30ad11b +F www/changes.tcl 0061617f2948f856a8cca7be4c2569b59f4e09a7 F www/common.tcl 14d121c28532ad20c3e349caa4db708b0b822083 F www/compile.tcl 276546d7eb445add5a867193bbd80f6919a6b084 F www/conflict.tcl cdd0f4b59b0ba6d61f67e6a38f3ae45853bacb30 @@ -321,7 +321,7 @@ F www/fileformat.tcl 900c95b9633abc3dcfc384d9ddd8eb4876793059 F www/formatchng.tcl f4f5f32205c0a70d07784f7bf9ce33ed34bfcbf3 F www/fullscanb.gif f7c94cb227f060511f8909e10f570157263e9a25 F www/index-ex1-x-b.gif f9b1d85c3fa2435cf38b15970c7e3aa1edae23a3 -F www/index.tcl 5b3506a29f853f801fb36fdf2f64c20b4281d4fc +F www/index.tcl 9ce47a2f3163c4feafe1b593c14215994f2a0155 F www/indirect1b1.gif adfca361d2df59e34f9c5cac52a670c2bfc303a1 F www/lang.tcl b3561af8d85d2d712d43b3604e4aadce9257e4d9 F www/lockingv3.tcl f59b19d6c8920a931f096699d6faaf61c05db55f @@ -344,7 +344,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 3c2eee5e1f6c7d701a6d362a04cf896d44e97fd9 -R 79b2ebcd5c87d6676140e58c49de75b7 +P 3e1e6affe256a950a81ad5939b628bafb8463b42 +R bc5b2ca65db1b6cb2127e17629a50b89 U drh -Z fd205e297bbdc82d40fc2de1ce715a4f +Z 123ef0750be477d63bf6489bbd9d0613 diff --git a/manifest.uuid b/manifest.uuid index fbbe78d189..dabc9850a9 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3e1e6affe256a950a81ad5939b628bafb8463b42 \ No newline at end of file +a65e85f0e01f3bca5f4e78999c10db3916824b5b \ No newline at end of file diff --git a/src/prepare.c b/src/prepare.c index 778169d240..d18719dd20 100644 --- a/src/prepare.c +++ b/src/prepare.c @@ -13,7 +13,7 @@ ** interface, and routines that contribute to loading the database schema ** from disk. ** -** $Id: prepare.c,v 1.27 2006/01/18 18:22:43 danielk1977 Exp $ +** $Id: prepare.c,v 1.28 2006/01/23 00:04:55 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -519,11 +519,6 @@ int sqlite3_prepare( memset(&sParse, 0, sizeof(sParse)); sParse.db = db; - sParse.pTsd = sqlite3ThreadData(); - if( !sParse.pTsd ){ - goto prepare_out; - } - sParse.pTsd->nRef++; sqlite3RunParser(&sParse, zSql, &zErrMsg); if( sqlite3MallocFailed() ){ @@ -557,7 +552,6 @@ int sqlite3_prepare( } #endif -prepare_out: if( sqlite3SafetyOff(db) ){ rc = SQLITE_MISUSE; } @@ -574,9 +568,6 @@ prepare_out: sqlite3Error(db, rc, 0); } - if( sParse.pTsd ){ - sParse.pTsd->nRef--; - } rc = sqlite3ApiExit(db, rc); sqlite3ReleaseThreadData(); return rc; diff --git a/src/sqliteInt.h b/src/sqliteInt.h index f62fd37098..cee8fc834c 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.475 2006/01/18 18:22:43 danielk1977 Exp $ +** @(#) $Id: sqliteInt.h,v 1.476 2006/01/23 00:04:55 drh Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -296,13 +296,9 @@ extern int sqlite3_iLine; /* Line number for debug info */ /* ** An instance of this structure might be allocated to store information ** specific to a single thread. -** -** To avoid a memory leak on windows, the content of this structure is -** checked at the conclusion of each API call. If it is all zero, it -** is deallocated. */ struct ThreadData { - int nRef; /* Number of users */ + int dummy; /* So that this structure is never empty */ #ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT int nSoftHeapLimit; /* Suggested max mem allocation. No limit if <0 */ @@ -1255,7 +1251,6 @@ struct Parse { int ckOffset; /* Stack offset to data used by CHECK constraints */ u32 writeMask; /* Start a write transaction on these databases */ u32 cookieMask; /* Bitmask of schema verified databases */ - ThreadData *pTsd; /* Thread specific data for this thread */ int cookieGoto; /* Address of OP_Goto to cookie verifier subroutine */ int cookieValue[MAX_ATTACHED+2]; /* Values of cookies to verify */ #ifndef SQLITE_OMIT_SHARED_CACHE diff --git a/src/vdbe.c b/src/vdbe.c index f87eea08db..5c5cf04948 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -43,7 +43,7 @@ ** in this file for details. If in doubt, do not deviate from existing ** commenting and indentation practices when changing or adding code. ** -** $Id: vdbe.c,v 1.534 2006/01/20 15:45:36 drh Exp $ +** $Id: vdbe.c,v 1.535 2006/01/23 00:04:55 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -407,13 +407,8 @@ int sqlite3VdbeExec( #ifndef NDEBUG Mem *pStackLimit; #endif - ThreadData *pTsd = sqlite3ThreadData(); - if( !pTsd ){ - goto no_mem; - } if( p->magic!=VDBE_MAGIC_RUN ) return SQLITE_MISUSE; - pTsd->nRef++; assert( db->magic==SQLITE_MAGIC_BUSY ); pTos = p->pTos; if( p->rc==SQLITE_NOMEM ){ @@ -614,7 +609,6 @@ case OP_Halt: { /* no-push */ } rc = sqlite3VdbeHalt(p); assert( rc==SQLITE_BUSY || rc==SQLITE_OK ); - pTsd->nRef--; if( rc==SQLITE_BUSY ){ p->rc = SQLITE_BUSY; return SQLITE_BUSY; @@ -921,7 +915,6 @@ case OP_Callback: { /* no-push */ p->popStack = pOp->p1; p->pc = pc + 1; p->pTos = pTos; - pTsd->nRef--; return SQLITE_ROW; } @@ -2341,7 +2334,6 @@ case OP_AutoCommit: { /* no-push */ " transaction - SQL statements in progress", (char*)0); rc = SQLITE_ERROR; }else if( i!=db->autoCommit ){ - pTsd->nRef--; if( pOp->p2 ){ assert( i==1 ); sqlite3RollbackAll(db); @@ -2401,7 +2393,6 @@ case OP_Transaction: { /* no-push */ p->pc = pc; p->rc = SQLITE_BUSY; p->pTos = pTos; - pTsd->nRef--; return SQLITE_BUSY; } if( rc!=SQLITE_OK && rc!=SQLITE_READONLY /* && rc!=SQLITE_BUSY */ ){ @@ -2609,7 +2600,6 @@ case OP_OpenWrite: { /* no-push */ p->pc = pc; p->rc = SQLITE_BUSY; p->pTos = &pTos[1 + (pOp->p2<=0)]; /* Operands must remain on stack */ - pTsd->nRef--; return SQLITE_BUSY; } case SQLITE_OK: { @@ -4621,9 +4611,6 @@ vdbe_halt: } sqlite3VdbeHalt(p); p->pTos = pTos; - if( pTsd ){ - pTsd->nRef--; - } return rc; /* Jump to here if a malloc() fails. It's hard to get a malloc() diff --git a/www/changes.tcl b/www/changes.tcl index c33b636e24..b0c9d48360 100644 --- a/www/changes.tcl +++ b/www/changes.tcl @@ -25,6 +25,13 @@ proc chng {date desc} { puts "

" } +chng {2006 January 23 (3.3.2 beta)} { +
  • Bug fixes and speed improvements. Improved test coverage.
  • +
  • Changes to the OS-layer interface: mutexes must now be recursive.
  • +
  • Discontinue the use of thread-specific data for out-of-memory +exception handling
  • +} + chng {2006 January 16 (3.3.1 alpha)} {
  • Countless bug fixes
  • Speed improvements
  • diff --git a/www/index.tcl b/www/index.tcl index a4193d8ae9..250e6915fc 100644 --- a/www/index.tcl +++ b/www/index.tcl @@ -66,6 +66,11 @@ proc newsitem {date title text} { puts "
    " } +newsitem {2006-Jan-23} {Version 3.3.2 beta} { + More bug fixes and performance improvements as we move closer to + a production-ready version 3.3.x. +} + newsitem {2006-Jan-16} {Version 3.3.1 alpha} { Many bugs found in last week's alpha release have now been fixed and the library is running much faster again. @@ -149,4 +154,4 @@ puts {

    Old news...

    } -footer {$Id: index.tcl,v 1.130 2006/01/15 18:29:18 drh Exp $} +footer {$Id: index.tcl,v 1.131 2006/01/23 00:04:55 drh Exp $}