/ Check-in [00231fb0]
Login

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

Overview
Comment:Fixes to allow testfixture to be compiled with SQLITE_OMIT_VIRTUAL_TABLE defined.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 00231fb0127960d700de3549e34e82f8ec1b5819
User & Date: dan 2013-05-15 18:34:17
Context
2013-05-15
20:35
Apply compilation fix from [a58af81483] to the other makefiles as well. check-in: 7e76889d user: mistachkin tags: trunk
18:34
Fixes to allow testfixture to be compiled with SQLITE_OMIT_VIRTUAL_TABLE defined. check-in: 00231fb0 user: dan tags: trunk
17:47
The sqlite3ExprCollSeq() function can no longer be called while parse the schema, so remove the code path inside of sqlite3ExprCollSeq() that dealt with that case. check-in: 867b3e3b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/amatch.c.

   160    160   SQLITE_EXTENSION_INIT1
   161    161   #include <stdlib.h>
   162    162   #include <string.h>
   163    163   #include <assert.h>
   164    164   #include <stdio.h>
   165    165   #include <ctype.h>
   166    166   
          167  +#ifndef SQLITE_OMIT_VIRTUALTABLE
          168  +
   167    169   /*
   168    170   ** Forward declaration of objects used by this implementation
   169    171   */
   170    172   typedef struct amatch_vtab amatch_vtab;
   171    173   typedef struct amatch_cursor amatch_cursor;
   172    174   typedef struct amatch_rule amatch_rule;
   173    175   typedef struct amatch_word amatch_word;
................................................................................
  1454   1456     0,                      /* xFindMethod */
  1455   1457     0,                      /* xRename */
  1456   1458     0,                      /* xSavepoint */
  1457   1459     0,                      /* xRelease */
  1458   1460     0                       /* xRollbackTo */
  1459   1461   };
  1460   1462   
         1463  +#endif /* SQLITE_OMIT_VIRTUALTABLE */
         1464  +
  1461   1465   /*
  1462   1466   ** Register the amatch virtual table
  1463   1467   */
  1464   1468   #ifdef _WIN32
  1465   1469   __declspec(dllexport)
  1466   1470   #endif
  1467   1471   int sqlite3_amatch_init(
................................................................................
  1468   1472     sqlite3 *db, 
  1469   1473     char **pzErrMsg, 
  1470   1474     const sqlite3_api_routines *pApi
  1471   1475   ){
  1472   1476     int rc = SQLITE_OK;
  1473   1477     SQLITE_EXTENSION_INIT2(pApi);
  1474   1478     (void)pzErrMsg;  /* Not used */
         1479  +#ifndef SQLITE_OMIT_VIRTUALTABLE
  1475   1480     rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
         1481  +#endif /* SQLITE_OMIT_VIRTUALTABLE */
  1476   1482     return rc;
  1477   1483   }

Changes to ext/misc/closure.c.

   144    144   SQLITE_EXTENSION_INIT1
   145    145   #include <stdlib.h>
   146    146   #include <string.h>
   147    147   #include <assert.h>
   148    148   #include <stdio.h>
   149    149   #include <ctype.h>
   150    150   
          151  +#ifndef SQLITE_OMIT_VIRTUALTABLE
          152  +
   151    153   /*
   152    154   ** Forward declaration of objects used by this implementation
   153    155   */
   154    156   typedef struct closure_vtab closure_vtab;
   155    157   typedef struct closure_cursor closure_cursor;
   156    158   typedef struct closure_queue closure_queue;
   157    159   typedef struct closure_avl closure_avl;
................................................................................
   919    921     0,                      /* xFindMethod */
   920    922     0,                      /* xRename */
   921    923     0,                      /* xSavepoint */
   922    924     0,                      /* xRelease */
   923    925     0                       /* xRollbackTo */
   924    926   };
   925    927   
          928  +#endif /* SQLITE_OMIT_VIRTUALTABLE */
          929  +
   926    930   /*
   927    931   ** Register the closure virtual table
   928    932   */
   929    933   #ifdef _WIN32
   930    934   __declspec(dllexport)
   931    935   #endif
   932    936   int sqlite3_closure_init(
................................................................................
   933    937     sqlite3 *db, 
   934    938     char **pzErrMsg, 
   935    939     const sqlite3_api_routines *pApi
   936    940   ){
   937    941     int rc = SQLITE_OK;
   938    942     SQLITE_EXTENSION_INIT2(pApi);
   939    943     (void)pzErrMsg;
          944  +#ifndef SQLITE_OMIT_VIRTUALTABLE
   940    945     rc = sqlite3_create_module(db, "transitive_closure", &closureModule, 0);
          946  +#endif /* SQLITE_OMIT_VIRTUALTABLE */
   941    947     return rc;
   942    948   }

Changes to ext/misc/fuzzer.c.

  1162   1162   int sqlite3_fuzzer_init(
  1163   1163     sqlite3 *db, 
  1164   1164     char **pzErrMsg, 
  1165   1165     const sqlite3_api_routines *pApi
  1166   1166   ){
  1167   1167     int rc = SQLITE_OK;
  1168   1168     SQLITE_EXTENSION_INIT2(pApi);
         1169  +#ifndef SQLITE_OMIT_VIRTUALTABLE
  1169   1170     rc = sqlite3_create_module(db, "fuzzer", &fuzzerModule, 0);
         1171  +#endif
  1170   1172     return rc;
  1171   1173   }

Changes to ext/misc/spellfix.c.

    25     25   # define ALWAYS(X)  1
    26     26   # define NEVER(X)   0
    27     27     typedef unsigned char u8;
    28     28     typedef unsigned short u16;
    29     29   # include <ctype.h>
    30     30   #endif
    31     31   
           32  +#ifndef SQLITE_OMIT_VIRTUALTABLE
           33  +
    32     34   /*
    33     35   ** Character classes for ASCII characters:
    34     36   **
    35     37   **   0   ''        Silent letters:   H W
    36     38   **   1   'A'       Any vowel:   A E I O U (Y)
    37     39   **   2   'B'       A bilabeal stop or fricative:  B F P V W
    38     40   **   3   'C'       Other fricatives or back stops:  C G J K Q S X Z
................................................................................
  2817   2819     for(i=0; i<sizeof(translit)/sizeof(translit[0])-1; i++){
  2818   2820       assert( translit[i].cFrom<translit[i+1].cFrom );
  2819   2821     }
  2820   2822   
  2821   2823     return rc;
  2822   2824   }
  2823   2825   
         2826  +#endif /* SQLITE_OMIT_VIRTUALTABLE */
         2827  +
  2824   2828   /*
  2825   2829   ** Extension load function.
  2826   2830   */
  2827   2831   #ifdef _WIN32
  2828   2832   __declspec(dllexport)
  2829   2833   #endif
  2830   2834   int sqlite3_spellfix_init(
  2831   2835     sqlite3 *db, 
  2832   2836     char **pzErrMsg, 
  2833   2837     const sqlite3_api_routines *pApi
  2834   2838   ){
  2835   2839     SQLITE_EXTENSION_INIT2(pApi);
         2840  +#ifndef SQLITE_OMIT_VIRTUALTABLE
  2836   2841     return spellfix1Register(db);
         2842  +#endif
         2843  +  return SQLITE_OK;
  2837   2844   }

Changes to test/closure01.test.

    10     10   #***********************************************************************
    11     11   # 
    12     12   # Test cases for transitive_closure virtual table.
    13     13   
    14     14   set testdir [file dirname $argv0]
    15     15   source $testdir/tester.tcl
    16     16   set testprefix closure01
           17  +
           18  +ifcapable !vtab { finish_test ; return }
    17     19   
    18     20   load_static_extension db closure
    19     21   
    20     22   do_execsql_test 1.0 {
    21     23     BEGIN;
    22     24     CREATE TABLE t1(x INTEGER PRIMARY KEY, y INTEGER);
    23     25     CREATE INDEX t1y ON t1(y);

Changes to test/wal.test.

  1508   1508   
  1509   1509   do_test wal-23.3 {
  1510   1510     db close
  1511   1511     set ::log [list]
  1512   1512     faultsim_restore_and_reopen
  1513   1513     execsql { SELECT * FROM t1 }
  1514   1514   } {1 2 3 4}
  1515         -set nPage [expr 2+$AUTOVACUUM]
  1516   1515   do_test wal-23.4 { 
  1517   1516     set ::log 
  1518   1517   } [list SQLITE_NOTICE_RECOVER_WAL \
  1519         -    "recovered $nPage frames from WAL file $walfile"]
         1518  +    "recovered 2 frames from WAL file $walfile"]
  1520   1519   
  1521   1520   
  1522   1521   ifcapable autovacuum {
  1523   1522     # This block tests that if the size of a database is reduced by a 
  1524   1523     # transaction (because of an incremental or auto-vacuum), that no
  1525   1524     # data is written to the WAL file for the truncated pages as part
  1526   1525     # of the commit. e.g. if a transaction reduces the size of a database