/ Check-in [9c4d0e13]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improve test coverage for minimum feature builds. (CVS 2254)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9c4d0e13e8c5f3fc4d7fd8f495898372293f7fad
User & Date: danielk1977 2005-01-21 11:55:26
Context
2005-01-21
15:52
Final preparations for the 3.1.0 alpha release. (CVS 2255) check-in: 17122c7e user: drh tags: trunk
11:55
Improve test coverage for minimum feature builds. (CVS 2254) check-in: 9c4d0e13 user: danielk1977 tags: trunk
08:13
Exclude a few more lines of code using OMIT macros. (CVS 2253) check-in: c6fc49e6 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/btree.c.

     5      5   ** a legal notice, here is a blessing:
     6      6   **
     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12         -** $Id: btree.c,v 1.243 2005/01/21 08:13:14 danielk1977 Exp $
           12  +** $Id: btree.c,v 1.244 2005/01/21 11:55:26 danielk1977 Exp $
    13     13   **
    14     14   ** This file implements a external (disk-based) database using BTrees.
    15     15   ** For a detailed discussion of BTrees, refer to
    16     16   **
    17     17   **     Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3:
    18     18   **     "Sorting And Searching", pages 473-480. Addison-Wesley
    19     19   **     Publishing Company, Reading, Massachusetts.
................................................................................
  1327   1327   #ifndef SQLITE_OMIT_PAGER_PRAGMAS
  1328   1328   int sqlite3BtreeSetSafetyLevel(Btree *pBt, int level){
  1329   1329     sqlite3pager_set_safety_level(pBt->pPager, level);
  1330   1330     return SQLITE_OK;
  1331   1331   }
  1332   1332   #endif
  1333   1333   
         1334  +#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM)
  1334   1335   /*
  1335   1336   ** Change the default pages size and the number of reserved bytes per page.
  1336   1337   **
  1337   1338   ** The page size must be a power of 2 between 512 and 65536.  If the page
  1338   1339   ** size supplied does not meet this constraint then the page size is not
  1339   1340   ** changed.
  1340   1341   **
................................................................................
  1368   1369   */
  1369   1370   int sqlite3BtreeGetPageSize(Btree *pBt){
  1370   1371     return pBt->pageSize;
  1371   1372   }
  1372   1373   int sqlite3BtreeGetReserve(Btree *pBt){
  1373   1374     return pBt->pageSize - pBt->usableSize;
  1374   1375   }
         1376  +#endif /* !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM) */
  1375   1377   
  1376   1378   /*
  1377   1379   ** Change the 'auto-vacuum' property of the database. If the 'autoVacuum'
  1378   1380   ** parameter is non-zero, then auto-vacuum mode is enabled. If zero, it
  1379   1381   ** is disabled. The default value for the auto-vacuum property is 
  1380   1382   ** determined by the SQLITE_DEFAULT_AUTOVACUUM macro.
  1381   1383   */

Changes to src/build.c.

    18     18   **     CREATE INDEX
    19     19   **     DROP INDEX
    20     20   **     creating ID lists
    21     21   **     BEGIN TRANSACTION
    22     22   **     COMMIT
    23     23   **     ROLLBACK
    24     24   **
    25         -** $Id: build.c,v 1.296 2005/01/21 00:44:22 danielk1977 Exp $
           25  +** $Id: build.c,v 1.297 2005/01/21 11:55:27 danielk1977 Exp $
    26     26   */
    27     27   #include "sqliteInt.h"
    28     28   #include <ctype.h>
    29     29   
    30     30   /*
    31     31   ** This routine is called when a new SQL statement is beginning to
    32     32   ** be parsed.  Initialize the pParse structure as needed.
................................................................................
   423    423     */
   424    424     for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){
   425    425       pNext = pIndex->pNext;
   426    426       assert( pIndex->iDb==pTable->iDb || (pTable->iDb==0 && pIndex->iDb==1) );
   427    427       sqliteDeleteIndex(db, pIndex);
   428    428     }
   429    429   
          430  +#ifndef SQLITE_OMIT_FOREIGN_KEY
   430    431     /* Delete all foreign keys associated with this table.  The keys
   431    432     ** should have already been unlinked from the db->aFKey hash table 
   432    433     */
   433    434     for(pFKey=pTable->pFKey; pFKey; pFKey=pNextFKey){
   434    435       pNextFKey = pFKey->pNextFrom;
   435    436       assert( pTable->iDb<db->nDb );
   436    437       assert( sqlite3HashFind(&db->aDb[pTable->iDb].aFKey,
   437    438                              pFKey->zTo, strlen(pFKey->zTo)+1)!=pFKey );
   438    439       sqliteFree(pFKey);
   439    440     }
          441  +#endif
   440    442   
   441    443     /* Delete the Table structure itself.
   442    444     */
   443    445     sqliteResetColumnNames(pTable);
   444    446     sqliteFree(pTable->zName);
   445    447     sqliteFree(pTable->zColAff);
   446    448     sqlite3SelectDelete(pTable->pSelect);
................................................................................
   458    460   
   459    461     assert( db!=0 );
   460    462     assert( iDb>=0 && iDb<db->nDb );
   461    463     assert( zTabName && zTabName[0] );
   462    464     pDb = &db->aDb[iDb];
   463    465     p = sqlite3HashInsert(&pDb->tblHash, zTabName, strlen(zTabName)+1, 0);
   464    466     if( p ){
          467  +#ifndef SQLITE_OMIT_FOREIGN_KEY
   465    468       for(pF1=p->pFKey; pF1; pF1=pF1->pNextFrom){
   466    469         int nTo = strlen(pF1->zTo) + 1;
   467    470         pF2 = sqlite3HashFind(&pDb->aFKey, pF1->zTo, nTo);
   468    471         if( pF2==pF1 ){
   469    472           sqlite3HashInsert(&pDb->aFKey, pF1->zTo, nTo, pF1->pNextTo);
   470    473         }else{
   471    474           while( pF2 && pF2->pNextTo!=pF1 ){ pF2=pF2->pNextTo; }
   472    475           if( pF2 ){
   473    476             pF2->pNextTo = pF1->pNextTo;
   474    477           }
   475    478         }
   476    479       }
          480  +#endif
   477    481       sqlite3DeleteTable(db, p);
   478    482     }
   479    483     db->flags |= SQLITE_InternChanges;
   480    484   }
   481    485   
   482    486   /*
   483    487   ** Given a token, return a string that consists of the text of that
................................................................................
   513    517   /*
   514    518   ** The token *pName contains the name of a database (either "main" or
   515    519   ** "temp" or the name of an attached db). This routine returns the
   516    520   ** index of the named database in db->aDb[], or -1 if the named db 
   517    521   ** does not exist.
   518    522   */
   519    523   static int findDb(sqlite3 *db, Token *pName){
   520         -  int i;         /* Database number */
          524  +  int i = -1;    /* Database number */
   521    525     int n;         /* Number of characters in the name */
   522    526     Db *pDb;       /* A database whose name space is being searched */
   523    527     char *zName;   /* Name we are searching for */
   524    528   
   525    529     zName = sqlite3NameFromToken(pName);
   526    530     if( zName ){
   527    531       n = strlen(zName);
   528         -    for(pDb=db->aDb, i=0; i<db->nDb; i++, pDb++){
          532  +    for(i=(db->nDb-1), pDb=&db->aDb[i]; i>=0; i--, pDb--){
   529    533         if( n==strlen(pDb->zName) && 0==sqlite3StrICmp(pDb->zName, zName) ){
   530         -        sqliteFree(zName);
   531         -        return i;
          534  +        break;
   532    535         }
   533    536       }
   534    537       sqliteFree(zName);
   535    538     }
   536         -  return -1;
          539  +  return i;
   537    540   }
   538    541   
   539    542   /* The table or view or trigger name is passed to this routine via tokens
   540    543   ** pName1 and pName2. If the table name was fully qualified, for example:
   541    544   **
   542    545   ** CREATE TABLE xxx.yyy (...);
   543    546   ** 
................................................................................
  1057   1060     if( nName<0 ) nName = strlen(zName);
  1058   1061     if( db->xCollNeeded ){
  1059   1062       char *zExternal = sqliteStrNDup(zName, nName);
  1060   1063       if( !zExternal ) return;
  1061   1064       db->xCollNeeded(db->pCollNeededArg, db, (int)db->enc, zExternal);
  1062   1065       sqliteFree(zExternal);
  1063   1066     }
         1067  +#ifndef SQLITE_OMIT_UTF16
  1064   1068     if( db->xCollNeeded16 ){
  1065   1069       char const *zExternal;
  1066   1070       sqlite3_value *pTmp = sqlite3GetTransientValue(db);
  1067   1071       sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);
  1068   1072       zExternal = sqlite3ValueText(pTmp, SQLITE_UTF16NATIVE);
  1069   1073       if( !zExternal ) return;
  1070   1074       db->xCollNeeded16(db->pCollNeededArg, db, (int)db->enc, zExternal);
  1071   1075     }
         1076  +#endif
  1072   1077   }
  1073   1078   
  1074   1079   /*
  1075   1080   ** This routine is called if the collation factory fails to deliver a
  1076   1081   ** collation function in the best encoding but there may be other versions
  1077   1082   ** of this collation function (for other text encodings) available. Use one
  1078   1083   ** of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if
................................................................................
  1398   1403       ** views.  Initialize zType at the same time.
  1399   1404       */
  1400   1405       if( p->pSelect==0 ){
  1401   1406         /* A regular table */
  1402   1407         sqlite3VdbeAddOp(v, OP_CreateTable, p->iDb, 0);
  1403   1408         zType = "table";
  1404   1409         zType2 = "TABLE";
         1410  +#ifndef SQLITE_OMIT_VIEW
  1405   1411       }else{
  1406   1412         /* A view */
  1407   1413         sqlite3VdbeAddOp(v, OP_Integer, 0, 0);
  1408   1414         zType = "view";
  1409   1415         zType2 = "VIEW";
         1416  +#endif
  1410   1417       }
  1411   1418   
  1412   1419       /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT
  1413   1420       ** statement to populate the new table. The root-page number for the
  1414   1421       ** new table is on the top of the vdbe stack.
  1415   1422       **
  1416   1423       ** Once the SELECT has been coded by sqlite3Select(), it is in a
................................................................................
  1492   1499       FKey *pFKey; 
  1493   1500       Db *pDb = &db->aDb[p->iDb];
  1494   1501       pOld = sqlite3HashInsert(&pDb->tblHash, p->zName, strlen(p->zName)+1, p);
  1495   1502       if( pOld ){
  1496   1503         assert( p==pOld );  /* Malloc must have failed inside HashInsert() */
  1497   1504         return;
  1498   1505       }
         1506  +#ifndef SQLITE_OMIT_FOREIGN_KEY
  1499   1507       for(pFKey=p->pFKey; pFKey; pFKey=pFKey->pNextFrom){
  1500   1508         int nTo = strlen(pFKey->zTo) + 1;
  1501   1509         pFKey->pNextTo = sqlite3HashFind(&pDb->aFKey, pFKey->zTo, nTo);
  1502   1510         sqlite3HashInsert(&pDb->aFKey, pFKey->zTo, nTo, pFKey);
  1503   1511       }
         1512  +#endif
  1504   1513       pParse->pNewTable = 0;
  1505   1514       db->nTable++;
  1506   1515       db->flags |= SQLITE_InternChanges;
  1507   1516     }
  1508   1517   }
  1509   1518   
  1510   1519   #ifndef SQLITE_OMIT_VIEW
................................................................................
  1807   1816       }
  1808   1817     }
  1809   1818   #endif
  1810   1819     if( pTab->readOnly || pTab==db->aDb[iDb].pSeqTab ){
  1811   1820       sqlite3ErrorMsg(pParse, "table %s may not be dropped", pTab->zName);
  1812   1821       goto exit_drop_table;
  1813   1822     }
         1823  +
         1824  +#ifndef SQLITE_OMIT_VIEW
         1825  +  /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used
         1826  +  ** on a table.
         1827  +  */
  1814   1828     if( isView && pTab->pSelect==0 ){
  1815   1829       sqlite3ErrorMsg(pParse, "use DROP TABLE to delete table %s", pTab->zName);
  1816   1830       goto exit_drop_table;
  1817   1831     }
  1818   1832     if( !isView && pTab->pSelect ){
  1819   1833       sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
  1820   1834       goto exit_drop_table;
  1821   1835     }
         1836  +#endif
  1822   1837   
  1823   1838     /* Generate code to remove the table from the master table
  1824   1839     ** on disk.
  1825   1840     */
  1826   1841     v = sqlite3GetVdbe(pParse);
  1827   1842     if( v ){
  1828   1843       Trigger *pTrigger;
................................................................................
  2140   2155     }
  2141   2156   
  2142   2157     if( pTab==0 || pParse->nErr ) goto exit_create_index;
  2143   2158     if( pTab->readOnly ){
  2144   2159       sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
  2145   2160       goto exit_create_index;
  2146   2161     }
         2162  +#ifndef SQLITE_OMIT_VIEW
  2147   2163     if( pTab->pSelect ){
  2148   2164       sqlite3ErrorMsg(pParse, "views may not be indexed");
  2149   2165       goto exit_create_index;
  2150   2166     }
         2167  +#endif
  2151   2168     isTemp = pTab->iDb==1;
  2152   2169   
  2153   2170     /*
  2154   2171     ** Find the name of the index.  Make sure there is not already another
  2155   2172     ** index or table with the same name.  
  2156   2173     **
  2157   2174     ** Exception:  If we are reading the names of permanent indices from the
................................................................................
  2802   2819       sqlite3VdbeAddOp(v, OP_Statement, iDb, 0);
  2803   2820     }
  2804   2821     if( iDb!=1 && pParse->db->aDb[1].pBt!=0 ){
  2805   2822       sqlite3BeginWriteOperation(pParse, setStatement, 1);
  2806   2823     }
  2807   2824   }
  2808   2825   
         2826  +#ifndef SQLITE_OMIT_UTF16
  2809   2827   /* 
  2810   2828   ** Return the transient sqlite3_value object used for encoding conversions
  2811   2829   ** during SQL compilation.
  2812   2830   */
  2813   2831   sqlite3_value *sqlite3GetTransientValue(sqlite3 *db){
  2814   2832     if( !db->pValue ){
  2815   2833       db->pValue = sqlite3ValueNew();
  2816   2834     }
  2817   2835     return db->pValue;
  2818   2836   }
         2837  +#endif
  2819   2838   
  2820   2839   /*
  2821   2840   ** Check to see if pIndex uses the collating sequence pColl.  Return
  2822   2841   ** true if it does and false if it does not.
  2823   2842   */
  2824   2843   #ifndef SQLITE_OMIT_REINDEX
  2825   2844   static int collationMatch(CollSeq *pColl, Index *pIndex){

Changes to src/test1.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** Code for testing the printf() interface to SQLite.  This code
    13     13   ** is not included in the SQLite library.  It is used for automated
    14     14   ** testing of the SQLite library.
    15     15   **
    16         -** $Id: test1.c,v 1.125 2005/01/21 03:12:16 danielk1977 Exp $
           16  +** $Id: test1.c,v 1.126 2005/01/21 11:55:27 danielk1977 Exp $
    17     17   */
    18     18   #include "sqliteInt.h"
    19     19   #include "tcl.h"
    20     20   #include "os.h"
    21     21   #include <stdlib.h>
    22     22   #include <string.h>
    23     23   
................................................................................
   474    474     void *NotUsed,
   475    475     Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
   476    476     int argc,              /* Number of arguments */
   477    477     char **argv            /* Text of each argument */
   478    478   ){
   479    479     int rc;
   480    480     sqlite3 *db;
   481         -  sqlite3_value *pVal;
   482    481     extern void Md5_Register(sqlite3*);
   483    482   
   484    483     if( argc!=2 ){
   485    484       Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
   486    485          " DB\"", 0);
   487    486       return TCL_ERROR;
   488    487     }
................................................................................
   490    489     rc = sqlite3_create_function(db, "x_coalesce", -1, SQLITE_ANY, 0, 
   491    490           ifnullFunc, 0, 0);
   492    491   
   493    492   #ifndef SQLITE_OMIT_UTF16
   494    493     /* Use the sqlite3_create_function16() API here. Mainly for fun, but also 
   495    494     ** because it is not tested anywhere else. */
   496    495     if( rc==SQLITE_OK ){
          496  +    sqlite3_value *pVal;
   497    497       pVal = sqlite3ValueNew();
   498    498       sqlite3ValueSetStr(pVal, -1, "x_sqlite_exec", SQLITE_UTF8, SQLITE_STATIC);
   499    499       rc = sqlite3_create_function16(db, 
   500    500                 sqlite3ValueText(pVal, SQLITE_UTF16NATIVE),
   501    501                 1, SQLITE_UTF16, db, sqlite3ExecFunc, 0, 0);
   502    502       sqlite3ValueFree(pVal);
   503    503     }

Changes to test/attach.test.

     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is testing the ATTACH and DETACH commands
    13     13   # and related functionality.
    14     14   #
    15         -# $Id: attach.test,v 1.33 2005/01/21 04:25:47 danielk1977 Exp $
           15  +# $Id: attach.test,v 1.34 2005/01/21 11:55:27 danielk1977 Exp $
    16     16   #
    17     17   
    18     18   set testdir [file dirname $argv0]
    19     19   source $testdir/tester.tcl
    20     20   
    21     21   for {set i 2} {$i<=15} {incr i} {
    22     22     file delete -force test$i.db
................................................................................
   675    675       file attributes cannot-read -permission 0000
   676    676       catchsql {
   677    677         ATTACH DATABASE 'cannot-read' AS noread;
   678    678       }
   679    679     } {1 {unable to open database: cannot-read}}
   680    680     file delete -force cannot-read
   681    681   }
          682  +
          683  +# Check the error message if we try to access a database that has
          684  +# not been attached.
          685  +do_test attach-6.3 {
          686  +  catchsql {
          687  +    CREATE TABLE no_such_db.t1(a, b, c);
          688  +  }
          689  +} {1 {unknown database no_such_db}}
          690  +do_test attach-6.4 {
          691  +  catchsql {
          692  +    CREATE TEMP TABLE db2.temp1(a, b, c);
          693  +  }
          694  +} {1 {temporary table name must be unqualified}}
   682    695   
   683    696   for {set i 2} {$i<=15} {incr i} {
   684    697     catch {db$i close}
   685    698   }
   686    699   db close
   687    700   file delete -force test2.db
   688    701   file delete -force no-such-file
   689    702   
   690    703   
   691    704   finish_test

Changes to test/autoinc.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #*************************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is testing the AUTOINCREMENT features.
    13     13   #
    14         -# $Id: autoinc.test,v 1.2 2004/11/22 13:35:42 danielk1977 Exp $
           14  +# $Id: autoinc.test,v 1.3 2005/01/21 11:55:27 danielk1977 Exp $
    15     15   #
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   # If the library is not compiled with autoincrement support then
    21     21   # skip all tests in this file.
................................................................................
   471    471       INSERT INTO t7(y) VALUES(123);
   472    472       INSERT INTO t7(y) VALUES(234);
   473    473       DELETE FROM t7;
   474    474       INSERT INTO t7(y) VALUES(345);
   475    475       SELECT * FROM t7;
   476    476     }
   477    477   } {3 345}
          478  +
          479  +# Test that if the AUTOINCREMENT is applied to a non integer primary key
          480  +# the error message is sensible.
          481  +do_test autoinc-7.2 {
          482  +  catchsql {
          483  +    CREATE TABLE t8(x TEXT PRIMARY KEY AUTOINCREMENT);
          484  +  }
          485  +} {1 {AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY}}
   478    486   
   479    487   catch {db2 close}
   480    488   finish_test

Changes to test/expr.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this file is testing expressions.
    13     13   #
    14         -# $Id: expr.test,v 1.42 2005/01/21 03:12:16 danielk1977 Exp $
           14  +# $Id: expr.test,v 1.43 2005/01/21 11:55:27 danielk1977 Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   # Create a table to work with.
    20     20   #
    21     21   execsql {CREATE TABLE test1(i1 int, i2 int, r1 real, r2 real, t1 text, t2 text)}
................................................................................
   548    548     } 1
   549    549   }
   550    550   set sqlite_current_time 0
   551    551   
   552    552   do_test expr-9.1 {
   553    553     execsql {SELECT round(-('-'||'123'))}
   554    554   } 123
          555  +
          556  +# Test an error message that can be generated by the LIKE expression
          557  +do_test expr-10.1 {
          558  +  catchsql {SELECT 'abc' LIKE 'abc' ESCAPE ''}
          559  +} {1 {ESCAPE expression must be a single character}}
          560  +do_test expr-10.2 {
          561  +  catchsql {SELECT 'abc' LIKE 'abc' ESCAPE 'ab'}
          562  +} {1 {ESCAPE expression must be a single character}}
   555    563   
   556    564   finish_test

Changes to test/func.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this file is testing built-in functions.
    13     13   #
    14         -# $Id: func.test,v 1.32 2005/01/20 02:17:02 danielk1977 Exp $
           14  +# $Id: func.test,v 1.33 2005/01/21 11:55:28 danielk1977 Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   # Create a table to work with.
    20     20   #
    21     21   do_test func-0.0 {
................................................................................
   457    457   
   458    458   do_test func-15.1 {
   459    459     catchsql {
   460    460       select test_error(NULL);
   461    461     }
   462    462   } {1 {user function error}}
   463    463   
          464  +# Test the quote function for BLOB and NULL values.
          465  +do_test func-16.1 {
          466  +  execsql {
          467  +    CREATE TABLE tbl2(a, b);
          468  +  }
          469  +  set STMT [sqlite3_prepare $::DB "INSERT INTO tbl2 VALUES(?, ?)" -1 TAIL]
          470  +  sqlite3_bind_blob $::STMT 1 abc 3
          471  +  sqlite3_step $::STMT
          472  +  sqlite3_finalize $::STMT
          473  +  execsql {
          474  +    SELECT quote(a), quote(b) FROM tbl2;
          475  +  }
          476  +} {X'616263' NULL}
          477  +
   464    478   finish_test
          479  +

Changes to test/subquery.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #*************************************************************************
    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this script is testing correlated subqueries
    13     13   #
    14         -# $Id: subquery.test,v 1.1 2005/01/21 02:34:44 drh Exp $
           14  +# $Id: subquery.test,v 1.2 2005/01/21 11:55:28 danielk1977 Exp $
    15     15   #
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
           19  +
           20  +ifcapable !subquery {
           21  +  finish_test
           22  +  return
           23  +}
    19     24   
    20     25   do_test subquery-1.1 {
    21     26     execsql {
    22     27       BEGIN;
    23     28       CREATE TABLE t1(a,b);
    24     29       INSERT INTO t1 VALUES(1,2);
    25     30       INSERT INTO t1 VALUES(3,4);