Index: src/loadext.c ================================================================== --- src/loadext.c +++ src/loadext.c @@ -10,11 +10,11 @@ ** ************************************************************************* ** This file contains code used to dynamically load extensions into ** the SQLite library. ** -** $Id: loadext.c,v 1.55 2008/10/07 15:25:48 drh Exp $ +** $Id: loadext.c,v 1.56 2008/10/12 00:27:53 shane Exp $ */ #ifndef SQLITE_CORE #define SQLITE_CORE 1 /* Disable the API redefinition in sqlite3ext.h */ #endif @@ -122,11 +122,15 @@ ** also check to make sure that the pointer to the function is ** not NULL before calling it. */ static const sqlite3_api_routines sqlite3Apis = { sqlite3_aggregate_context, +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_aggregate_count, +#else + 0, +#endif sqlite3_bind_blob, sqlite3_bind_double, sqlite3_bind_int, sqlite3_bind_int64, sqlite3_bind_null, @@ -177,11 +181,15 @@ sqlite3_enable_shared_cache, sqlite3_errcode, sqlite3_errmsg, sqlite3_errmsg16, sqlite3_exec, +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_expired, +#else + 0, +#endif sqlite3_finalize, sqlite3_free, sqlite3_free_table, sqlite3_get_autocommit, sqlite3_get_auxdata, @@ -217,14 +225,22 @@ sqlite3_set_authorizer, sqlite3_set_auxdata, sqlite3_snprintf, sqlite3_step, sqlite3_table_column_metadata, +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_thread_cleanup, +#else + 0, +#endif sqlite3_total_changes, sqlite3_trace, +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_transfer_bindings, +#else + 0, +#endif sqlite3_update_hook, sqlite3_user_data, sqlite3_value_blob, sqlite3_value_bytes, sqlite3_value_bytes16, Index: src/main.c ================================================================== --- src/main.c +++ src/main.c @@ -12,11 +12,11 @@ ** Main file for the SQLite library. The routines in this file ** implement the programmer interface to the library. Routines in ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.507 2008/10/11 15:38:30 drh Exp $ +** $Id: main.c,v 1.508 2008/10/12 00:27:53 shane Exp $ */ #include "sqliteInt.h" #include #ifdef SQLITE_ENABLE_FTS3 @@ -1800,17 +1800,19 @@ return SQLITE_OK; } #endif /* SQLITE_OMIT_UTF16 */ #ifndef SQLITE_OMIT_GLOBALRECOVER +#ifndef SQLITE_OMIT_DEPRECATED /* ** This function is now an anachronism. It used to be used to recover from a ** malloc() failure, but SQLite now does this automatically. */ int sqlite3_global_recover(void){ return SQLITE_OK; } +#endif #endif /* ** Test to see whether or not the database connection is in autocommit ** mode. Return TRUE if it is and FALSE if not. Autocommit mode is on @@ -1832,19 +1834,21 @@ int sqlite3Corrupt(void){ return SQLITE_CORRUPT; } #endif +#ifndef SQLITE_OMIT_DEPRECATED /* ** This is a convenience routine that makes sure that all thread-specific ** data for this thread has been deallocated. ** ** SQLite no longer uses thread-specific data so this routine is now a ** no-op. It is retained for historical compatibility. */ void sqlite3_thread_cleanup(void){ } +#endif /* ** Return meta information about a specific column of a database table. ** See comment in sqlite3.h (sqlite.h.in) for details. */ Index: src/malloc.c ================================================================== --- src/malloc.c +++ src/malloc.c @@ -10,11 +10,11 @@ ** ************************************************************************* ** ** Memory allocation functions used throughout sqlite. ** -** $Id: malloc.c,v 1.44 2008/10/11 17:35:16 drh Exp $ +** $Id: malloc.c,v 1.45 2008/10/12 00:27:53 shane Exp $ */ #include "sqliteInt.h" #include #include @@ -194,10 +194,11 @@ mem0.alarmThreshold = iThreshold; sqlite3_mutex_leave(mem0.mutex); return SQLITE_OK; } +#ifndef SQLITE_OMIT_DEPRECATED /* ** Deprecated external interface. Internal/core SQLite code ** should call sqlite3MemoryAlarm. */ int sqlite3_memory_alarm( @@ -205,10 +206,11 @@ void *pArg, sqlite3_int64 iThreshold ){ return sqlite3MemoryAlarm(xCallback, pArg, iThreshold); } +#endif /* ** Trigger the alarm */ static void sqlite3MallocAlarm(int nByte){ Index: src/sqlite.h.in ================================================================== --- src/sqlite.h.in +++ src/sqlite.h.in @@ -28,11 +28,11 @@ ** The name of this file under configuration management is "sqlite.h.in". ** The makefile makes some minor changes to this file (such as inserting ** the version number) and changes its name to "sqlite3.h" as ** part of the build process. ** -** @(#) $Id: sqlite.h.in,v 1.403 2008/10/10 23:48:26 drh Exp $ +** @(#) $Id: sqlite.h.in,v 1.404 2008/10/12 00:27:54 shane Exp $ */ #ifndef _SQLITE3_H_ #define _SQLITE3_H_ #include /* Needed for the definition of va_list */ @@ -4123,16 +4123,18 @@ ** backwards compatibility with older code, these functions continue ** to be supported. However, new applications should avoid ** the use of these functions. To help encourage people to avoid ** using these functions, we are not going to tell you want they do. */ +#ifndef SQLITE_OMIT_DEPRECATED SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); SQLITE_DEPRECATED int sqlite3_global_recover(void); SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64); +#endif /* ** CAPI3REF: Obtaining SQL Function Parameter Values {H15100} ** ** The C-language implementation of SQL functions and aggregates uses Index: src/sqlite3ext.h ================================================================== --- src/sqlite3ext.h +++ src/sqlite3ext.h @@ -13,11 +13,11 @@ ** shared libraries that want to be imported as extensions into ** an SQLite instance. Shared libraries that intend to be loaded ** as extensions by SQLite should #include this file instead of ** sqlite3.h. ** -** @(#) $Id: sqlite3ext.h,v 1.24 2008/06/30 15:09:29 danielk1977 Exp $ +** @(#) $Id: sqlite3ext.h,v 1.25 2008/10/12 00:27:54 shane Exp $ */ #ifndef _SQLITE3EXT_H_ #define _SQLITE3EXT_H_ #include "sqlite3.h" @@ -206,11 +206,13 @@ ** the API. So the redefinition macros are only valid if the ** SQLITE_CORE macros is undefined. */ #ifndef SQLITE_CORE #define sqlite3_aggregate_context sqlite3_api->aggregate_context +#ifndef SQLITE_OMIT_DEPRECATED #define sqlite3_aggregate_count sqlite3_api->aggregate_count +#endif #define sqlite3_bind_blob sqlite3_api->bind_blob #define sqlite3_bind_double sqlite3_api->bind_double #define sqlite3_bind_int sqlite3_api->bind_int #define sqlite3_bind_int64 sqlite3_api->bind_int64 #define sqlite3_bind_null sqlite3_api->bind_null @@ -262,18 +264,22 @@ #define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache #define sqlite3_errcode sqlite3_api->errcode #define sqlite3_errmsg sqlite3_api->errmsg #define sqlite3_errmsg16 sqlite3_api->errmsg16 #define sqlite3_exec sqlite3_api->exec +#ifndef SQLITE_OMIT_DEPRECATED #define sqlite3_expired sqlite3_api->expired +#endif #define sqlite3_finalize sqlite3_api->finalize #define sqlite3_free sqlite3_api->free #define sqlite3_free_table sqlite3_api->free_table #define sqlite3_get_autocommit sqlite3_api->get_autocommit #define sqlite3_get_auxdata sqlite3_api->get_auxdata #define sqlite3_get_table sqlite3_api->get_table +#ifndef SQLITE_OMIT_DEPRECATED #define sqlite3_global_recover sqlite3_api->global_recover +#endif #define sqlite3_interrupt sqlite3_api->interruptx #define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid #define sqlite3_libversion sqlite3_api->libversion #define sqlite3_libversion_number sqlite3_api->libversion_number #define sqlite3_malloc sqlite3_api->malloc @@ -307,11 +313,13 @@ #define sqlite3_step sqlite3_api->step #define sqlite3_table_column_metadata sqlite3_api->table_column_metadata #define sqlite3_thread_cleanup sqlite3_api->thread_cleanup #define sqlite3_total_changes sqlite3_api->total_changes #define sqlite3_trace sqlite3_api->trace +#ifndef SQLITE_OMIT_DEPRECATED #define sqlite3_transfer_bindings sqlite3_api->transfer_bindings +#endif #define sqlite3_update_hook sqlite3_api->update_hook #define sqlite3_user_data sqlite3_api->user_data #define sqlite3_value_blob sqlite3_api->value_blob #define sqlite3_value_bytes sqlite3_api->value_bytes #define sqlite3_value_bytes16 sqlite3_api->value_bytes16 Index: src/test1.c ================================================================== --- src/test1.c +++ src/test1.c @@ -11,11 +11,11 @@ ************************************************************************* ** Code for testing all sorts of SQLite interfaces. This code ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test1.c,v 1.327 2008/10/07 23:46:38 drh Exp $ +** $Id: test1.c,v 1.328 2008/10/12 00:27:54 shane Exp $ */ #include "sqliteInt.h" #include "tcl.h" #include #include @@ -1037,13 +1037,16 @@ int argc, sqlite3_value **argv ){ /* no-op */ } + +#ifndef SQLITE_OMIT_DEPRECATED static void legacyCountFinalize(sqlite3_context *context){ sqlite3_result_int(context, sqlite3_aggregate_count(context)); } +#endif /* ** Usage: sqlite3_create_aggregate DB ** ** Call the sqlite3_create_function API on the given database in order @@ -1080,15 +1083,17 @@ t1CountStep,t1CountFinalize); if( rc==SQLITE_OK ){ rc = sqlite3_create_function(db, "x_count", 1, SQLITE_UTF8, 0, 0, t1CountStep,t1CountFinalize); } +#ifndef SQLITE_OMIT_DEPRECATED if( rc==SQLITE_OK ){ rc = sqlite3_create_function(db, "legacy_count", 0, SQLITE_ANY, 0, 0, legacyCountStep, legacyCountFinalize ); } +#endif if( sqlite3TestErrCode(interp, db, rc) ) return TCL_ERROR; Tcl_SetResult(interp, (char *)t1ErrorName(rc), 0); return TCL_OK; } @@ -2032,18 +2037,20 @@ void * clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[] ){ +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_stmt *pStmt; if( objc!=2 ){ Tcl_AppendResult(interp, "wrong # args: should be \"", Tcl_GetStringFromObj(objv[0], 0), " ", 0); return TCL_ERROR; } if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; Tcl_SetObjResult(interp, Tcl_NewBooleanObj(sqlite3_expired(pStmt))); +#endif return TCL_OK; } /* ** Usage: sqlite3_transfer_bindings FROMSTMT TOSTMT @@ -2054,10 +2061,11 @@ void * clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[] ){ +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_stmt *pStmt1, *pStmt2; if( objc!=3 ){ Tcl_AppendResult(interp, "wrong # args: should be \"", Tcl_GetStringFromObj(objv[0], 0), " FROM-STMT TO-STMT", 0); return TCL_ERROR; @@ -2064,10 +2072,11 @@ } if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt1)) return TCL_ERROR; if( getStmtPointer(interp, Tcl_GetString(objv[2]), &pStmt2)) return TCL_ERROR; Tcl_SetObjResult(interp, Tcl_NewIntObj(sqlite3_transfer_bindings(pStmt1,pStmt2))); +#endif return TCL_OK; } /* ** Usage: sqlite3_changes DB @@ -3754,17 +3763,19 @@ Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[] ){ #ifndef SQLITE_OMIT_GLOBALRECOVER +#ifndef SQLITE_OMIT_DEPRECATED int rc; if( objc!=1 ){ Tcl_WrongNumArgs(interp, 1, objv, ""); return TCL_ERROR; } rc = sqlite3_global_recover(); Tcl_SetResult(interp, (char *)t1ErrorName(rc), TCL_STATIC); +#endif #endif return TCL_OK; } /* @@ -4137,14 +4148,15 @@ void * clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[] ){ +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_thread_cleanup(); +#endif return TCL_OK; } - /* ** Usage: sqlite3_pager_refcounts DB ** ** Return a list of numbers which are the PagerRefcount for all Index: src/test4.c ================================================================== --- src/test4.c +++ src/test4.c @@ -9,11 +9,11 @@ ** May you share freely, never taking more than you give. ** ************************************************************************* ** Code for testing the the SQLite library in a multithreaded environment. ** -** $Id: test4.c,v 1.23 2008/07/28 19:34:54 drh Exp $ +** $Id: test4.c,v 1.24 2008/10/12 00:27:54 shane Exp $ */ #include "sqliteInt.h" #include "tcl.h" #if defined(SQLITE_OS_UNIX) && OS_UNIX==1 && SQLITE_THREADSAFE #include @@ -94,11 +94,13 @@ if( p->zErr && p->zErr!=p->zStaticErr ){ sqlite3_free(p->zErr); p->zErr = 0; } p->completed++; +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_thread_cleanup(); +#endif return 0; } /* ** Get a thread ID which is an upper case letter. Return the index. Index: src/test7.c ================================================================== --- src/test7.c +++ src/test7.c @@ -10,11 +10,11 @@ ** ************************************************************************* ** Code for testing the client/server version of the SQLite library. ** Derived from test4.c. ** -** $Id: test7.c,v 1.12 2008/07/28 19:34:54 drh Exp $ +** $Id: test7.c,v 1.13 2008/10/12 00:27:54 shane Exp $ */ #include "sqliteInt.h" #include "tcl.h" /* @@ -116,11 +116,13 @@ if( p->zErr && p->zErr!=p->zStaticErr ){ sqlite3_free(p->zErr); p->zErr = 0; } p->completed++; +#ifndef SQLITE_OMIT_DEPRECATED sqlite3_thread_cleanup(); +#endif return 0; } /* ** Get a thread ID which is an upper case letter. Return the index. Index: src/test_config.c ================================================================== --- src/test_config.c +++ src/test_config.c @@ -14,11 +14,11 @@ ** None of the code in this file goes into a deliverable build. ** ** The focus of this file is providing the TCL testing layer ** access to compile-time constants. ** -** $Id: test_config.c,v 1.41 2008/10/11 17:06:04 drh Exp $ +** $Id: test_config.c,v 1.42 2008/10/12 00:27:54 shane Exp $ */ #include "sqliteLimit.h" #include "sqliteInt.h" @@ -210,10 +210,16 @@ #ifdef SQLITE_OMIT_DECLTYPE Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "decltype", "1", TCL_GLOBAL_ONLY); #endif + +#ifdef SQLITE_OMIT_DEPRECATED + Tcl_SetVar2(interp, "sqlite_options", "deprecated", "0", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "deprecated", "1", TCL_GLOBAL_ONLY); +#endif #ifdef SQLITE_OMIT_DISKIO Tcl_SetVar2(interp, "sqlite_options", "diskio", "0", TCL_GLOBAL_ONLY); #else Tcl_SetVar2(interp, "sqlite_options", "diskio", "1", TCL_GLOBAL_ONLY); Index: src/vdbeapi.c ================================================================== --- src/vdbeapi.c +++ src/vdbeapi.c @@ -11,11 +11,11 @@ ************************************************************************* ** ** This file contains code use to implement APIs that are part of the ** VDBE. ** -** $Id: vdbeapi.c,v 1.145 2008/10/07 23:46:38 drh Exp $ +** $Id: vdbeapi.c,v 1.146 2008/10/12 00:27:54 shane Exp $ */ #include "sqliteInt.h" #include "vdbeInt.h" #if 0 && defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) @@ -172,10 +172,11 @@ #define stmtLruAdd(x) #define vdbeReprepare(x) sqlite3Reprepare(x) #endif +#ifndef SQLITE_OMIT_DEPRECATED /* ** Return TRUE (non-zero) of the statement supplied as an argument needs ** to be recompiled. A statement needs to be recompiled whenever the ** execution environment changes in a way that would alter the program ** that sqlite3_prepare() generates. For example, if new functions or @@ -184,10 +185,11 @@ */ int sqlite3_expired(sqlite3_stmt *pStmt){ Vdbe *p = (Vdbe*)pStmt; return p==0 || p->expired; } +#endif /* ** The following routine destroys a virtual machine that is created by ** the sqlite3_compile() routine. The integer returned is an SQLITE_ ** success/failure code that describes the result of executing the virtual @@ -693,10 +695,11 @@ if( xDelete ){ xDelete(pAux); } } +#ifndef SQLITE_OMIT_DEPRECATED /* ** Return the number of times the Step function of a aggregate has been ** called. ** ** This function is deprecated. Do not use it for new code. It is @@ -706,10 +709,11 @@ */ int sqlite3_aggregate_count(sqlite3_context *p){ assert( p && p->pFunc && p->pFunc->xStep ); return p->pMem->n; } +#endif /* ** Return the number of columns in the result set for the statement pStmt. */ int sqlite3_column_count(sqlite3_stmt *pStmt){ @@ -1248,17 +1252,19 @@ sqlite3_mutex_leave(pTo->db->mutex); assert( rc==SQLITE_OK || rc==SQLITE_NOMEM ); return rc; } +#ifndef SQLITE_OMIT_DEPRECATED /* ** Deprecated external interface. Internal/core SQLite code ** should call sqlite3TransferBindings. */ int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){ return sqlite3TransferBindings(pFromStmt, pToStmt); } +#endif /* ** Return the sqlite3* database handle to which the prepared statement given ** in the argument belongs. This is the same database handle that was ** the first argument to the sqlite3_prepare() that was used to create Index: test/bindxfer.test ================================================================== --- test/bindxfer.test +++ test/bindxfer.test @@ -9,11 +9,11 @@ # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this script testing the sqlite_transfer_bindings() API. # -# $Id: bindxfer.test,v 1.5 2008/03/17 16:23:27 drh Exp $ +# $Id: bindxfer.test,v 1.6 2008/10/12 00:27:54 shane Exp $ # set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -48,37 +48,39 @@ set TAIL } {} do_test bindxfer-1.4 { sqlite3_bind_parameter_count $VM2 } 3 -do_test bindxfer-1.5 { - sqlite_bind $VM1 1 one normal - set sqlite_static_bind_value two - sqlite_bind $VM1 2 {} static - sqlite_bind $VM1 3 {} null - sqlite3_transfer_bindings $VM1 $VM2 - sqlite_step $VM1 VALUES COLNAMES -} SQLITE_ROW -do_test bindxfer-1.6 { - set VALUES -} {{} {} {}} -do_test bindxfer-1.7 { - sqlite_step $VM2 VALUES COLNAMES -} SQLITE_ROW -do_test bindxfer-1.8 { - set VALUES -} {one two {}} -do_test bindxfer-1.9-misuse { - catch {sqlite3_finalize $VM1} - catch {sqlite3_finalize $VM2} - sqlite3_transfer_bindings $VM1 $VM2 -} 21 ;# SQLITE_MISUSE -do_test bindxfer-1.10 { - set VM1 [sqlite3_prepare $DB {SELECT ?, ?, ?} -1 TAIL] - set VM2 [sqlite3_prepare $DB {SELECT ?, ?, ?, ?} -1 TAIL] - sqlite3_transfer_bindings $VM1 $VM2 -} 1 ;# SQLITE_ERROR +ifcapable deprecated { + do_test bindxfer-1.5 { + sqlite_bind $VM1 1 one normal + set sqlite_static_bind_value two + sqlite_bind $VM1 2 {} static + sqlite_bind $VM1 3 {} null + sqlite3_transfer_bindings $VM1 $VM2 + sqlite_step $VM1 VALUES COLNAMES + } SQLITE_ROW + do_test bindxfer-1.6 { + set VALUES + } {{} {} {}} + do_test bindxfer-1.7 { + sqlite_step $VM2 VALUES COLNAMES + } SQLITE_ROW + do_test bindxfer-1.8 { + set VALUES + } {one two {}} + do_test bindxfer-1.9-misuse { + catch {sqlite3_finalize $VM1} + catch {sqlite3_finalize $VM2} + sqlite3_transfer_bindings $VM1 $VM2 + } 21 ;# SQLITE_MISUSE + do_test bindxfer-1.10 { + set VM1 [sqlite3_prepare $DB {SELECT ?, ?, ?} -1 TAIL] + set VM2 [sqlite3_prepare $DB {SELECT ?, ?, ?, ?} -1 TAIL] + sqlite3_transfer_bindings $VM1 $VM2 + } 1 ;# SQLITE_ERROR +} catch {sqlite3_finalize $VM1} catch {sqlite3_finalize $VM2} finish_test Index: test/capi3c.test ================================================================== --- test/capi3c.test +++ test/capi3c.test @@ -11,11 +11,11 @@ # This file implements regression tests for SQLite library. # # This is a copy of the capi3.test file that has been adapted to # test the new sqlite3_prepare_v2 interface. # -# $Id: capi3c.test,v 1.19 2008/05/05 16:56:35 drh Exp $ +# $Id: capi3c.test,v 1.20 2008/10/12 00:27:54 shane Exp $ # set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -1166,30 +1166,36 @@ sqlite3_step $STMT } SQLITE_SCHEMA do_test capi3c-19.4.1 { sqlite3_errmsg $DB } {no such table: t3} -do_test capi3c-19.4.2 { - sqlite3_expired $STMT -} 1 +ifcapable deprecated { + do_test capi3c-19.4.2 { + sqlite3_expired $STMT + } 1 +} do_test capi3c-19.4.3 { sqlite3_errmsg $DB } {no such table: t3} -do_test capi3c-19.4.4 { - sqlite3_expired 0 -} 1 +ifcapable deprecated { + do_test capi3c-19.4.4 { + sqlite3_expired 0 + } 1 +} do_test capi3c-19.5 { sqlite3_reset $STMT db eval { CREATE TABLE t3(x,y); INSERT INTO t3 VALUES(1,2); } sqlite3_step $STMT } SQLITE_ROW -do_test capi3c-19.5.2 { - sqlite3_expired $STMT -} 0 +ifcapable deprecated { + do_test capi3c-19.5.2 { + sqlite3_expired $STMT + } 0 +} do_test capi3c-19.6 { sqlite3_column_int $STMT 1 } 2 do_test capi3c-19.99 { sqlite3_finalize $STMT Index: test/func.test ================================================================== --- test/func.test +++ test/func.test @@ -9,11 +9,11 @@ # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing built-in functions. # -# $Id: func.test,v 1.86 2008/08/04 03:51:24 danielk1977 Exp $ +# $Id: func.test,v 1.87 2008/10/12 00:27:54 shane Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Create a table to work with. @@ -916,16 +916,18 @@ execsql {SELECT typeof(trim('hello',NULL));} } {null} # This is to test the deprecated sqlite3_aggregate_count() API. # -do_test func-23.1 { - sqlite3_create_aggregate db - execsql { - SELECT legacy_count() FROM t6; - } -} {3} +ifcapable deprecated { + do_test func-23.1 { + sqlite3_create_aggregate db + execsql { + SELECT legacy_count() FROM t6; + } + } {3} +} # The group_concat() function. # do_test func-24.1 { execsql { Index: test/shared_err.test ================================================================== --- test/shared_err.test +++ test/shared_err.test @@ -11,11 +11,11 @@ # # The focus of the tests in this file are IO errors that occur in a shared # cache context. What happens to connection B if one connection A encounters # an IO-error whilst reading or writing the file-system? # -# $Id: shared_err.test,v 1.23 2008/09/29 14:12:57 danielk1977 Exp $ +# $Id: shared_err.test,v 1.24 2008/10/12 00:27:54 shane Exp $ proc skip {args} {} set testdir [file dirname $argv0] @@ -360,11 +360,13 @@ catch {dbY close} } do_malloc_test shared_err-6 -tclbody { catch {db close} - sqlite3_thread_cleanup + ifcapable deprecated { + sqlite3_thread_cleanup + } sqlite3_enable_shared_cache 0 } -cleanup { sqlite3_enable_shared_cache 1 }