-C Modify\stest\sscripts\sto\swork\swhen\sSQLITE_OMIT_SUBQUERY\s(but\sno\sother\sOMIT\smacros)\sis\sdefined.\s(CVS\s2252)
-D 2005-01-21T04:25:47
+C Exclude\sa\sfew\smore\slines\sof\scode\susing\sOMIT\smacros.\s(CVS\s2253)
+D 2005-01-21T08:13:14
F Makefile.in ffd81f5e926d40b457071b4de8d7c1fa18f39b5a
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1
F sqlite3.pc.in 985b9bf34192a549d7d370e0f0b6b34a4f61369a
F src/attach.c cecf5ab42cff34416372a0210b14abb50ed48ef9
F src/auth.c 3b81f2a42f48a62c2c9c9b0eda31a157c681edea
-F src/btree.c 011acf7cedbe591bfe8207ac10050d9024807282
+F src/btree.c 812ee6b8eed884801a40b71f674cddf56a5e0888
F src/btree.h 74d19cf40ab49fd69abe9e4e12a6c321ad86c497
F src/build.c 9c9e9dbb9d8619f0755be79fcb30df5a8347a8ed
F src/cursor.c de73c00aefc4747ad59b5105cf38bbff0667922e
F src/date.c f3d1f5cd1503dabf426a198f3ebef5afbc122a7f
F src/delete.c b3accca9c38d9a67dbd724f67b04151a13735ebd
F src/experimental.c 8cc66b2be6a011055d75ef19ed2584bcfbb585ad
-F src/expr.c ebddbcf204b1a286799058731c33f4e382d98f1a
+F src/expr.c bf0875b10597b96375e84191d56106be9092827d
F src/func.c dc188d862d7276ea897655b248e2cb17022686e3
F src/hash.c a97721a55440b7bea31ffe471bb2f6b4123cddd5
F src/hash.h 1b0c445e1c89ff2aaad9b4605ba61375af001e84
F src/insert.c 037eb46630f027d0f93584db180d08ce163f3dbb
F src/legacy.c d58ea507bce885298a2c8c3cbb0f4bff5d47830b
-F src/main.c b489aae242a6123b111f125633799e37c0bab2a8
+F src/main.c 6a549ea86cbd7511d566a24788371ab2249d2aa9
F src/md5.c 7ae1c39044b95de2f62e066f47bb1deb880a1070
F src/os.h ae44064dc118b20d39450cb331409a775e8bb1c6
F src/os_common.h 0e7f428ba0a6c40a61bc56c4e96f493231301b73
F src/os_unix.h f3097815e041e82e24d92505e1ff61ba24172d13
F src/os_win.c 3c0b0a3bc33318cf555a1cd130232ad1b9a5a711
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
-F src/pager.c 05d23abbcfa3133f716a99589e53883c10551b1f
+F src/pager.c 49ee879e0a0b06e6dcdb30f601c1bf4ac68bf028
F src/pager.h 9eba8c53dd91eae7f3f90743b2ee242da02a9862
F src/parse.y 5f2c197fcb63c6aed1787da436ec5a35247ab7a4
F src/pragma.c 8ab313986673aa4c45e8693d8aabb9b95ee7b14a
F src/printf.c 3d20b21cfecadacecac3fb7274e746cb81d3d357
F src/random.c eff68e3f257e05e81eae6c4d50a51eb88beb4ff3
-F src/select.c d8f5c8b44922d9e295a32be941d0a416cda94f98
+F src/select.c e204ca5292751ed889f2cbcf2d2808a4d29edd2c
F src/shell.c 591364a0e9ca4ce53873e21e0294476c0c2b4770
F src/sqlite.h.in 8249b697d71ef6d7f7f752ba4ca04058e9e8b5ff
F src/sqliteInt.h 01ea63415bb96ad8ab6e26bede2aa6a39cefb082
F src/tclsqlite.c fd27457b228118be96524dae285146c76efe032b
F src/test1.c c4f2a1d6ad8f14a1168a4c933ce5c5cb2d243d86
F src/test2.c bbc2ecc58ceeab12d1e40970f831b1017524e40d
-F src/test3.c 5c2ec5c8eb689ac93fb0546f84b310659ad287c6
+F src/test3.c 683e1e3819152ffd35da2f201e507228921148d0
F src/test4.c 7c6b9fc33dd1f3f93c7f1ee6e5e6d016afa6c1df
F src/test5.c 64f08b2a50ef371a1bd68ff206829e7b1b9997f5
F src/tokenize.c 88bef43fe3e3c8865a7447f934296ac13238c4f6
F src/utf.c 9bece2c7b94d9002ab1bb900a7658c6f826b0f74
F src/util.c a858b93ba06bbafab55ba41e4d58538eb51f4b6a
F src/vacuum.c 1a9db113a027461daaf44724c71dd1ebbd064203
-F src/vdbe.c 37afd35d6d09cb701f7fd0a959c4cb8aa0432184
+F src/vdbe.c a5db9e8c1a7482a865d49ded5947ecbd97bee6f8
F src/vdbe.h 067ca8d6750ba4f69a50284765e5883dee860181
F src/vdbeInt.h f2b5f54d9881bbc89fff02d95f3f825ade68bce2
F src/vdbeapi.c 0cf3bdc1072616bedc8eec7fc22e3f5a169d33fd
F www/capi3ref.tcl c5a3ae75fc3505c034f3c4bbb62ab94cf359ac39
F www/changes.tcl f2b34859843d9f06a0611eb6d44af767891b09ef
F www/common.tcl de758130d54d95d151ea0d17a2ae5b92e1bb01de
-F www/compile.tcl d9431a45a7551e833b0361ca5826831205276b05
+F www/compile.tcl b4bbd488427dfe88b1a2366cf9f0b4b850e1f271
F www/conflict.tcl cdd0f4b59b0ba6d61f67e6a38f3ae45853bacb30
F www/copyright-release.html 294e011760c439c44951a6bfecd4c81a1ae359e8
F www/copyright-release.pdf cfca3558fc97095e57c6117d08f1f5b80d95125a
F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl 3e522a06ad41992023c80ca29a048ae2331ca5bd
-P bb0254ab14417f0ab40f10f37cb63a60507f070a
-R 2ca411fe266afa1cd45463edd41babae
+P d4e19efcef68d834c55c7d496cdb3696d63a31a2
+R f22d940e12f93d2a72377ccf52f1ee48
U danielk1977
-Z f5d13d8f7ccd862886011c686ad3e5a3
+Z ac1cb2768224dd061522306186c6fe8f
-d4e19efcef68d834c55c7d496cdb3696d63a31a2
\ No newline at end of file
+c6fc49e61033419e78b6b10638d57f4942087961
\ No newline at end of file
** May you share freely, never taking more than you give.
**
*************************************************************************
-** $Id: btree.c,v 1.242 2005/01/21 00:22:38 drh Exp $
+** $Id: btree.c,v 1.243 2005/01/21 08:13:14 danielk1977 Exp $
**
** This file implements a external (disk-based) database using BTrees.
** For a detailed discussion of BTrees, refer to
** is a very low but non-zero probability of damage. Level 3 reduces the
** probability of damage to near zero but with a write performance reduction.
*/
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
int sqlite3BtreeSetSafetyLevel(Btree *pBt, int level){
sqlite3pager_set_safety_level(pBt->pPager, level);
return SQLITE_OK;
}
+#endif
/*
** Change the default pages size and the number of reserved bytes per page.
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
-** $Id: expr.c,v 1.186 2005/01/20 22:48:48 drh Exp $
+** $Id: expr.c,v 1.187 2005/01/21 08:13:15 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
}
return pNew;
}
+
+/*
+** If cursors, triggers, views and subqueries are all omitted from
+** the build, then none of the following routines, except for
+** sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes
+** called with a NULL argument.
+*/
+#if !defined(SQLITE_OMIT_CURSOR) || !defined(SQLITE_OMIT_VIEW) \
+ || !defined(SQLITE_OMIT_TRIGGER) || !defined(SQLITE_OMIT_SUBQUERY)
SrcList *sqlite3SrcListDup(SrcList *p){
SrcList *pNew;
int i;
pNew->pFetch = 0;
return pNew;
}
+#else
+Select *sqlite3SelectDup(Select *p){
+ assert( p==0 );
+ return 0;
+}
+#endif
/*
VdbeComment((v, "# load subquery result"));
break;
}
-#endif
case TK_IN: {
int addr;
char affinity;
break;
}
+#endif
case TK_BETWEEN: {
Expr *pLeft = pExpr->pLeft;
struct ExprList_item *pLItem = pExpr->pList->a;
}
}
+#ifndef SQLITE_OMIT_TRIGGER
/*
** Generate code that evalutes the given expression and leaves the result
** on the stack. See also sqlite3ExprCode().
pExpr->op = TK_REGISTER;
}
}
+#endif
/*
** Generate code that pushes the value of every element of the given
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.272 2005/01/18 16:02:40 drh Exp $
+** $Id: main.c,v 1.273 2005/01/21 08:13:15 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
return SQLITE_ERROR;
}
+#ifndef SQLITE_OMIT_UTF16
/* If SQLITE_UTF16 is specified as the encoding type, transform this
** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the
** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.
if( rc!=SQLITE_OK ) return rc;
enc = SQLITE_UTF16BE;
}
+#else
+ enc = SQLITE_UTF8;
+#endif
p = sqlite3FindFunction(db, zFunctionName, nName, nArg, enc, 1);
if( p==0 ) return SQLITE_NOMEM;
p->pUserData = pUserData;
return SQLITE_OK;
}
+#ifndef SQLITE_OMIT_UTF16
int sqlite3_create_function16(
sqlite3 *db,
const void *zFunctionName,
pUserData, xFunc, xStep, xFinal);
return rc;
}
+#endif
/*
** Register a trace function. The pArg from the previously registered trace
if( pzTail ) *pzTail = sParse.zTail;
rc = sParse.rc;
+#ifndef SQLITE_OMIT_EXPLAIN
if( rc==SQLITE_OK && sParse.pVdbe && sParse.explain ){
sqlite3VdbeSetNumCols(sParse.pVdbe, 5);
sqlite3VdbeSetColName(sParse.pVdbe, 0, "addr", P3_STATIC);
sqlite3VdbeSetColName(sParse.pVdbe, 3, "p2", P3_STATIC);
sqlite3VdbeSetColName(sParse.pVdbe, 4, "p3", P3_STATIC);
}
+#endif
prepare_out:
if( sqlite3SafetyOff(db) ){
** file simultaneously, or one process from reading the database while
** another is writing.
**
-** @(#) $Id: pager.c,v 1.184 2005/01/20 11:32:24 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.185 2005/01/21 08:13:15 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
** Numeric values associated with these states are OFF==1, NORMAL=2,
** and FULL=3.
*/
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
void sqlite3pager_set_safety_level(Pager *pPager, int level){
pPager->noSync = level==1 || pPager->tempFile;
pPager->fullSync = level==3 && !pPager->tempFile;
if( pPager->noSync ) pPager->needSync = 0;
}
+#endif
/*
** Open a temporary file. Write the name of the file into zName
}
+#ifndef SQLITE_OMIT_MEMORYDB
/*
** Clear a PgHistory block
*/
pHist->pOrig = 0;
pHist->pStmt = 0;
}
+#else
+#define clearHistory(x)
+#endif
/*
** Commit all changes to the database and release the write lock.
}
#endif
-#ifdef SQLITE_TEST
+#ifdef SQLITE_DEBUG
/*
** Print a listing of all referenced pages and their ref count.
*/
** This file contains C code routines that are called by the parser
** to handle SELECT statements in SQLite.
**
-** $Id: select.c,v 1.232 2005/01/20 22:48:48 drh Exp $
+** $Id: select.c,v 1.233 2005/01/21 08:13:15 danielk1977 Exp $
*/
#include "sqliteInt.h"
break;
}
+#ifndef SQLITE_OMIT_SUBQUERY
/* If we are creating a set for an "expr IN (SELECT ...)" construct,
** then there should be a single item on the stack. Write this
** item into the set table with bogus data.
}
break;
}
+#endif /* #ifndef SQLITE_OMIT_SUBQUERY */
/* Send the data to the callback function.
*/
break;
}
+#if !defined(SQLITE_OMIT_TRIGGER) || !defined(SQLITE_OMIT_CURSOR)
/* Discard the results. This is used for SELECT statements inside
** the body of a TRIGGER. The purpose of such selects is to call
** user-defined functions that have side effects. We do not care
sqlite3VdbeAddOp(v, OP_Pop, nColumn, 0);
break;
}
+#endif
}
return 0;
}
sqlite3VdbeAddOp(v, OP_PutIntKey, iParm, 0);
break;
}
+#ifndef SQLITE_OMIT_SUBQUERY
case SRT_Set: {
assert( nColumn==1 );
sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);
sqlite3VdbeAddOp(v, OP_Goto, 0, end1);
break;
}
+#endif
case SRT_Callback:
case SRT_Subroutine: {
int i;
}
break;
}
+#ifndef SQLITE_OMIT_SUBQUERY
case TK_SELECT: {
Select *pS = pExpr->pSelect;
zType = columnType(pParse, pS->pSrc, pS->pEList->a[0].pExpr);
break;
}
+#endif
default:
zType = 0;
}
generateColumnTypes(pParse, pTabList, pEList);
}
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
/*
** Name of the connection operator, used for error messages.
*/
}
return z;
}
+#endif /* SQLITE_OMIT_COMPOUND_SELECT */
/*
** Forward declaration
return 0;
}
if( pFrom->zName==0 ){
+#ifndef SQLITE_OMIT_SUBQUERY
/* A sub-query in the FROM clause of a SELECT */
assert( pFrom->pSelect!=0 );
if( pFrom->zAlias==0 ){
** pTab is not pointing to a persistent table structure that defines
** part of the schema. */
pTab->isTransient = 1;
+#endif
}else{
/* An ordinary table or view name in the FROM clause */
pFrom->pTab = pTab =
if( pTab==0 ){
return 1;
}
+#ifndef SQLITE_OMIT_VIEW
if( pTab->pSelect ){
/* We reach here if the named table is a really a view */
if( sqlite3ViewGetColumnNames(pParse, pTab) ){
pFrom->pSelect = sqlite3SelectDup(pTab->pSelect);
}
}
+#endif
}
}
}
#endif
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
/*
** This routine associates entries in an ORDER BY expression list with
** columns in a result. For each ORDER BY expression, the opcode of
}
return nErr;
}
+#endif /* #ifndef SQLITE_OMIT_COMPOUND_SELECT */
/*
** Get a VDBE for the given parser context. Create a new one if necessary.
** only a single column may be output.
*/
assert( eDest!=SRT_Exists || pEList->nExpr==1 );
+#ifndef SQLITE_OMIT_SUBQUERY
if( (eDest==SRT_Mem || eDest==SRT_Set) && pEList->nExpr>1 ){
sqlite3ErrorMsg(pParse, "only a single result allowed for "
"a SELECT that is part of an expression");
goto select_end;
}
+#endif
/* ORDER BY is ignored for some destinations.
*/
generateSortTail(pParse, p, v, pEList->nExpr, eDest, iParm);
}
+#ifndef SQLITE_OMIT_SUBQUERY
/* If this was a subquery, we have now converted the subquery into a
** temporary table. So delete the subquery structure from the parent
** to prevent this subquery from being evaluated again and to force the
sqlite3SelectDelete(p);
pParent->pSrc->a[parentTab].pSelect = 0;
}
+#endif
/* The SELECT was successfully coded. Set the return code to 0
** to indicate no errors.
** is not included in the SQLite library. It is used for automated
** testing of the SQLite library.
**
-** $Id: test3.c,v 1.60 2005/01/20 05:24:33 danielk1977 Exp $
+** $Id: test3.c,v 1.61 2005/01/21 08:13:15 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "pager.h"
return TCL_ERROR;
}
pBt = sqlite3TextToPtr(argv[1]);
+#ifdef SQLITE_DEBUG
sqlite3pager_refdump(sqlite3BtreePager(pBt));
+#endif
return TCL_OK;
}
** 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.444 2005/01/20 22:48:48 drh Exp $
+** $Id: vdbe.c,v 1.445 2005/01/21 08:13:15 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
** into an OP_String before it is executed for the first time.
*/
case OP_String8: { /* same as TK_STRING */
+#ifndef SQLITE_OMIT_UTF16
pOp->opcode = OP_String;
if( db->enc!=SQLITE_UTF8 && pOp->p3 ){
pOp->p3 = pTos->z;
break;
}
+#endif
/* Otherwise fall through to the next case, OP_String */
}
/* Fall through to the next case, OP_Blob. */
}
-#endif /* SQLITE_OMIT_BLOB_LITERAL */
/* Opcode: Blob P1 * P3
**
** by the compiler. Instead, the compiler layer specifies
** an OP_HexBlob opcode, with the hex string representation of
** the blob as P3. This opcode is transformed to an OP_Blob
-** before execution (within the sqlite3_prepare() function).
+** the first time it is executed.
*/
case OP_Blob: {
pTos++;
sqlite3VdbeMemSetStr(pTos, pOp->p3, pOp->p1, 0, 0);
break;
}
+#endif /* SQLITE_OMIT_BLOB_LITERAL */
/* Opcode: Variable P1 * *
**
sqlite3BtreeDataSize(pCrsr, &payloadSize);
}
nField = pC->nField;
+#ifndef SQLITE_OMIT_TRIGGER
}else if( pC->pseudoTable ){
/* The record is the sole entry of a pseudo-table */
payloadSize = pC->nData;
assert( payloadSize==0 || zRec!=0 );
nField = pC->nField;
pCrsr = 0;
+#endif
}else{
zRec = 0;
payloadSize = 0;
break;
}
+#ifndef SQLITE_OMIT_TRIGGER
/* Opcode: OpenPseudo P1 * *
**
** Open a new cursor that points to a fake table that contains a single
pCx->pIncrKey = &pCx->bogusIncrKey;
break;
}
+#endif
/* Opcode: Close P1 * *
**
}else{
assert( pTos->flags & (MEM_Blob|MEM_Str) );
}
+#ifndef SQLITE_OMIT_TRIGGER
if( pC->pseudoTable ){
/* PutStrKey does not work for pseudo-tables.
** The following assert makes sure we are not trying to use
}
pC->nullRow = 0;
}else{
+#endif
rc = sqlite3BtreeInsert(pC->pCursor, zKey, nKey, pTos->z, pTos->n);
+#ifndef SQLITE_OMIT_TRIGGER
}
+#endif
+
pC->recnoIsValid = 0;
pC->deferredMoveto = 0;
pC->cacheValid = 0;
}else{
sqlite3BtreeData(pCrsr, 0, n, pTos->z);
}
+#ifndef SQLITE_OMIT_TRIGGER
}else if( pC->pseudoTable ){
pTos->n = pC->nData;
pTos->z = pC->pData;
pTos->flags = MEM_Blob|MEM_Ephem;
+#endif
}else{
pTos->flags = MEM_Null;
}
break;
}
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
/* Opcode: FullKey P1 * *
**
** Extract the complete key from the record that cursor P1 is currently
}
break;
}
+#endif
/* Opcode: NullRow P1 * *
**
break;
}
+#ifndef SQLITE_OMIT_TRIGGER
/* Opcode: ContextPush * * *
**
** Save the current Vdbe context such that it can be restored by a ContextPop
p->pList = pContext->pList;
break;
}
+#endif /* #ifndef SQLITE_OMIT_TRIGGER */
/* Opcode: SortPut * * *
**
#
# Run this Tcl script to generate the compile.html file.
#
-set rcsid {$Id: compile.tcl,v 1.2 2004/11/20 08:17:18 danielk1977 Exp $ }
+set rcsid {$Id: compile.tcl,v 1.3 2005/01/21 08:13:15 danielk1977 Exp $ }
source common.tcl
header {Compilation Options For SQLite}
<a href="pragma.html#pragma_user_version">user_version</a>
pragmas are omitted.
+<p><b>SQLITE_OMIT_SUBQUERY</b><br>
+<p>If defined, support for sub-selects and the IN() operator are omitted.
+</p>
+
<p><b>SQLITE_OMIT_TCL_VARIABLE</b><br>
<p>If this macro is defined, then the special "$<variable-name>" syntax
used to automatically bind SQL variables to TCL variables is omitted.