]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Exclude a few more lines of code using OMIT macros. (CVS 2253)
authordanielk1977 <danielk1977@noemail.net>
Fri, 21 Jan 2005 08:13:14 +0000 (08:13 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Fri, 21 Jan 2005 08:13:14 +0000 (08:13 +0000)
FossilOrigin-Name: c6fc49e61033419e78b6b10638d57f4942087961

manifest
manifest.uuid
src/btree.c
src/expr.c
src/main.c
src/pager.c
src/select.c
src/test3.c
src/vdbe.c
www/compile.tcl

index 2dc93c681d16ac3e1c1b050755e4f0790cdb0f7b..aa1ca54669cd72e212492db65560976bc72187ea 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-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
@@ -29,20 +29,20 @@ F sqlite3.def dbaeb20c153e1d366e8f421b55a573f5dfc00863
 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
@@ -52,13 +52,13 @@ F src/os_unix.c 77319e31f5284c5714239cf50ae28552286414df
 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
@@ -66,7 +66,7 @@ F src/table.c 25b3ff2b39b7d87e8d4a5da0713d68dfc06cbee9
 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
@@ -75,7 +75,7 @@ F src/update.c 6e5c6eb660a5508c449c6d637571e24ef13f70a1
 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
@@ -239,7 +239,7 @@ F www/capi3.tcl 9676103393dbf1c313b5618c9da59033f82cd924
 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
@@ -271,7 +271,7 @@ F www/tclsqlite.tcl e73f8f8e5f20e8277619433f7970060ab01088fc
 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
index c277e9630f229e7b116f09660a9a2160ea9b9803..9d4663d2dfdf070c67024a21728b7c0db8c5934c 100644 (file)
@@ -1 +1 @@
-d4e19efcef68d834c55c7d496cdb3696d63a31a2
\ No newline at end of file
+c6fc49e61033419e78b6b10638d57f4942087961
\ No newline at end of file
index e55d45087cd4e0aa28bfc2303a33fb9ccdbc08cd..8eb474c7cffbd56ae62bdbb67adc5987973f91b1 100644 (file)
@@ -9,7 +9,7 @@
 **    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
@@ -1324,10 +1324,12 @@ int sqlite3BtreeSetCacheSize(Btree *pBt, int mxPage){
 ** 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.
index c96eb59ec6112aba89c5c63de257cae8bfcb5578..a47e35057ea4e6818f804335d7379950c0e42798 100644 (file)
@@ -12,7 +12,7 @@
 ** 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>
@@ -446,6 +446,15 @@ ExprList *sqlite3ExprListDup(ExprList *p){
   }
   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;
@@ -509,6 +518,12 @@ Select *sqlite3SelectDup(Select *p){
   pNew->pFetch = 0;
   return pNew;
 }
+#else
+Select *sqlite3SelectDup(Select *p){
+  assert( p==0 );
+  return 0;
+}
+#endif
 
 
 /*
@@ -1549,7 +1564,6 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
       VdbeComment((v, "# load subquery result"));
       break;
     }
-#endif
     case TK_IN: {
       int addr;
       char affinity;
@@ -1577,6 +1591,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
 
       break;
     }
+#endif
     case TK_BETWEEN: {
       Expr *pLeft = pExpr->pLeft;
       struct ExprList_item *pLItem = pExpr->pList->a;
@@ -1669,6 +1684,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
   }
 }
 
+#ifndef SQLITE_OMIT_TRIGGER
 /*
 ** Generate code that evalutes the given expression and leaves the result
 ** on the stack.  See also sqlite3ExprCode().
@@ -1693,6 +1709,7 @@ void sqlite3ExprCodeAndCache(Parse *pParse, Expr *pExpr){
     pExpr->op = TK_REGISTER;
   }
 }
+#endif
 
 /*
 ** Generate code that pushes the value of every element of the given
index 302caa6f8252a73e42e8a0a351dd95126c27c3b7..e2ffd31a39fbc26128c475de43cb5fb434de9a3b 100644 (file)
@@ -14,7 +14,7 @@
 ** 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"
@@ -713,6 +713,7 @@ int sqlite3_create_function(
     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.
@@ -732,6 +733,9 @@ int sqlite3_create_function(
     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;
@@ -741,6 +745,7 @@ int sqlite3_create_function(
   p->pUserData = pUserData;
   return SQLITE_OK;
 }
+#ifndef SQLITE_OMIT_UTF16
 int sqlite3_create_function16(
   sqlite3 *db,
   const void *zFunctionName,
@@ -769,6 +774,7 @@ int sqlite3_create_function16(
       pUserData, xFunc, xStep, xFinal);
   return rc;
 }
+#endif
 
 /*
 ** Register a trace function.  The pArg from the previously registered trace
@@ -1013,6 +1019,7 @@ int sqlite3_prepare(
   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);
@@ -1021,6 +1028,7 @@ int sqlite3_prepare(
     sqlite3VdbeSetColName(sParse.pVdbe, 3, "p2", P3_STATIC);
     sqlite3VdbeSetColName(sParse.pVdbe, 4, "p3", P3_STATIC);
   } 
+#endif
 
 prepare_out:
   if( sqlite3SafetyOff(db) ){
index 1a53c4ce3cbfd1ec251451d0b3de0c54d6eab58a..5f0f71a67cd9a014eb07ba0335117a00fa0343f1 100644 (file)
@@ -18,7 +18,7 @@
 ** 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"
@@ -1438,11 +1438,13 @@ void sqlite3pager_set_cachesize(Pager *pPager, int mxPage){
 ** 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
@@ -2847,6 +2849,7 @@ void sqlite3pager_dont_rollback(void *pData){
 }
 
 
+#ifndef SQLITE_OMIT_MEMORYDB
 /*
 ** Clear a PgHistory block
 */
@@ -2856,6 +2859,9 @@ static void clearHistory(PgHistory *pHist){
   pHist->pOrig = 0;
   pHist->pStmt = 0;
 }
+#else
+#define clearHistory(x)
+#endif
 
 /*
 ** Commit all changes to the database and release the write lock.
@@ -3418,7 +3424,7 @@ int sqlite3pager_lockstate(Pager *pPager){
 }
 #endif
 
-#ifdef SQLITE_TEST
+#ifdef SQLITE_DEBUG
 /*
 ** Print a listing of all referenced pages and their ref count.
 */
index 74c4c04dc86d2f01cf249f2b69619afdf6b47b73..533d1b231e8de3d83fd9eeeedd5788c82f27bd2b 100644 (file)
@@ -12,7 +12,7 @@
 ** 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"
 
@@ -475,6 +475,7 @@ static int selectInnerLoop(
       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.
@@ -515,6 +516,7 @@ static int selectInnerLoop(
       }
       break;
     }
+#endif /* #ifndef SQLITE_OMIT_SUBQUERY */
 
     /* Send the data to the callback function.
     */
@@ -543,6 +545,7 @@ static int selectInnerLoop(
       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
@@ -553,6 +556,7 @@ static int selectInnerLoop(
       sqlite3VdbeAddOp(v, OP_Pop, nColumn, 0);
       break;
     }
+#endif
   }
   return 0;
 }
@@ -608,6 +612,7 @@ static void generateSortTail(
       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);
@@ -625,6 +630,7 @@ static void generateSortTail(
       sqlite3VdbeAddOp(v, OP_Goto, 0, end1);
       break;
     }
+#endif
     case SRT_Callback:
     case SRT_Subroutine: {
       int i;
@@ -692,11 +698,13 @@ static const char *columnType(Parse *pParse, SrcList *pTabList, Expr *pExpr){
       }
       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;
   }
@@ -803,6 +811,7 @@ static void generateColumnNames(
   generateColumnTypes(pParse, pTabList, pEList);
 }
 
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
 /*
 ** Name of the connection operator, used for error messages.
 */
@@ -816,6 +825,7 @@ static const char *selectOpName(int id){
   }
   return z;
 }
+#endif /* SQLITE_OMIT_COMPOUND_SELECT */
 
 /*
 ** Forward declaration
@@ -958,6 +968,7 @@ static int prepSelectStmt(Parse *pParse, Select *p){
       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 ){
@@ -974,6 +985,7 @@ static int prepSelectStmt(Parse *pParse, Select *p){
       ** 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 = 
@@ -981,6 +993,7 @@ static int prepSelectStmt(Parse *pParse, Select *p){
       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) ){
@@ -995,6 +1008,7 @@ static int prepSelectStmt(Parse *pParse, Select *p){
           pFrom->pSelect = sqlite3SelectDup(pTab->pSelect);
         }
       }
+#endif
     }
   }
 
@@ -1147,6 +1161,7 @@ void sqlite3SelectUnbind(Select *p){
 }
 #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
@@ -1229,6 +1244,7 @@ static int matchOrderbyToColumn(
   }
   return nErr;  
 }
+#endif /* #ifndef SQLITE_OMIT_COMPOUND_SELECT */
 
 /*
 ** Get a VDBE for the given parser context.  Create a new one if necessary.
@@ -2376,11 +2392,13 @@ int sqlite3Select(
   ** 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.
   */
@@ -2707,6 +2725,7 @@ int sqlite3Select(
     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
@@ -2718,6 +2737,7 @@ int sqlite3Select(
     sqlite3SelectDelete(p);
     pParent->pSrc->a[parentTab].pSelect = 0;
   }
+#endif
 
   /* The SELECT was successfully coded.   Set the return code to 0
   ** to indicate no errors.
index 2997a29f4ea2fc06a3dec2a0c8a612d4617c6fd3..800f86f0c449fcd4797f43edb673384e50c43758 100644 (file)
@@ -13,7 +13,7 @@
 ** 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"
@@ -546,7 +546,9 @@ static int btree_pager_ref_dump(
     return TCL_ERROR;
   }
   pBt = sqlite3TextToPtr(argv[1]);
+#ifdef SQLITE_DEBUG
   sqlite3pager_refdump(sqlite3BtreePager(pBt));
+#endif
   return TCL_OK;
 }
 
index 5c0ec7da40ab6236af8221baadc8fe49bceaa164..69b5c9449b7f2f9dae70660702b94dc93bb86d9a 100644 (file)
@@ -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.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"
@@ -680,6 +680,7 @@ case OP_Real: {            /* same as TK_FLOAT */
 ** 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 ){
@@ -696,6 +697,7 @@ case OP_String8: {         /* same as TK_STRING */
     pOp->p3 = pTos->z;
     break;
   }
+#endif
   /* Otherwise fall through to the next case, OP_String */
 }
   
@@ -757,7 +759,6 @@ case OP_HexBlob: {            /* same as TK_BLOB */
 
   /* Fall through to the next case, OP_Blob. */
 }
-#endif /* SQLITE_OMIT_BLOB_LITERAL */
 
 /* Opcode: Blob P1 * P3
 **
@@ -766,13 +767,14 @@ case OP_HexBlob: {            /* same as TK_BLOB */
 ** 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 * *
 **
@@ -1752,6 +1754,7 @@ case OP_Column: {
       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;
@@ -1760,6 +1763,7 @@ case OP_Column: {
     assert( payloadSize==0 || zRec!=0 );
     nField = pC->nField;
     pCrsr = 0;
+#endif
   }else{
     zRec = 0;
     payloadSize = 0;
@@ -2448,6 +2452,7 @@ case OP_OpenTemp: {
   break;
 }
 
+#ifndef SQLITE_OMIT_TRIGGER
 /* Opcode: OpenPseudo P1 * *
 **
 ** Open a new cursor that points to a fake table that contains a single
@@ -2469,6 +2474,7 @@ case OP_OpenPseudo: {
   pCx->pIncrKey = &pCx->bogusIncrKey;
   break;
 }
+#endif
 
 /* Opcode: Close P1 * *
 **
@@ -3020,6 +3026,7 @@ case OP_PutStrKey: {
     }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
@@ -3041,8 +3048,12 @@ case OP_PutStrKey: {
       }
       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;
@@ -3173,10 +3184,12 @@ case OP_RowData: {
     }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;
   }
@@ -3217,6 +3230,7 @@ case OP_Recno: {
   break;
 }
 
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
 /* Opcode: FullKey P1 * *
 **
 ** Extract the complete key from the record that cursor P1 is currently
@@ -3265,6 +3279,7 @@ case OP_FullKey: {
   }
   break;
 }
+#endif
 
 /* Opcode: NullRow P1 * *
 **
@@ -3937,6 +3952,7 @@ case OP_ListReset: {
   break;
 }
 
+#ifndef SQLITE_OMIT_TRIGGER
 /* Opcode: ContextPush * * * 
 **
 ** Save the current Vdbe context such that it can be restored by a ContextPop
@@ -3977,6 +3993,7 @@ case OP_ContextPop: {
   p->pList = pContext->pList;
   break;
 }
+#endif /* #ifndef SQLITE_OMIT_TRIGGER */
 
 /* Opcode: SortPut * * *
 **
index 3a1bba8481b4a5666cf0615d16733923c0715ece..d30f52419d013f51df9f555d1f5aa6caa89fe9d9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # 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}
 
@@ -206,6 +206,10 @@ database schema version and user version from the build. Specifically, the
 <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.