From 2e66f0b972eeaffc33464370aa5da1beb0c8fe0d Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 28 Apr 2005 17:18:48 +0000 Subject: [PATCH] Enhancements to allow for extensions. (CVS 2448) FossilOrigin-Name: 6863703abcb2bf31d65792d4de9ae20aba2eadb5 --- manifest | 20 ++++++++++---------- manifest.uuid | 2 +- src/os.h | 8 +++++++- src/pager.c | 5 ++++- src/sqliteInt.h | 3 ++- src/tclsqlite.c | 7 ++++++- src/test1.c | 17 +++++++++++++++-- 7 files changed, 45 insertions(+), 17 deletions(-) diff --git a/manifest b/manifest index 002979f0c0..d98efbe177 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\san\sarray\sindex\sbug\sin\sthe\sdefault\sbusy\scallback\shandler.\r\nTicket\s#1198.\s(CVS\s2447) -D 2005-04-28T12:06:06 +C Enhancements\sto\sallow\sfor\sextensions.\s(CVS\s2448) +D 2005-04-28T17:18:48 F Makefile.in 5c00d0037104de2a50ac7647a5f12769795957a3 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -44,7 +44,7 @@ F src/insert.c 34c25c33f51a43644a42cc091ac967b070c6b6d5 F src/legacy.c d58ea507bce885298a2c8c3cbb0f4bff5d47830b F src/main.c bab0ea1093176807a12da4038fc9d0e5dfdbddfc F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070 -F src/os.h 0c805df3df02b98eb78a7a86756c3cbd4e190939 +F src/os.h e5438be25cf96858787bf9b60fc7a2420e139ee3 F src/os_common.h 0e7f428ba0a6c40a61bc56c4e96f493231301b73 F src/os_test.c 91e5f22dd89491e5e1554820e715805f43fa4ece F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3 @@ -52,7 +52,7 @@ F src/os_unix.c fba0167576f09e242afd4c4978e1d2944b1da8b5 F src/os_unix.h 40b2fd1d02cfa45d6c3dea25316fd019cf9fcb0c F src/os_win.c 2bbbe6fbb010763c3fa79d5e951afca9b138c6b5 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b -F src/pager.c 95e24c9134a00613ca87b963a84ad62d85d5b979 +F src/pager.c a48f537db37de0433fd1b527e64d08c1a5bcce19 F src/pager.h 94bb42704ae861036a3bf3bbbe04dd3f0c6a690d F src/parse.y 3e314b3a96b199b0501ed426f2cee3392ffce806 F src/pragma.c 845c8ab0ab7d09ed2115d3dfc859ba2364b365a7 @@ -61,10 +61,10 @@ F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3 F src/select.c 277cf8893db3d822905097b31dfa209198a4febe F src/shell.c 25b3217d7c64e6497225439d261a253a23efff26 F src/sqlite.h.in 3675e3ada207e09b9d52a0463561325df4ac26b5 -F src/sqliteInt.h a2d37daf004eb039b740b0e2f99406adb4037cac +F src/sqliteInt.h 3833e39dc06168d098ab48ccdb99b669f6b12fd2 F src/table.c 25b3ff2b39b7d87e8d4a5da0713d68dfc06cbee9 -F src/tclsqlite.c 245b242edfb587e305954698ed93c1bc3daed678 -F src/test1.c adbf44d01e700895ad1e76cc90834d8dafd79152 +F src/tclsqlite.c 2a8f33a359a932b6be1e6b1608b4919df93ef25d +F src/test1.c 4ad7ffe5a74fd99d4f73f6fd28ba27f403b3adba F src/test2.c 7f0ef466706ac01414e1136b96e5d8a65cb97545 F src/test3.c 683e1e3819152ffd35da2f201e507228921148d0 F src/test4.c 7c6b9fc33dd1f3f93c7f1ee6e5e6d016afa6c1df @@ -279,7 +279,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b -P 88b39436f00d645cdb6333a7413c698c42227d3f -R 31ea01a451abe41dbf502c49252e43ec +P 3cc14b7606681d04eb56003a0996322e3b3bdc73 +R d4db5ec65fb4b9fa5c24d7a09456a92d U drh -Z 9e5b2b061f2f4dcf30af44a6a2dcbc04 +Z b204788877f4d50dce46756da1d298c3 diff --git a/manifest.uuid b/manifest.uuid index 1e5b4baf8c..892805e1fc 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3cc14b7606681d04eb56003a0996322e3b3bdc73 \ No newline at end of file +6863703abcb2bf31d65792d4de9ae20aba2eadb5 \ No newline at end of file diff --git a/src/os.h b/src/os.h index 1f82a1fbf1..e4010072db 100644 --- a/src/os.h +++ b/src/os.h @@ -23,7 +23,7 @@ ** N.B. MacOS means Mac Classic (or Carbon). Treat Darwin (OS X) as Unix. ** The MacOS build is designed to use CodeWarrior (tested with v8) */ -#if !defined(OS_UNIX) && !defined(OS_TEST) +#if !defined(OS_UNIX) && !defined(OS_TEST) && !defined(OS_MEM) # ifndef OS_WIN # if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) # define OS_WIN 1 @@ -40,6 +40,9 @@ # define OS_WIN 0 # endif #endif +#ifndef OS_MEM +# define OS_MEM 0 +#endif /* ** Invoke the appropriate operating-system specific header file. @@ -53,6 +56,9 @@ #if OS_WIN # include "os_win.h" #endif +#if OS_MEM +# include "os_mem.h" +#endif /* If the SET_FULLSYNC macro is not defined above, then make it ** a no-op diff --git a/src/pager.c b/src/pager.c index 1bacc13265..cf5babddc4 100644 --- a/src/pager.c +++ b/src/pager.c @@ -18,8 +18,9 @@ ** file simultaneously, or one process from reading the database while ** another is writing. ** -** @(#) $Id: pager.c,v 1.201 2005/03/28 18:04:28 drh Exp $ +** @(#) $Id: pager.c,v 1.202 2005/04/28 17:18:48 drh Exp $ */ +#ifndef SQLITE_OMIT_DISKIO #include "sqliteInt.h" #include "os.h" #include "pager.h" @@ -3591,3 +3592,5 @@ void sqlite3pager_refdump(Pager *pPager){ } } #endif + +#endif /* SQLITE_OMIT_DISKIO */ diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 8a30b7f360..fdf4a8cdda 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -11,7 +11,7 @@ ************************************************************************* ** Internal interface definitions for SQLite. ** -** @(#) $Id: sqliteInt.h,v 1.376 2005/04/22 02:38:38 drh Exp $ +** @(#) $Id: sqliteInt.h,v 1.377 2005/04/28 17:18:49 drh Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ @@ -1570,5 +1570,6 @@ int sqlite3SelectResolve(Parse *, Select *, NameContext *); void sqlite3ColumnDefault(Vdbe *, Table *, int); void sqlite3AlterFinishAddColumn(Parse *, Token *); void sqlite3AlterBeginAddColumn(Parse *, SrcList *); +const char *sqlite3TestErrorName(int); #endif diff --git a/src/tclsqlite.c b/src/tclsqlite.c index f837b56de3..634e875ba4 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.121 2005/04/03 23:54:44 danielk1977 Exp $ +** $Id: tclsqlite.c,v 1.122 2005/04/28 17:18:49 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ @@ -1771,12 +1771,17 @@ int TCLSH_MAIN(int argc, char **argv){ extern int Sqlitetest4_Init(Tcl_Interp*); extern int Sqlitetest5_Init(Tcl_Interp*); extern int Md5_Init(Tcl_Interp*); + extern int Sqlitetestsse_Init(Tcl_Interp*); + Sqlitetest1_Init(interp); Sqlitetest2_Init(interp); Sqlitetest3_Init(interp); Sqlitetest4_Init(interp); Sqlitetest5_Init(interp); Md5_Init(interp); +#ifdef SQLITE_TEST_SSE + Sqlitetestsse_Init(interp); +#endif } #endif if( argc>=2 || TCLSH==2 ){ diff --git a/src/test1.c b/src/test1.c index 0a774a9227..0099566f50 100644 --- a/src/test1.c +++ b/src/test1.c @@ -13,7 +13,7 @@ ** is not included in the SQLite library. It is used for automated ** testing of the SQLite library. ** -** $Id: test1.c,v 1.137 2005/04/22 02:38:38 drh Exp $ +** $Id: test1.c,v 1.138 2005/04/28 17:18:49 drh Exp $ */ #include "sqliteInt.h" #include "tcl.h" @@ -21,7 +21,7 @@ #include #include -static const char * errorName(int rc){ +const char *sqlite3TestErrorName(int rc){ const char *zName = 0; switch( rc ){ case SQLITE_OK: zName = "SQLITE_OK"; break; @@ -57,6 +57,7 @@ static const char * errorName(int rc){ } return zName; } +#define errorName sqlite3TestErrorName /* ** Convert an sqlite3_stmt* into an sqlite3*. This depends on the @@ -2789,6 +2790,12 @@ static void set_options(Tcl_Interp *interp){ Tcl_SetVar2(interp, "sqlite_options", "datetime", "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); +#endif + #ifdef SQLITE_OMIT_EXPLAIN Tcl_SetVar2(interp, "sqlite_options", "explain", "0", TCL_GLOBAL_ONLY); #else @@ -2831,6 +2838,12 @@ static void set_options(Tcl_Interp *interp){ Tcl_SetVar2(interp, "sqlite_options", "pager_pragmas", "1", TCL_GLOBAL_ONLY); #endif +#ifdef SQLITE_OMIT_PARSER + Tcl_SetVar2(interp, "sqlite_options", "parser", "0", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "parser", "1", TCL_GLOBAL_ONLY); +#endif + #if defined(SQLITE_OMIT_PRAGMA) || defined(SQLITE_OMIT_FLAG_PRAGMAS) Tcl_SetVar2(interp, "sqlite_options", "pragma", "0", TCL_GLOBAL_ONLY); Tcl_SetVar2(interp, "sqlite_options", "integrityck", "0", TCL_GLOBAL_ONLY);