/ Check-in [c91a93b3]
Login

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

Overview
Comment:Remove fts5 initialization code from core file main.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fts5
Files: files | file ages | folders
SHA1: c91a93b343b4d3b1a19afdb5d23d1c508f9779d2
User & Date: dan 2015-06-26 16:42:17
Context
2015-06-26
17:10
Merge changes to get FTS5 working with MSVC. check-in: 954231d2 user: mistachkin tags: fts5
16:55
Merge upstream changes. Get the test fixture working with FTS5. Fix compiler warnings. Closed-Leaf check-in: bfcd1608 user: mistachkin tags: fts5Msvc
16:42
Remove fts5 initialization code from core file main.c. check-in: c91a93b3 user: dan tags: fts5
2015-06-25
20:36
Fix Makefile.in to account for recent changes. Update fts5 test scripts so that they do not run if SQLITE_ENABLE_FTS5 is not defined. check-in: 31752207 user: dan tags: fts5
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts5/test/fts5_common.tcl.

    11     11   #
    12     12   
    13     13   if {![info exists testdir]} {
    14     14     set testdir [file join [file dirname [info script]] .. .. .. test]
    15     15   }
    16     16   source $testdir/tester.tcl
    17     17   
    18         -
    19         -catch { sqlite3_fts5_may_be_corrupt 0 }
           18  +catch { 
           19  +  sqlite3_fts5_may_be_corrupt 0 
           20  +  append G(perm:dbconfig) "; load_static_extension \$::dbhandle fts5"
           21  +  reset_db
           22  +}
    20     23   
    21     24   proc fts5_test_poslist {cmd} {
    22     25     set res [list]
    23     26     for {set i 0} {$i < [$cmd xInstCount]} {incr i} {
    24     27       lappend res [string map {{ } .} [$cmd xInst $i]]
    25     28     }
    26     29     set res

Changes to ext/fts5/test/fts5fault1.test.

   275    275   #-------------------------------------------------------------------------
   276    276   #
   277    277   do_faultsim_test 7.0 -faults oom* -prep {
   278    278     catch { db close }
   279    279   } -body {
   280    280     sqlite3 db test.db
   281    281   } -test {
   282         -  faultsim_test_result [list 0 {}] [list 1 {}]
          282  +  faultsim_test_result [list 0 {}] {1 {}} {1 {initialization of fts5 failed: }}
   283    283   }
   284    284   
   285    285   #-------------------------------------------------------------------------
   286    286   # A prefix query against a large document set.
   287    287   #
   288    288   proc rnddoc {n} {
   289    289     set map [list 0 a  1 b  2 c  3 d  4 e  5 f  6 g  7 h  8 i  9 j]

Changes to src/main.c.

    15     15   ** accessed by users of the library.
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   
    19     19   #ifdef SQLITE_ENABLE_FTS3
    20     20   # include "fts3.h"
    21     21   #endif
    22         -#ifdef SQLITE_ENABLE_FTS5
    23         -int sqlite3_fts5_init(sqlite3*, char**, const void*);
    24         -#endif
    25     22   #ifdef SQLITE_ENABLE_RTREE
    26     23   # include "rtree.h"
    27     24   #endif
    28     25   #ifdef SQLITE_ENABLE_ICU
    29     26   # include "sqliteicu.h"
    30     27   #endif
    31     28   
................................................................................
  2866   2863     }
  2867   2864   #endif
  2868   2865   
  2869   2866   #ifdef SQLITE_ENABLE_FTS3
  2870   2867     if( !db->mallocFailed && rc==SQLITE_OK ){
  2871   2868       rc = sqlite3Fts3Init(db);
  2872   2869     }
  2873         -#endif
  2874         -
  2875         -#ifdef SQLITE_ENABLE_FTS5
  2876         -  if( !db->mallocFailed && rc==SQLITE_OK ){
  2877         -    rc = sqlite3_fts5_init(db, 0, 0);
  2878         -  }
  2879   2870   #endif
  2880   2871   
  2881   2872   #ifdef SQLITE_ENABLE_ICU
  2882   2873     if( !db->mallocFailed && rc==SQLITE_OK ){
  2883   2874       rc = sqlite3IcuInit(db);
  2884   2875     }
  2885   2876   #endif

Changes to src/test1.c.

  6339   6339     extern int sqlite3_ieee_init(sqlite3*,char**,const sqlite3_api_routines*);
  6340   6340     extern int sqlite3_nextchar_init(sqlite3*,char**,const sqlite3_api_routines*);
  6341   6341     extern int sqlite3_percentile_init(sqlite3*,char**,const sqlite3_api_routines*);
  6342   6342     extern int sqlite3_regexp_init(sqlite3*,char**,const sqlite3_api_routines*);
  6343   6343     extern int sqlite3_spellfix_init(sqlite3*,char**,const sqlite3_api_routines*);
  6344   6344     extern int sqlite3_totype_init(sqlite3*,char**,const sqlite3_api_routines*);
  6345   6345     extern int sqlite3_wholenumber_init(sqlite3*,char**,const sqlite3_api_routines*);
         6346  +  extern int sqlite3_fts5_init(sqlite3*,char**,const sqlite3_api_routines*);
  6346   6347     static const struct {
  6347   6348       const char *zExtName;
  6348   6349       int (*pInit)(sqlite3*,char**,const sqlite3_api_routines*);
  6349   6350     } aExtension[] = {
  6350   6351       { "amatch",                sqlite3_amatch_init               },
  6351   6352       { "closure",               sqlite3_closure_init              },
  6352   6353       { "eval",                  sqlite3_eval_init                 },
         6354  +#ifdef SQLITE_ENABLE_FTS5
         6355  +    { "fts5",                  sqlite3_fts5_init                 },
         6356  +#endif
  6353   6357       { "fileio",                sqlite3_fileio_init               },
  6354   6358       { "fuzzer",                sqlite3_fuzzer_init               },
  6355   6359       { "ieee754",               sqlite3_ieee_init                 },
  6356   6360       { "nextchar",              sqlite3_nextchar_init             },
  6357   6361       { "percentile",            sqlite3_percentile_init           },
  6358   6362       { "regexp",                sqlite3_regexp_init               },
  6359   6363       { "spellfix",              sqlite3_spellfix_init             },