From b2682eb14b19c0c075595f72a083bdbc3e78d168 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Thu, 8 Oct 2015 17:35:51 +0000 Subject: [PATCH 01/15] In the RBU extension, use MoveFile() instead of rename() on Windows CE. FossilOrigin-Name: df9ef61f1ba2e3a3420fae84e3eaa2e0e235bc28 --- ext/rbu/sqlite3rbu.c | 59 ++++++++++++++++++++++++++++++++++++++++++-- manifest | 14 +++++------ manifest.uuid | 2 +- 3 files changed, 65 insertions(+), 10 deletions(-) diff --git a/ext/rbu/sqlite3rbu.c b/ext/rbu/sqlite3rbu.c index d76d2f4ccd..4c38e14c9e 100644 --- a/ext/rbu/sqlite3rbu.c +++ b/ext/rbu/sqlite3rbu.c @@ -89,6 +89,10 @@ #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RBU) #include "sqlite3rbu.h" +#if defined(_WIN32_WCE) +#include "windows.h" +#endif + /* Maximum number of prepared UPDATE statements held by this module */ #define SQLITE_RBU_UPDATE_CACHESIZE 16 @@ -2382,6 +2386,30 @@ static void rbuLockDatabase(sqlite3rbu *p){ } } +#if defined(_WIN32_WCE) +static LPWSTR rbuWinUtf8ToUnicode(const char *zFilename){ + int nChar; + LPWSTR zWideFilename; + + nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0); + if( nChar==0 ){ + return 0; + } + zWideFilename = sqlite3_malloc( nChar*sizeof(zWideFilename[0]) ); + if( zWideFilename==0 ){ + return 0; + } + memset(zWideFilename, 0, nChar*sizeof(zWideFilename[0])); + nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename, + nChar); + if( nChar==0 ){ + sqlite3_free(zWideFilename); + zWideFilename = 0; + } + return zWideFilename; +} +#endif + /* ** The RBU handle is currently in RBU_STAGE_OAL state, with a SHARED lock ** on the database file. This proc moves the *-oal file to the *-wal path, @@ -2416,10 +2444,37 @@ static void rbuMoveOalFile(sqlite3rbu *p){ rbuObjIterFinalize(&p->objiter); sqlite3_close(p->dbMain); sqlite3_close(p->dbRbu); + p->dbMain = 0; + p->dbRbu = 0; + +#if defined(_WIN32_WCE) + { + LPWSTR zWideOal; + LPWSTR zWideWal; + + zWideOal = rbuWinUtf8ToUnicode(zOal); + if( zWideOal ){ + zWideWal = rbuWinUtf8ToUnicode(zWal); + if( zWideWal ){ + if( MoveFileW(zWideOal, zWideWal) ){ + p->rc = SQLITE_OK; + }else{ + p->rc = SQLITE_IOERR; + } + sqlite3_free(zWideWal); + }else{ + p->rc = SQLITE_IOERR_NOMEM; + } + sqlite3_free(zWideOal); + }else{ + p->rc = SQLITE_IOERR_NOMEM; + } + } +#else p->rc = rename(zOal, zWal) ? SQLITE_IOERR : SQLITE_OK; +#endif + if( p->rc==SQLITE_OK ){ - p->dbMain = 0; - p->dbRbu = 0; rbuOpenDatabase(p); rbuSetupCheckpoint(p, 0); } diff --git a/manifest b/manifest index 773704bd6c..21a3f451d2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\stwo\sunused\slines\sof\scode\s-\sdiscovered\sby\sscan-build. -D 2015-10-08T02:44:42.485 +C In\sthe\sRBU\sextension,\suse\sMoveFile()\sinstead\sof\srename()\son\sWindows\sCE. +D 2015-10-08T17:35:51.419 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 2143eeef6d0cc26006ae5fc4bb242a4a8b973412 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -232,7 +232,7 @@ F ext/rbu/rbufault.test cc0be8d5d392d98b0c2d6a51be377ea989250a89 F ext/rbu/rbufault2.test 9a7f19edd6ea35c4c9f807d8a3db0a03a5670c06 F ext/rbu/rbufts.test 828cd689da825f0a7b7c53ffc1f6f7fdb6fa5bda F ext/rbu/rbusave.test 0f43b6686084f426ddd040b878426452fd2c2f48 -F ext/rbu/sqlite3rbu.c 4ba82bd850aa012f73c31dd242d570f18c9cc35a +F ext/rbu/sqlite3rbu.c ea47de615e911b3a69a8e7fb3be3866298403a25 F ext/rbu/sqlite3rbu.h 5357f070cd8c0bcad459b620651ec1656859e4d0 F ext/rbu/test_rbu.c 2a3652241fa45d5eaa141775e4ae68c1d3582c03 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 83dc1ff7fa010715ca7f406a572f4ee444a967d7 -R 23aa9f023fe3604f2c01d6814f9077e1 -U drh -Z 20dd7ef754329d35cfe6df88eb2905f9 +P 77b707b77496a08703fe9405e8e4521a4e5b419e +R eb5e353b0e8d7971537e54b62cea0233 +U mistachkin +Z 4af6b4774e4af64194b7825912a990a6 diff --git a/manifest.uuid b/manifest.uuid index f50ffd68a4..2d8861387e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -77b707b77496a08703fe9405e8e4521a4e5b419e \ No newline at end of file +df9ef61f1ba2e3a3420fae84e3eaa2e0e235bc28 \ No newline at end of file From 50065656f7d038d8b1796edb83ecaa5347da5a1d Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 8 Oct 2015 19:29:18 +0000 Subject: [PATCH 02/15] First attempt to add json1 and fts5 to the amalgamation. This check-in does not compile. FossilOrigin-Name: d820a1bd1b8dd702d1b3a099af393530cc5a5d51 --- Makefile.in | 36 ++++++++++++++++++++---------------- Makefile.msc | 35 +++++++++++++++++++---------------- ext/fts5/fts5_main.c | 28 ++++++++++++++++------------ ext/fts5/tool/mkfts5c.tcl | 8 ++------ ext/misc/json1.c | 2 ++ main.mk | 35 ++++++++++++++++++----------------- manifest | 35 +++++++++++++++++++---------------- manifest.uuid | 2 +- src/ctime.c | 6 ++++++ src/main.c | 9 ++++++++- src/shell.c | 7 ------- tool/mksqlite3c.tcl | 2 ++ tool/mksqlite3h.tcl | 1 + 13 files changed, 114 insertions(+), 92 deletions(-) diff --git a/Makefile.in b/Makefile.in index 5c78abde94..f78d6cf092 100644 --- a/Makefile.in +++ b/Makefile.in @@ -346,7 +346,10 @@ SRC += \ $(TOP)/ext/rtree/rtree.c SRC += \ $(TOP)/ext/rbu/sqlite3rbu.h \ - $(TOP)/ext/rbu/sqlite3rbu.c + $(TOP)/ext/rbu/sqlite3rbu.c\ +SRC += \ + $(TOP)/ext/misc/json1.c + # Generated source code files @@ -541,16 +544,16 @@ FUZZDATA = \ $(TOP)/test/fuzzdata3.db \ $(TOP)/test/fuzzdata4.db -# Extra arguments for including json1 in the build of tools -# -JSON1_DEP = $(TOP)/ext/misc/json1.c sqlite3ext.h -JSON1_OPT = -DSQLITE_SHELL_JSON1 -DSQLITE_CORE -JSON1_SRC = $(TOP)/ext/misc/json1.c - # Standard options to testfixture # TESTOPTS = --verbose=file --output=test-out.txt +# Extra compiler options for various shell tools +# +SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 +FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 +FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 + # This is the default Makefile target. The objects listed here # are what get build when you type just "make" with no arguments. # @@ -573,20 +576,20 @@ libtclsqlite3.la: tclsqlite.lo libsqlite3.la -version-info "8:6:8" \ -avoid-version -sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h $(JSON1_DEP) - $(LTLINK) $(READLINE_FLAGS) $(JSON1_OPT) -o $@ \ - $(TOP)/src/shell.c $(JSON1_SRC) libsqlite3.la \ +sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h + $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \ + $(TOP)/src/shell.c libsqlite3.la \ $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)" sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) -fuzzershell$(TEXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h $(JSON1_DEP) - $(LTLINK) -o $@ $(JSON1_OPT) \ - $(TOP)/tool/fuzzershell.c $(JSON1_SRC) sqlite3.c $(TLIBS) +fuzzershell$(TEXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h + $(LTLINK) -o $@ $(FUZZERSHELL_OPT) \ + $(TOP)/tool/fuzzershell.c sqlite3.c $(TLIBS) -fuzzcheck$(TEXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h $(JSON1_DEP) - $(LTLINK) -o $@ $(JSON1_OPT) $(TOP)/test/fuzzcheck.c $(JSON1_SRC) sqlite3.c $(TLIBS) +fuzzcheck$(TEXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h + $(LTLINK) -o $@ $(FUZZCHECK_OPT) $(TOP)/test/fuzzcheck.c sqlite3.c $(TLIBS) mptester$(TEXE): sqlite3.c $(TOP)/mptest/mptest.c $(LTLINK) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \ @@ -612,13 +615,14 @@ mptest: mptester$(TEXE) # files are automatically generated. This target takes care of # all that automatic generation. # -.target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl +.target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl fts5.c rm -rf tsrc mkdir tsrc cp -f $(SRC) tsrc rm tsrc/sqlite.h.in tsrc/parse.y $(TCLSH_CMD) $(TOP)/tool/vdbe-compress.tcl $(OPTS) vdbe.new mv vdbe.new tsrc/vdbe.c + cp fts5.c fts5.h tsrc touch .target_source sqlite3.c: .target_source $(TOP)/tool/mksqlite3c.tcl diff --git a/Makefile.msc b/Makefile.msc index 678b547fed..5419071ca9 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -388,11 +388,11 @@ CORE_LINK_OPTS = /DEF:sqlite3.def # These are additional compiler options used for the shell executable. # -!IFNDEF SHELL_COMPILE_OPTS +!IFNDEF SHELL_OPT !IF $(DYNAMIC_SHELL)!=0 -SHELL_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport) +SHELL_OPT = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport) !ELSE -SHELL_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) +SHELL_OPT = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) !ENDIF !ENDIF @@ -1008,7 +1008,8 @@ SRC4 = \ $(TOP)\ext\rtree\rtree.h \ $(TOP)\ext\rtree\rtree.c \ $(TOP)\ext\rbu\sqlite3rbu.h \ - $(TOP)\ext\rbu\sqlite3rbu.c + $(TOP)\ext\rbu\sqlite3rbu.c \ + $(TOP)\ext\misc\json1.c # Generated source code files @@ -1210,11 +1211,11 @@ FUZZDATA = \ $(TOP)\test\fuzzdata3.db \ $(TOP)\test\fuzzdata4.db -# Extra arguments for including json1 in the build of tools +# Extra compiler options for various shell tools # -JSON1_DEP = sqlite3ext.h $(TOP)\ext\misc\json1.c -JSON1_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_CORE -JSON1_SRC = $(TOP)\ext\misc\json1.c +SHELL_OPT += -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 +FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 +FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 # Standard options to testfixture # @@ -1231,19 +1232,19 @@ libsqlite3.lib: $(LIBOBJ) libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS) -sqlite3.exe: $(TOP)\src\shell.c $(JSON1_DEP) $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h - $(LTLINK) $(SHELL_COMPILE_OPTS) $(JSON1_OPT) $(READLINE_FLAGS) $(TOP)\src\shell.c $(JSON1_SRC) \ +sqlite3.exe: $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h + $(LTLINK) $(SHELL_COMPILE_OPTS) $(SHELL_OPT) $(READLINE_FLAGS) $(TOP)\src\shell.c \ /link /pdb:sqlite3sh.pdb $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) sqldiff.exe: $(TOP)\tool\sqldiff.c sqlite3.c sqlite3.h $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c sqlite3.c -fuzzershell.exe: $(TOP)\tool\fuzzershell.c sqlite3.c sqlite3.h $(JSON1_DEP) - $(LTLINK) $(NO_WARN) $(JSON1_OPT) \ - $(TOP)\tool\fuzzershell.c $(JSON1_SRC) sqlite3.c +fuzzershell.exe: $(TOP)\tool\fuzzershell.c sqlite3.c sqlite3.h + $(LTLINK) $(NO_WARN) $(FUZZERSHELL_OPT) \ + $(TOP)\tool\fuzzershell.c sqlite3.c -fuzzcheck.exe: $(TOP)\test\fuzzcheck.c sqlite3.c sqlite3.h $(JSON1_DEP) - $(LTLINK) $(NO_WARN) $(JSON1_OPT) $(TOP)\test\fuzzcheck.c $(JSON1_SRC) sqlite3.c +fuzzcheck.exe: $(TOP)\test\fuzzcheck.c sqlite3.c sqlite3.h + $(LTLINK) $(NO_WARN) $(FUZZCHECK_OPT) $(TOP)\test\fuzzcheck.c sqlite3.c mptester.exe: $(TOP)\mptest\mptest.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h $(LTLINK) $(NO_WARN) $(SHELL_COMPILE_OPTS) $(TOP)\mptest\mptest.c \ @@ -1269,7 +1270,7 @@ mptest: mptester.exe # files are automatically generated. This target takes care of # all that automatic generation. # -.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl +.target_source: $(SRC) $(TOP)\tool\vdbe-compress.tcl fts5.c -rmdir /Q/S tsrc 2>NUL -mkdir tsrc for %i in ($(SRC1)) do copy /Y %i tsrc @@ -1277,6 +1278,8 @@ mptest: mptester.exe for %i in ($(SRC3)) do copy /Y %i tsrc for %i in ($(SRC4)) do copy /Y %i tsrc for %i in ($(SRC5)) do copy /Y %i tsrc + copy /Y fts5.c tsrc + copy /Y fts5.h tsrc del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL $(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new move vdbe.new tsrc\vdbe.c diff --git a/ext/fts5/fts5_main.c b/ext/fts5/fts5_main.c index 644d323233..2c1a5ade1c 100644 --- a/ext/fts5/fts5_main.c +++ b/ext/fts5/fts5_main.c @@ -2393,14 +2393,7 @@ static void fts5SourceIdFunc( sqlite3_result_text(pCtx, "--FTS5-SOURCE-ID--", -1, SQLITE_TRANSIENT); } -#ifdef _WIN32 -__declspec(dllexport) -#endif -int sqlite3_fts5_init( - sqlite3 *db, - char **pzErrMsg, - const sqlite3_api_routines *pApi -){ +int sqlite3Fts5Init(sqlite3 *db){ static const sqlite3_module fts5Mod = { /* iVersion */ 2, /* xCreate */ fts5CreateMethod, @@ -2430,8 +2423,6 @@ int sqlite3_fts5_init( int rc; Fts5Global *pGlobal = 0; - SQLITE_EXTENSION_INIT2(pApi); - pGlobal = (Fts5Global*)sqlite3_malloc(sizeof(Fts5Global)); if( pGlobal==0 ){ rc = SQLITE_NOMEM; @@ -2471,7 +2462,20 @@ int sqlite3_fts_init( char **pzErrMsg, const sqlite3_api_routines *pApi ){ - return sqlite3_fts5_init(db, pzErrMsg, pApi); + SQLITE_EXTENSION_INIT2(pApi); + (void)pzErrMsg; /* Unused parameter */ + return sqlite3FtsInit(db); } - +#ifdef _WIN32 +__declspec(dllexport) +#endif +int sqlite3_fts5_init( + sqlite3 *db, + char **pzErrMsg, + const sqlite3_api_routines *pApi +){ + SQLITE_EXTENSION_INIT2(pApi); + (void)pzErrMsg; /* Unused parameter */ + return sqlite3FtsInit(db); +} diff --git a/ext/fts5/tool/mkfts5c.tcl b/ext/fts5/tool/mkfts5c.tcl index f5cf5197e2..478fd7c01d 100644 --- a/ext/fts5/tool/mkfts5c.tcl +++ b/ext/fts5/tool/mkfts5c.tcl @@ -24,7 +24,7 @@ set G(src) [string map [list %dir% $srcdir] { set G(hdr) { -#if !defined(SQLITE_TEST) || defined(SQLITE_ENABLE_FTS5) +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) #if !defined(NDEBUG) && !defined(SQLITE_DEBUG) # define NDEBUG 1 @@ -37,7 +37,7 @@ set G(hdr) { set G(footer) { -#endif /* !defined(SQLITE_TEST) || defined(SQLITE_ENABLE_FTS5) */ +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS5) */ } #------------------------------------------------------------------------- @@ -107,7 +107,3 @@ proc fts5c_close {} { fts5c_init fts5.c foreach f $G(src) { fts5c_printfile $f } fts5c_close - - - - diff --git a/ext/misc/json1.c b/ext/misc/json1.c index 77857f5447..f6fb2eafec 100644 --- a/ext/misc/json1.c +++ b/ext/misc/json1.c @@ -21,6 +21,7 @@ ** This implementation parses JSON text at 250 MB/s, so it is hard to see ** how JSONB might improve on that.) */ +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_JSON1) #if !defined(_SQLITEINT_H_) #include "sqlite3ext.h" #endif @@ -2007,3 +2008,4 @@ int sqlite3_json_init( (void)pzErrMsg; /* Unused parameter */ return sqlite3Json1Init(db); } +#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_JSON1) */ diff --git a/main.mk b/main.mk index cded12e5a3..95903b978e 100644 --- a/main.mk +++ b/main.mk @@ -225,10 +225,11 @@ SRC += \ SRC += \ $(TOP)/ext/userauth/userauth.c \ $(TOP)/ext/userauth/sqlite3userauth.h - SRC += \ $(TOP)/ext/rbu/sqlite3rbu.c \ $(TOP)/ext/rbu/sqlite3rbu.h +SRC += \ + $(TOP)/ext/misc/json1.c # FTS5 things @@ -451,16 +452,16 @@ FUZZDATA = \ $(TOP)/test/fuzzdata3.db \ $(TOP)/test/fuzzdata4.db -# Extra arguments for including json1 in the build of tools -# -JSON1_DEP = $(TOP)/ext/misc/json1.c sqlite3ext.h -JSON1_OPT = -DSQLITE_SHELL_JSON1 -DSQLITE_CORE -JSON1_SRC = $(TOP)/ext/misc/json1.c - # Standard options to testfixture # TESTOPTS = --verbose=file --output=test-out.txt +# Extra compiler options for various shell tools +# +SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 +FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 +FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 + # This is the default Makefile target. The objects listed here # are what get build when you type just "make" with no arguments. # @@ -470,24 +471,23 @@ libsqlite3.a: $(LIBOBJ) $(AR) libsqlite3.a $(LIBOBJ) $(RANLIB) libsqlite3.a -sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h $(JSON1_DEP) - $(TCCX) $(READLINE_FLAGS) $(JSON1_OPT) -o sqlite3$(EXE) \ - $(TOP)/src/shell.c $(JSON1_SRC) \ - libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) +sqlite3$(EXE): $(TOP)/src/shell.c libsqlite3.a sqlite3.h + $(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE) $(SHELL_OPT) \ + $(TOP)/src/shell.c libsqlite3.a $(LIBREADLINE) $(TLIBS) $(THREADLIB) sqldiff$(EXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h $(TCCX) -o sqldiff$(EXE) -DSQLITE_THREADSAFE=0 \ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS) $(THREADLIB) -fuzzershell$(EXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h $(JSON1_DEP) +fuzzershell$(EXE): $(TOP)/tool/fuzzershell.c sqlite3.c sqlite3.h $(TCCX) -o fuzzershell$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ - $(JSON1_OPT) $(TOP)/tool/fuzzershell.c $(JSON1_SRC) sqlite3.c \ + $(FUZZERSHELL_OPT) $(TOP)/tool/fuzzershell.c sqlite3.c \ $(TLIBS) $(THREADLIB) -fuzzcheck$(EXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h $(JSON1_DEP) +fuzzcheck$(EXE): $(TOP)/test/fuzzcheck.c sqlite3.c sqlite3.h $(TCCX) -o fuzzcheck$(EXE) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \ - -DSQLITE_ENABLE_MEMSYS5 $(JSON1_OPT) \ - $(TOP)/test/fuzzcheck.c $(JSON1_SRC) sqlite3.c $(TLIBS) $(THREADLIB) + -DSQLITE_ENABLE_MEMSYS5 $(FUZZCHECK_OPT) \ + $(TOP)/test/fuzzcheck.c sqlite3.c $(TLIBS) $(THREADLIB) mptester$(EXE): sqlite3.c $(TOP)/mptest/mptest.c $(TCCX) -o $@ -I. $(TOP)/mptest/mptest.c sqlite3.c \ @@ -515,13 +515,14 @@ sqlite3.o: sqlite3.c # files are automatically generated. This target takes care of # all that automatic generation. # -target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl +target_source: $(SRC) $(TOP)/tool/vdbe-compress.tcl fts5.c rm -rf tsrc mkdir tsrc cp -f $(SRC) tsrc rm tsrc/sqlite.h.in tsrc/parse.y tclsh $(TOP)/tool/vdbe-compress.tcl $(OPTS) vdbe.new mv vdbe.new tsrc/vdbe.c + cp fts5.c fts5.h tsrc touch target_source sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl diff --git a/manifest b/manifest index 773704bd6c..634fb674be 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Remove\stwo\sunused\slines\sof\scode\s-\sdiscovered\sby\sscan-build. -D 2015-10-08T02:44:42.485 +C First\sattempt\sto\sadd\sjson1\sand\sfts5\sto\sthe\samalgamation.\s\sThis\scheck-in\sdoes\nnot\scompile. +D 2015-10-08T19:29:18.974 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in 2143eeef6d0cc26006ae5fc4bb242a4a8b973412 +F Makefile.in 336f9494810fe361b59aa4e0c5cd41fc64d83323 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc b9054642ab305be4174d8b0433c9951c2839701d +F Makefile.msc f95e14e549addbf22304f6c01901b600aea10a6d F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION ccfc4d1576dbfdeece0a4372a2e6a2e37d3e7975 @@ -113,7 +113,7 @@ F ext/fts5/fts5_config.c 57ee5fe71578cb494574fc0e6e51acb9a22a8695 F ext/fts5/fts5_expr.c 2054e550e75cffa117557c9416210c425934436d F ext/fts5/fts5_hash.c 4bf4b99708848357b8a2b5819e509eb6d3df9246 F ext/fts5/fts5_index.c e03217c37f344f79673be385de6b03f732291000 -F ext/fts5/fts5_main.c aa96828990274927e2b404e0b6e60f9ae1274254 +F ext/fts5/fts5_main.c 1ae4d7ecfc2c27b3738f511113a804057e16341c F ext/fts5/fts5_storage.c df061a5caf9e50fbbd43113009b5b248362f4995 F ext/fts5/fts5_tcl.c 6da58d6e8f42a93c4486b5ba9b187a7f995dee37 F ext/fts5/fts5_test_mi.c e96be827aa8f571031e65e481251dc1981d608bf @@ -186,7 +186,7 @@ F ext/fts5/test/fts5version.test 978f59541d8cef7e8591f8be2115ec5ccb863e2e F ext/fts5/test/fts5vocab.test cdf97b9678484e9bad5062edf9c9106e5c3b0c5c F ext/fts5/tool/fts5txt2db.tcl 3d19fb8ffb234031d33d7d2151acfbc55e9cfcc4 F ext/fts5/tool/loadfts5.tcl 58e90407cc5c2b1770460119488fd7c0090d4dd3 -F ext/fts5/tool/mkfts5c.tcl 5745072c7de346e18c7f491e4c3281fe8a1cfe51 +F ext/fts5/tool/mkfts5c.tcl 1df2d86c4f9675e9cdb70b4ff5a53e57aca8a5c0 F ext/fts5/tool/showfts5.tcl 9eaf6c3df352f98a2ab5ce1921dd94128ab1381d F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43 F ext/icu/icu.c b2732aef0b076e4276d9b39b5a33cec7a05e1413 @@ -198,7 +198,7 @@ F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2 F ext/misc/fileio.c d4171c815d6543a9edef8308aab2951413cd8d0f F ext/misc/fuzzer.c 4c84635c71c26cfa7c2e5848cf49fe2d2cfcd767 F ext/misc/ieee754.c b0362167289170627659e84173f5d2e8fee8566e -F ext/misc/json1.c 263cac0292302b7cf7ecb2e8bd698a50d1aedecc +F ext/misc/json1.c e1822098b8131133f24800bda551c56877244ceb F ext/misc/nextchar.c 35c8b8baacb96d92abbb34a83a997b797075b342 F ext/misc/percentile.c bcbee3c061b884eccb80e21651daaae8e1e43c63 F ext/misc/regexp.c af92cdaa5058fcec1451e49becc7ba44dba023dc @@ -264,7 +264,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk 151fcaba704fdeeb0a1941857ef6e1d6216732d8 +F main.mk 40bed4c4b5719ee1aef9ce24eddd8bb50db9dd99 F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -291,7 +291,7 @@ F src/btreeInt.h 8177c9ab90d772d6d2c6c517e05bed774b7c92c0 F src/build.c 0549b56722f15c146ca21f82a33838365c2031f0 F src/callback.c 7b44ce59674338ad48b0e84e7b72f935ea4f68b0 F src/complete.c addcd8160b081131005d5bc2d34adf20c1c5c92f -F src/ctime.c 5a0b735dc95604766f5dac73973658eef782ee8b +F src/ctime.c 509ef9c64d1321f42448f111da86400b1799218a F src/date.c fb1c99172017dcc8e237339132c91a21a0788584 F src/dbstat.c e637e7a7ff40ef32132a418c6fdf1cfb63aa27c7 F src/delete.c 35c939eb8bacc9dd8a6715964e5f69feb8c20e44 @@ -308,7 +308,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e F src/lempar.c d344a95d60c24e2f490ee59db9784b1b17439012 F src/loadext.c f0b66d28e377fd6c6d36cc9d92df1ff251ebee44 -F src/main.c c80ea19ec71609ccbec21f334fbcf475bb6af2fc +F src/main.c 286aa6485809e43b9df8be708e728e007cfb8e5f F src/malloc.c 3a37ce6979a40f499d8cea9e9ab4e8517854d35d F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c abe6ee469b6c5a35c7f22bfeb9c9bac664a1c987 @@ -344,7 +344,7 @@ F src/random.c ba2679f80ec82c4190062d756f22d0c358180696 F src/resolve.c 1954a0f01bf65d78d7d559aea3d5c67f33376d91 F src/rowset.c eccf6af6d620aaa4579bd3b72c1b6395d9e9fa1e F src/select.c 2c4bfdf7c797df9b43121ed7850bf939b6f27405 -F src/shell.c dfd18e56fcb88dd79378774e9bc3246a9bd52243 +F src/shell.c d25df04168d6ba5a4fa05bdbf859df667f9eb621 F src/sqlite.h.in 4b76d74d69af48c534c58fb723137dc6944bdedc F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad F src/sqlite3ext.h 64350bf36833a56ad675e27392a913f417c5c308 @@ -1357,8 +1357,8 @@ F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e F tool/mkpragmatab.tcl 84af2b180484323a2ea22a2279e8bd9e3e1e492e F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 F tool/mksqlite3c-noext.tcl 87240b09c20042999b41d5fabe091b7111287835 -F tool/mksqlite3c.tcl 421ecbd437d8cd7123e67430ee8146218396680d -F tool/mksqlite3h.tcl 44730d586c9031638cdd2eb443b801c0d2dbd9f8 +F tool/mksqlite3c.tcl f38527a5125ada6705601d6665065a3bdf38ec64 +F tool/mksqlite3h.tcl e3ac3f23897d86cb8f5f5df92e91643229fcc8d1 F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b F tool/mkvsix.tcl bbe57cd9ae11c6cc70319241101ef8d2b8c3765b F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091 @@ -1390,7 +1390,10 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 83dc1ff7fa010715ca7f406a572f4ee444a967d7 -R 23aa9f023fe3604f2c01d6814f9077e1 +P 77b707b77496a08703fe9405e8e4521a4e5b419e +R b36b15e9683569a33dbd7dbda8478407 +T *branch * amalg-json1-fts5 +T *sym-amalg-json1-fts5 * +T -sym-trunk * U drh -Z 20dd7ef754329d35cfe6df88eb2905f9 +Z 77663aaa3c104357ac781d9ff8201195 diff --git a/manifest.uuid b/manifest.uuid index f50ffd68a4..016a3c8fab 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -77b707b77496a08703fe9405e8e4521a4e5b419e \ No newline at end of file +d820a1bd1b8dd702d1b3a099af393530cc5a5d51 \ No newline at end of file diff --git a/src/ctime.c b/src/ctime.c index 9503214f50..17dd710bc3 100644 --- a/src/ctime.c +++ b/src/ctime.c @@ -96,12 +96,18 @@ static const char * const azCompileOpt[] = { #if SQLITE_ENABLE_FTS4 "ENABLE_FTS4", #endif +#if SQLITE_ENABLE_FTS5 + "ENABLE_FTS5", +#endif #if SQLITE_ENABLE_ICU "ENABLE_ICU", #endif #if SQLITE_ENABLE_IOTRACE "ENABLE_IOTRACE", #endif +#if SQLITE_ENABLE_JSON1 + "ENABLE_JSON1", +#endif #if SQLITE_ENABLE_LOAD_EXTENSION "ENABLE_LOAD_EXTENSION", #endif diff --git a/src/main.c b/src/main.c index fa374c7012..43d2efcfe2 100644 --- a/src/main.c +++ b/src/main.c @@ -2872,12 +2872,19 @@ static int openDatabase( } #endif -#ifdef SQLITE_ENABLE_FTS3 +#ifdef SQLITE_ENABLE_FTS3 /* automatically defined by SQLITE_ENABLE_FTS4 */ if( !db->mallocFailed && rc==SQLITE_OK ){ rc = sqlite3Fts3Init(db); } #endif +#ifdef SQLITE_ENABLE_FTS5 + if( !db->mallocFailed && rc==SQLITE_OK ){ + extern int sqlite3Fts5Init(sqlite3*); + rc = sqlite3Fts5Init(db); + } +#endif + #ifdef SQLITE_ENABLE_ICU if( !db->mallocFailed && rc==SQLITE_OK ){ rc = sqlite3IcuInit(db); diff --git a/src/shell.c b/src/shell.c index 96d0ab65f7..f79087122c 100644 --- a/src/shell.c +++ b/src/shell.c @@ -4654,13 +4654,6 @@ int SQLITE_CDECL main(int argc, char **argv){ } data.out = stdout; -#ifdef SQLITE_SHELL_JSON1 - { - extern int sqlite3_json_init(sqlite3*); - sqlite3_auto_extension((void(*)(void))sqlite3_json_init); - } -#endif - /* Go ahead and open the database file if it already exists. If the ** file does not exist, delay opening it. This prevents empty database ** files from being created if a user mistypes the database name argument diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index e52b036612..ce808faa91 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -378,6 +378,8 @@ foreach file { fts3_icu.c sqlite3rbu.c dbstat.c + json1.c + fts5.c } { copy_file tsrc/$file } diff --git a/tool/mksqlite3h.tcl b/tool/mksqlite3h.tcl index cabce1f50b..2fe2157387 100644 --- a/tool/mksqlite3h.tcl +++ b/tool/mksqlite3h.tcl @@ -71,6 +71,7 @@ fconfigure stdout -translation lf set filelist [subst { $TOP/src/sqlite.h.in $TOP/ext/rtree/sqlite3rtree.h + $TOP/ext/fts5/fts5.h }] # These are the functions that accept a variable number of arguments. They From 056d7acf25756c5c3f0f02697aafda64c7c247da Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 8 Oct 2015 20:11:42 +0000 Subject: [PATCH 03/15] Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror. FossilOrigin-Name: e9e76e12812b9b42b1142246b71cea98e26903aa --- ext/fts5/fts5_main.c | 4 ++-- ext/fts5/fts5_tcl.c | 1 - manifest | 21 +++++++++------------ manifest.uuid | 2 +- src/main.c | 8 +++++++- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/ext/fts5/fts5_main.c b/ext/fts5/fts5_main.c index 2c1a5ade1c..b5f00297eb 100644 --- a/ext/fts5/fts5_main.c +++ b/ext/fts5/fts5_main.c @@ -2464,7 +2464,7 @@ int sqlite3_fts_init( ){ SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Unused parameter */ - return sqlite3FtsInit(db); + return sqlite3Fts5Init(db); } #ifdef _WIN32 @@ -2477,5 +2477,5 @@ int sqlite3_fts5_init( ){ SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Unused parameter */ - return sqlite3FtsInit(db); + return sqlite3Fts5Init(db); } diff --git a/ext/fts5/fts5_tcl.c b/ext/fts5/fts5_tcl.c index 21ce5f7bde..b470c557d3 100644 --- a/ext/fts5/fts5_tcl.c +++ b/ext/fts5/fts5_tcl.c @@ -976,7 +976,6 @@ static int f5tTokenHash( int objc, Tcl_Obj *CONST objv[] ){ - int bOld = sqlite3_fts5_may_be_corrupt; char *z; int n; unsigned int iVal; diff --git a/manifest b/manifest index 634fb674be..4ce209944b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C First\sattempt\sto\sadd\sjson1\sand\sfts5\sto\sthe\samalgamation.\s\sThis\scheck-in\sdoes\nnot\scompile. -D 2015-10-08T19:29:18.974 +C Fix\sa\scouple\sof\serrors\sin\sfts5\scompilation.\sThis\sbranch\sstill\sdoes\snot\sbuild\swith\s-Wall\s-Werror. +D 2015-10-08T20:11:42.088 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 336f9494810fe361b59aa4e0c5cd41fc64d83323 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -113,9 +113,9 @@ F ext/fts5/fts5_config.c 57ee5fe71578cb494574fc0e6e51acb9a22a8695 F ext/fts5/fts5_expr.c 2054e550e75cffa117557c9416210c425934436d F ext/fts5/fts5_hash.c 4bf4b99708848357b8a2b5819e509eb6d3df9246 F ext/fts5/fts5_index.c e03217c37f344f79673be385de6b03f732291000 -F ext/fts5/fts5_main.c 1ae4d7ecfc2c27b3738f511113a804057e16341c +F ext/fts5/fts5_main.c 77721fed36cf17c881a9f718e779d2bf33edf021 F ext/fts5/fts5_storage.c df061a5caf9e50fbbd43113009b5b248362f4995 -F ext/fts5/fts5_tcl.c 6da58d6e8f42a93c4486b5ba9b187a7f995dee37 +F ext/fts5/fts5_tcl.c 3bf445e66de32137d4693694ff7b1fd6074e32bd F ext/fts5/fts5_test_mi.c e96be827aa8f571031e65e481251dc1981d608bf F ext/fts5/fts5_tokenize.c f380f46f341af9c9a9908e1aade685ba1eaa157a F ext/fts5/fts5_unicode2.c 78273fbd588d1d9bd0a7e4e0ccc9207348bae33c @@ -308,7 +308,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e F src/lempar.c d344a95d60c24e2f490ee59db9784b1b17439012 F src/loadext.c f0b66d28e377fd6c6d36cc9d92df1ff251ebee44 -F src/main.c 286aa6485809e43b9df8be708e728e007cfb8e5f +F src/main.c 1bd3839327e6657ebb722085f02d9d5a48c4cd60 F src/malloc.c 3a37ce6979a40f499d8cea9e9ab4e8517854d35d F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c abe6ee469b6c5a35c7f22bfeb9c9bac664a1c987 @@ -1390,10 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 77b707b77496a08703fe9405e8e4521a4e5b419e -R b36b15e9683569a33dbd7dbda8478407 -T *branch * amalg-json1-fts5 -T *sym-amalg-json1-fts5 * -T -sym-trunk * -U drh -Z 77663aaa3c104357ac781d9ff8201195 +P d820a1bd1b8dd702d1b3a099af393530cc5a5d51 +R 96d02cbeb876e62b710d9e30b09e4a10 +U dan +Z ddb12ebcaa75b3e69205da1ca3e77d04 diff --git a/manifest.uuid b/manifest.uuid index 016a3c8fab..76345e06d3 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d820a1bd1b8dd702d1b3a099af393530cc5a5d51 \ No newline at end of file +e9e76e12812b9b42b1142246b71cea98e26903aa \ No newline at end of file diff --git a/src/main.c b/src/main.c index 43d2efcfe2..afdcfe4f21 100644 --- a/src/main.c +++ b/src/main.c @@ -2638,6 +2638,13 @@ int sqlite3ParseUri( return rc; } +#ifdef SQLITE_ENABLE_FTS5 +#ifdef SQLITE_AMALGAMATION +static int sqlite3Fts5Init(sqlite3*); +#else +extern int sqlite3Fts5Init(sqlite3*); +#endif +#endif /* ** This routine does the work of opening a database on behalf of @@ -2880,7 +2887,6 @@ static int openDatabase( #ifdef SQLITE_ENABLE_FTS5 if( !db->mallocFailed && rc==SQLITE_OK ){ - extern int sqlite3Fts5Init(sqlite3*); rc = sqlite3Fts5Init(db); } #endif From 351ccb382552ef6209c6c6ea3005adc6c4c32288 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 8 Oct 2015 20:28:33 +0000 Subject: [PATCH 04/15] Fix two more warnings in fts5 code. FossilOrigin-Name: 5343e601fb6f0f24f4e4d5d442f7b5b074734143 --- ext/fts5/fts5_aux.c | 2 +- ext/fts5/fts5parse.y | 1 + manifest | 14 +++++++------- manifest.uuid | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ext/fts5/fts5_aux.c b/ext/fts5/fts5_aux.c index 2e33d5132f..ad581bba77 100644 --- a/ext/fts5/fts5_aux.c +++ b/ext/fts5/fts5_aux.c @@ -13,7 +13,7 @@ #include "fts5Int.h" -#include +#include /* amalgamator: keep */ /* ** Object used to iterate through all "coalesced phrase instances" in diff --git a/ext/fts5/fts5parse.y b/ext/fts5/fts5parse.y index e872908229..065af77053 100644 --- a/ext/fts5/fts5parse.y +++ b/ext/fts5/fts5parse.y @@ -67,6 +67,7 @@ %left COLON. input ::= expr(X). { sqlite3Fts5ParseFinished(pParse, X); } +%destructor input { (void)pParse; } %type cnearset {Fts5ExprNode*} %type expr {Fts5ExprNode*} diff --git a/manifest b/manifest index 4ce209944b..34515a68de 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\scouple\sof\serrors\sin\sfts5\scompilation.\sThis\sbranch\sstill\sdoes\snot\sbuild\swith\s-Wall\s-Werror. -D 2015-10-08T20:11:42.088 +C Fix\stwo\smore\swarnings\sin\sfts5\scode. +D 2015-10-08T20:28:33.424 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 336f9494810fe361b59aa4e0c5cd41fc64d83323 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -107,7 +107,7 @@ F ext/fts3/unicode/parseunicode.tcl da577d1384810fb4e2b209bf3313074353193e95 F ext/fts5/extract_api_docs.tcl a36e54ec777172ddd3f9a88daf593b00848368e0 F ext/fts5/fts5.h 98f802fe41481f9d797fce496f0fefcad72c7782 F ext/fts5/fts5Int.h ed6c05b803e0bacf85228a8d255853e89796f6f5 -F ext/fts5/fts5_aux.c 7a307760a9c57c750d043188ec0bad59f5b5ec7e +F ext/fts5/fts5_aux.c b09aa27dcdaa3d50a30be433fddaa48a50aa827b F ext/fts5/fts5_buffer.c b2fb69c1ee3378956c0d9ee964d61b59d296afaf F ext/fts5/fts5_config.c 57ee5fe71578cb494574fc0e6e51acb9a22a8695 F ext/fts5/fts5_expr.c 2054e550e75cffa117557c9416210c425934436d @@ -121,7 +121,7 @@ F ext/fts5/fts5_tokenize.c f380f46f341af9c9a9908e1aade685ba1eaa157a F ext/fts5/fts5_unicode2.c 78273fbd588d1d9bd0a7e4e0ccc9207348bae33c F ext/fts5/fts5_varint.c 3f86ce09cab152e3d45490d7586b7ed2e40c13f1 F ext/fts5/fts5_vocab.c 17320c476a5296ee475ab616d95fd10515bacfec -F ext/fts5/fts5parse.y 38ab0ea7280a122f86f53b2264741422dd2424a0 +F ext/fts5/fts5parse.y e83dca6028e3309178d05b5bd920e372dc295d35 F ext/fts5/mkportersteps.tcl 5acf962d2e0074f701620bb5308155fa1e4a63ba F ext/fts5/test/fts5_common.tcl b6e6a40ef5d069c8e86ca4fbad491e1195485dbc F ext/fts5/test/fts5aa.test 4804f237005bb4ba8ea4a76120d8011ebcb5d611 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P d820a1bd1b8dd702d1b3a099af393530cc5a5d51 -R 96d02cbeb876e62b710d9e30b09e4a10 +P e9e76e12812b9b42b1142246b71cea98e26903aa +R 3ea307db4af2caf63f312c7ebd57ad22 U dan -Z ddb12ebcaa75b3e69205da1ca3e77d04 +Z bfe83218c323cc99da5efd4c0ac84f4a diff --git a/manifest.uuid b/manifest.uuid index 76345e06d3..54fe4e7ce6 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e9e76e12812b9b42b1142246b71cea98e26903aa \ No newline at end of file +5343e601fb6f0f24f4e4d5d442f7b5b074734143 \ No newline at end of file From 56eac2689769ebcc3ef64fef94111eeed84c558b Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 8 Oct 2015 20:40:18 +0000 Subject: [PATCH 05/15] Fix further fts5 compilation issues. FossilOrigin-Name: 0d7f301fb03c8546a5dbce5d061a1d74e3c86bcf --- ext/fts5/fts5_expr.c | 9 +++++++++ ext/fts5/fts5_main.c | 2 ++ ext/fts5/tool/mkfts5c.tcl | 2 +- main.mk | 7 +++---- manifest | 18 +++++++++--------- manifest.uuid | 2 +- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/ext/fts5/fts5_expr.c b/ext/fts5/fts5_expr.c index c90a2e4708..96c02c04cf 100644 --- a/ext/fts5/fts5_expr.c +++ b/ext/fts5/fts5_expr.c @@ -32,6 +32,10 @@ typedef struct Fts5ExprTerm Fts5ExprTerm; void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64)); void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*)); void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*); +#ifndef NDEBUG +void sqlite3Fts5ParserTrace(FILE*, char*); +#endif + struct Fts5Expr { Fts5Index *pIndex; @@ -2276,6 +2280,11 @@ int sqlite3Fts5ExprInit(Fts5Global *pGlobal, sqlite3 *db){ rc = sqlite3_create_function(db, p->z, -1, SQLITE_UTF8, pCtx, p->x, 0, 0); } + /* Avoid a warning indicating that sqlite3Fts5ParserTrace() is unused */ +#ifndef NDEBUG + (void)sqlite3Fts5ParserTrace; +#endif + return rc; } diff --git a/ext/fts5/fts5_main.c b/ext/fts5/fts5_main.c index b5f00297eb..5aebc97fde 100644 --- a/ext/fts5/fts5_main.c +++ b/ext/fts5/fts5_main.c @@ -2454,6 +2454,7 @@ int sqlite3Fts5Init(sqlite3 *db){ return rc; } +#ifndef SQLITE_CORE #ifdef _WIN32 __declspec(dllexport) #endif @@ -2466,6 +2467,7 @@ int sqlite3_fts_init( (void)pzErrMsg; /* Unused parameter */ return sqlite3Fts5Init(db); } +#endif #ifdef _WIN32 __declspec(dllexport) diff --git a/ext/fts5/tool/mkfts5c.tcl b/ext/fts5/tool/mkfts5c.tcl index 478fd7c01d..5a5eeae0af 100644 --- a/ext/fts5/tool/mkfts5c.tcl +++ b/ext/fts5/tool/mkfts5c.tcl @@ -7,6 +7,7 @@ set G(src) [string map [list %dir% $srcdir] { %dir%/fts5.h %dir%/fts5Int.h fts5parse.h + fts5parse.c %dir%/fts5_aux.c %dir%/fts5_buffer.c %dir%/fts5_config.c @@ -19,7 +20,6 @@ set G(src) [string map [list %dir% $srcdir] { %dir%/fts5_unicode2.c %dir%/fts5_varint.c %dir%/fts5_vocab.c - fts5parse.c }] set G(hdr) { diff --git a/main.mk b/main.mk index 95903b978e..72e52d1061 100644 --- a/main.mk +++ b/main.mk @@ -332,8 +332,7 @@ TESTSRC += \ $(TOP)/ext/misc/wholenumber.c \ $(TOP)/ext/misc/vfslog.c \ $(TOP)/ext/fts5/fts5_tcl.c \ - $(TOP)/ext/fts5/fts5_test_mi.c \ - fts5.c + $(TOP)/ext/fts5/fts5_test_mi.c #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c @@ -718,9 +717,9 @@ testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ -o testfixture$(EXE) $(LIBTCL) libsqlite3.a $(THREADLIB) -amalgamation-testfixture$(EXE): sqlite3.c fts5.c $(TESTSRC) $(TOP)/src/tclsqlite.c +amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ - $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts5.c \ + $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c diff --git a/manifest b/manifest index 34515a68de..f6e22b3a23 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\stwo\smore\swarnings\sin\sfts5\scode. -D 2015-10-08T20:28:33.424 +C Fix\sfurther\sfts5\scompilation\sissues. +D 2015-10-08T20:40:18.323 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 336f9494810fe361b59aa4e0c5cd41fc64d83323 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -110,10 +110,10 @@ F ext/fts5/fts5Int.h ed6c05b803e0bacf85228a8d255853e89796f6f5 F ext/fts5/fts5_aux.c b09aa27dcdaa3d50a30be433fddaa48a50aa827b F ext/fts5/fts5_buffer.c b2fb69c1ee3378956c0d9ee964d61b59d296afaf F ext/fts5/fts5_config.c 57ee5fe71578cb494574fc0e6e51acb9a22a8695 -F ext/fts5/fts5_expr.c 2054e550e75cffa117557c9416210c425934436d +F ext/fts5/fts5_expr.c d3a56928f8afdd2dca9126f8406f20b9831e4265 F ext/fts5/fts5_hash.c 4bf4b99708848357b8a2b5819e509eb6d3df9246 F ext/fts5/fts5_index.c e03217c37f344f79673be385de6b03f732291000 -F ext/fts5/fts5_main.c 77721fed36cf17c881a9f718e779d2bf33edf021 +F ext/fts5/fts5_main.c d159079e618399f9b531ad1fe32772cff307ea91 F ext/fts5/fts5_storage.c df061a5caf9e50fbbd43113009b5b248362f4995 F ext/fts5/fts5_tcl.c 3bf445e66de32137d4693694ff7b1fd6074e32bd F ext/fts5/fts5_test_mi.c e96be827aa8f571031e65e481251dc1981d608bf @@ -186,7 +186,7 @@ F ext/fts5/test/fts5version.test 978f59541d8cef7e8591f8be2115ec5ccb863e2e F ext/fts5/test/fts5vocab.test cdf97b9678484e9bad5062edf9c9106e5c3b0c5c F ext/fts5/tool/fts5txt2db.tcl 3d19fb8ffb234031d33d7d2151acfbc55e9cfcc4 F ext/fts5/tool/loadfts5.tcl 58e90407cc5c2b1770460119488fd7c0090d4dd3 -F ext/fts5/tool/mkfts5c.tcl 1df2d86c4f9675e9cdb70b4ff5a53e57aca8a5c0 +F ext/fts5/tool/mkfts5c.tcl 52a2bae4dd05ca2c635d7f744e7dd684a1401570 F ext/fts5/tool/showfts5.tcl 9eaf6c3df352f98a2ab5ce1921dd94128ab1381d F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43 F ext/icu/icu.c b2732aef0b076e4276d9b39b5a33cec7a05e1413 @@ -264,7 +264,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk 40bed4c4b5719ee1aef9ce24eddd8bb50db9dd99 +F main.mk f890212d1fb0dc1dccbf29ca073e25049a035f9c F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P e9e76e12812b9b42b1142246b71cea98e26903aa -R 3ea307db4af2caf63f312c7ebd57ad22 +P 5343e601fb6f0f24f4e4d5d442f7b5b074734143 +R a5d6a1bbd24ea26e1ba62ab9db596efb U dan -Z bfe83218c323cc99da5efd4c0ac84f4a +Z 4d77dbaecef082f61a7a492bc89aab25 diff --git a/manifest.uuid b/manifest.uuid index 54fe4e7ce6..7c72947b42 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5343e601fb6f0f24f4e4d5d442f7b5b074734143 \ No newline at end of file +0d7f301fb03c8546a5dbce5d061a1d74e3c86bcf \ No newline at end of file From 23fda8242c75e5aa0ca1f40de8d9944b7614d0c9 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 8 Oct 2015 21:00:46 +0000 Subject: [PATCH 06/15] Further tweaks to main.mk so that fts5 builds as part of testfixture. FossilOrigin-Name: 97e11b79a52fb1c57f0afd2dbd6ee66cf00a922d --- ext/fts5/fts5_expr.c | 1 + main.mk | 3 ++- manifest | 14 +++++++------- manifest.uuid | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ext/fts5/fts5_expr.c b/ext/fts5/fts5_expr.c index 96c02c04cf..02351478a0 100644 --- a/ext/fts5/fts5_expr.c +++ b/ext/fts5/fts5_expr.c @@ -33,6 +33,7 @@ void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64)); void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*)); void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*); #ifndef NDEBUG +#include void sqlite3Fts5ParserTrace(FILE*, char*); #endif diff --git a/main.mk b/main.mk index 72e52d1061..07ffd811a9 100644 --- a/main.mk +++ b/main.mk @@ -379,7 +379,8 @@ TESTSRC2 = \ $(TOP)/ext/fts3/fts3_expr.c \ $(TOP)/ext/fts3/fts3_tokenizer.c \ $(TOP)/ext/fts3/fts3_write.c \ - $(TOP)/ext/async/sqlite3async.c + $(TOP)/ext/async/sqlite3async.c \ + $(FTS5_SRC) # Header files used by all library source files. # diff --git a/manifest b/manifest index f6e22b3a23..e6109a2036 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sfurther\sfts5\scompilation\sissues. -D 2015-10-08T20:40:18.323 +C Further\stweaks\sto\smain.mk\sso\sthat\sfts5\sbuilds\sas\spart\sof\stestfixture. +D 2015-10-08T21:00:46.491 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 336f9494810fe361b59aa4e0c5cd41fc64d83323 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -110,7 +110,7 @@ F ext/fts5/fts5Int.h ed6c05b803e0bacf85228a8d255853e89796f6f5 F ext/fts5/fts5_aux.c b09aa27dcdaa3d50a30be433fddaa48a50aa827b F ext/fts5/fts5_buffer.c b2fb69c1ee3378956c0d9ee964d61b59d296afaf F ext/fts5/fts5_config.c 57ee5fe71578cb494574fc0e6e51acb9a22a8695 -F ext/fts5/fts5_expr.c d3a56928f8afdd2dca9126f8406f20b9831e4265 +F ext/fts5/fts5_expr.c 1df899afed24c9c6195eea1780dcc56fcd1d1139 F ext/fts5/fts5_hash.c 4bf4b99708848357b8a2b5819e509eb6d3df9246 F ext/fts5/fts5_index.c e03217c37f344f79673be385de6b03f732291000 F ext/fts5/fts5_main.c d159079e618399f9b531ad1fe32772cff307ea91 @@ -264,7 +264,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk f890212d1fb0dc1dccbf29ca073e25049a035f9c +F main.mk cabb44ec58598504aa60a73d0c7b2ed7867a5314 F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 5343e601fb6f0f24f4e4d5d442f7b5b074734143 -R a5d6a1bbd24ea26e1ba62ab9db596efb +P 0d7f301fb03c8546a5dbce5d061a1d74e3c86bcf +R e1f9fdfa53cf5660ea6f21bb4b74b6a9 U dan -Z 4d77dbaecef082f61a7a492bc89aab25 +Z e14f76d968001b7f399b579a0b72354e diff --git a/manifest.uuid b/manifest.uuid index 7c72947b42..d3267fc349 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -0d7f301fb03c8546a5dbce5d061a1d74e3c86bcf \ No newline at end of file +97e11b79a52fb1c57f0afd2dbd6ee66cf00a922d \ No newline at end of file From d3b90a2e419f8fea7be84139a48964ca13e9e634 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 8 Oct 2015 21:02:29 +0000 Subject: [PATCH 07/15] Remove calls to "load_static_extension" from fts5 test scripts. FossilOrigin-Name: 53dd7c4c65842c5c9ed3e84edd62e24f2c9be15b --- ext/fts5/test/fts5_common.tcl | 1 - ext/fts5/test/fts5fault6.test | 2 -- manifest | 14 +++++++------- manifest.uuid | 2 +- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ext/fts5/test/fts5_common.tcl b/ext/fts5/test/fts5_common.tcl index 5eba1296ad..2c64b3b9a4 100644 --- a/ext/fts5/test/fts5_common.tcl +++ b/ext/fts5/test/fts5_common.tcl @@ -17,7 +17,6 @@ source $testdir/tester.tcl catch { sqlite3_fts5_may_be_corrupt 0 - append G(perm:dbconfig) "; load_static_extension \$::dbhandle fts5" reset_db } diff --git a/ext/fts5/test/fts5fault6.test b/ext/fts5/test/fts5fault6.test index c79cf7ab70..118761fab5 100644 --- a/ext/fts5/test/fts5fault6.test +++ b/ext/fts5/test/fts5fault6.test @@ -284,8 +284,6 @@ breakpoint do_faultsim_test 6 -faults oom* -prep { sqlite_orig db test.db sqlite3_db_config_lookaside db 0 0 0 -} -body { - load_static_extension db fts5 } -test { faultsim_test_result {0 {}} {1 {initialization of fts5 failed: }} if {$testrc==0} { diff --git a/manifest b/manifest index e6109a2036..db74889816 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Further\stweaks\sto\smain.mk\sso\sthat\sfts5\sbuilds\sas\spart\sof\stestfixture. -D 2015-10-08T21:00:46.491 +C Remove\scalls\sto\s"load_static_extension"\sfrom\sfts5\stest\sscripts. +D 2015-10-08T21:02:29.524 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 336f9494810fe361b59aa4e0c5cd41fc64d83323 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -123,7 +123,7 @@ F ext/fts5/fts5_varint.c 3f86ce09cab152e3d45490d7586b7ed2e40c13f1 F ext/fts5/fts5_vocab.c 17320c476a5296ee475ab616d95fd10515bacfec F ext/fts5/fts5parse.y e83dca6028e3309178d05b5bd920e372dc295d35 F ext/fts5/mkportersteps.tcl 5acf962d2e0074f701620bb5308155fa1e4a63ba -F ext/fts5/test/fts5_common.tcl b6e6a40ef5d069c8e86ca4fbad491e1195485dbc +F ext/fts5/test/fts5_common.tcl 51f7ef3af444b89c6f6ce3896a0ac349ff4e996d F ext/fts5/test/fts5aa.test 4804f237005bb4ba8ea4a76120d8011ebcb5d611 F ext/fts5/test/fts5ab.test 6fe3a56731d15978afbb74ae51b355fc9310f2ad F ext/fts5/test/fts5ac.test 9737992d08c56bfd4803e933744d2d764e23795c @@ -156,7 +156,7 @@ F ext/fts5/test/fts5fault2.test 28c36c843bb39ae855ba79827417ecc37f114341 F ext/fts5/test/fts5fault3.test d6e9577d4312e331a913c72931bf131704efc8f3 F ext/fts5/test/fts5fault4.test 762991d526ee67c2b374351a17248097ea38bee7 F ext/fts5/test/fts5fault5.test 54da9fd4c3434a1d4f6abdcb6469299d91cf5875 -F ext/fts5/test/fts5fault6.test 97bce1a36b7a64e3203fea504ae8e5cfd5ada423 +F ext/fts5/test/fts5fault6.test 9682664d679643ac6736e90c225526cc84073cda F ext/fts5/test/fts5fault7.test f62ed4d98f137eb03f1db94d1fa41b17a771d971 F ext/fts5/test/fts5full.test 6f6143af0c6700501d9fd597189dfab1555bb741 F ext/fts5/test/fts5hash.test 42eb066f667e9a389a63437cb7038c51974d4fc6 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 0d7f301fb03c8546a5dbce5d061a1d74e3c86bcf -R e1f9fdfa53cf5660ea6f21bb4b74b6a9 +P 97e11b79a52fb1c57f0afd2dbd6ee66cf00a922d +R 8e17a2728ff14bbeff2287e659139e9d U dan -Z e14f76d968001b7f399b579a0b72354e +Z 3aa012086094b7ff1432167080b1bc87 diff --git a/manifest.uuid b/manifest.uuid index d3267fc349..2c90e71ff5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -97e11b79a52fb1c57f0afd2dbd6ee66cf00a922d \ No newline at end of file +53dd7c4c65842c5c9ed3e84edd62e24f2c9be15b \ No newline at end of file From c306e08ad51b273bb2e132b058746e45f3e1024b Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 8 Oct 2015 23:37:00 +0000 Subject: [PATCH 08/15] Json1 tests are working. Builds without FTS5 enabled. Still some problems building with FTS5. FossilOrigin-Name: 2928f8e87d2e5d121e6e7e5993cbb773bb2b0603 --- Makefile.in | 8 +++++--- main.mk | 18 +++++++++++++----- manifest | 28 ++++++++++++++-------------- manifest.uuid | 2 +- src/main.c | 14 ++++++-------- src/test1.c | 8 +++++--- src/test_config.c | 6 ++++++ test/json101.test | 6 +++++- test/json102.test | 6 +++++- test/releasetest.tcl | 4 ++++ 10 files changed, 64 insertions(+), 36 deletions(-) diff --git a/Makefile.in b/Makefile.in index f78d6cf092..b66086417a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -175,7 +175,7 @@ LIBOBJS0 = alter.lo analyze.lo attach.lo auth.lo \ fts3_unicode.lo fts3_unicode2.lo fts3_write.lo \ fts5.lo \ func.lo global.lo hash.lo \ - icu.lo insert.lo journal.lo legacy.lo loadext.lo \ + icu.lo insert.lo journal.lo json1.lo legacy.lo loadext.lo \ main.lo malloc.lo mem0.lo mem1.lo mem2.lo mem3.lo mem5.lo \ memjournal.lo \ mutex.lo mutex_noop.lo mutex_unix.lo mutex_w32.lo \ @@ -346,7 +346,7 @@ SRC += \ $(TOP)/ext/rtree/rtree.c SRC += \ $(TOP)/ext/rbu/sqlite3rbu.h \ - $(TOP)/ext/rbu/sqlite3rbu.c\ + $(TOP)/ext/rbu/sqlite3rbu.c SRC += \ $(TOP)/ext/misc/json1.c @@ -420,7 +420,6 @@ TESTSRC += \ $(TOP)/ext/fts5/fts5_tcl.c \ $(TOP)/ext/fts5/fts5_test_mi.c \ $(TOP)/ext/misc/ieee754.c \ - $(TOP)/ext/misc/json1.c \ $(TOP)/ext/misc/nextchar.c \ $(TOP)/ext/misc/percentile.c \ $(TOP)/ext/misc/regexp.c \ @@ -994,6 +993,9 @@ fts3_write.lo: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR) rtree.lo: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR) $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c +json1.lo: $(TOP)/ext/misc/json1.c + $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c + # FTS5 things # FTS5_SRC = \ diff --git a/main.mk b/main.mk index 07ffd811a9..0fddfafe67 100644 --- a/main.mk +++ b/main.mk @@ -60,7 +60,7 @@ LIBOBJ+= vdbe.o parse.o \ fts3_tokenize_vtab.o \ fts3_unicode.o fts3_unicode2.o \ fts3_write.o func.o global.o hash.o \ - icu.o insert.o journal.o legacy.o loadext.o \ + icu.o insert.o journal.o json1.o legacy.o loadext.o \ main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \ memjournal.o \ mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \ @@ -322,7 +322,6 @@ TESTSRC += \ $(TOP)/ext/misc/fileio.c \ $(TOP)/ext/misc/fuzzer.c \ $(TOP)/ext/misc/ieee754.c \ - $(TOP)/ext/misc/json1.c \ $(TOP)/ext/misc/nextchar.c \ $(TOP)/ext/misc/percentile.c \ $(TOP)/ext/misc/regexp.c \ @@ -332,7 +331,8 @@ TESTSRC += \ $(TOP)/ext/misc/wholenumber.c \ $(TOP)/ext/misc/vfslog.c \ $(TOP)/ext/fts5/fts5_tcl.c \ - $(TOP)/ext/fts5/fts5_test_mi.c + $(TOP)/ext/fts5/fts5_test_mi.c \ + fts5.c #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c @@ -669,9 +669,17 @@ fts3_unicode2.o: $(TOP)/ext/fts3/fts3_unicode2.c $(HDR) $(EXTHDR) fts3_write.o: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR) $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_write.c +fts5.o: fts5.c + $(TCCX) -DSQLITE_CORE -c fts5.c + +json1.o: $(TOP)/ext/misc/json1.c + $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c + rtree.o: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR) $(TCCX) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c + + fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon cp $(TOP)/ext/fts5/fts5parse.y . rm -f fts5parse.h @@ -718,9 +726,9 @@ testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ -o testfixture$(EXE) $(LIBTCL) libsqlite3.a $(THREADLIB) -amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c +amalgamation-testfixture$(EXE): sqlite3.c fts5.c $(TESTSRC) $(TOP)/src/tclsqlite.c $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ - $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ + $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts5.c \ -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c diff --git a/manifest b/manifest index db74889816..76f039490f 100644 --- a/manifest +++ b/manifest @@ -1,7 +1,7 @@ -C Remove\scalls\sto\s"load_static_extension"\sfrom\sfts5\stest\sscripts. -D 2015-10-08T21:02:29.524 +C Json1\stests\sare\sworking.\s\sBuilds\swithout\sFTS5\senabled.\s\sStill\ssome\sproblems\nbuilding\swith\sFTS5. +D 2015-10-08T23:37:00.134 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in 336f9494810fe361b59aa4e0c5cd41fc64d83323 +F Makefile.in ab670f8513a9aac7e6367f791bf5ac685111d0a9 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.msc f95e14e549addbf22304f6c01901b600aea10a6d F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 @@ -264,7 +264,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk cabb44ec58598504aa60a73d0c7b2ed7867a5314 +F main.mk e78ca7d50592dd4a4f2c7a09db478034feabc92f F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -308,7 +308,7 @@ F src/journal.c b4124532212b6952f42eb2c12fa3c25701d8ba8d F src/legacy.c ba1863ea58c4c840335a84ec276fc2b25e22bc4e F src/lempar.c d344a95d60c24e2f490ee59db9784b1b17439012 F src/loadext.c f0b66d28e377fd6c6d36cc9d92df1ff251ebee44 -F src/main.c 1bd3839327e6657ebb722085f02d9d5a48c4cd60 +F src/main.c fec97668771438033a7559883401067b139729e1 F src/malloc.c 3a37ce6979a40f499d8cea9e9ab4e8517854d35d F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645 F src/mem1.c abe6ee469b6c5a35c7f22bfeb9c9bac664a1c987 @@ -353,7 +353,7 @@ F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c f266ad8a2892d659b74f0f50cb6a88b6e7c12179 F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e F src/tclsqlite.c d9439b6a910985b7fff43ba6756bcef00de22649 -F src/test1.c c96508c835979bf15dc0e3146e2c7a51a2333d3c +F src/test1.c 5d1bbac006ef00e6fe4332c554a7cd96abe5fa42 F src/test2.c 577961fe48961b2f2e5c8b56ee50c3f459d3359d F src/test3.c 64d2afdd68feac1bb5e2ffb8226c8c639f798622 F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e @@ -367,7 +367,7 @@ F src/test_autoext.c dea8a01a7153b9adc97bd26161e4226329546e12 F src/test_backup.c 2e6e6a081870150f20c526a2e9d0d29cda47d803 F src/test_blob.c e5a7a81d61a780da79101aeb1e60d300af169e07 F src/test_btree.c 2e9978eca99a9a4bfa8cae949efb00886860a64f -F src/test_config.c fb2e5d354d9a077f5fbb261652eff4787deb104f +F src/test_config.c ada6f38b0acb6722fb7f0ed8c54fd66df41085b9 F src/test_demovfs.c 0de72c2c89551629f58486fde5734b7d90758852 F src/test_devsym.c e7498904e72ba7491d142d5c83b476c4e76993bc F src/test_fs.c ced436e3d4b8e4681328409b8081051ce614e28f @@ -820,8 +820,8 @@ F test/journal3.test ff8af941f9e06161d3db1b46bb9f965ff0e7f307 F test/jrnlmode.test 7864d59cf7f6e552b9b99ba0f38acd167edc10fa F test/jrnlmode2.test 81610545a4e6ed239ea8fa661891893385e23a1d F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa -F test/json101.test e8b50fbcdbf283cfafbc42632bf2c7dfa4541c46 -F test/json102.test 796b1c59894c6e0f38fc1a3acb0e690573b952a3 +F test/json101.test 83e6ebfb3cef6329853ab854403ec82b1787b537 +F test/json102.test bf3fe7a706d30936a76a0f7a0375e1e8e73aff5a F test/keyword1.test 37ef6bba5d2ed5b07ecdd6810571de2956599dff F test/lastinsert.test 42e948fd6442f07d60acbd15d33fb86473e0ef63 F test/laststmtchanges.test ae613f53819206b3222771828d024154d51db200 @@ -947,7 +947,7 @@ F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736 F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8 F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254 -F test/releasetest.tcl afdac5c3429dceb034295617c0a51df9954d467a +F test/releasetest.tcl 97e4e5ca5925b21ef470b3c97d4c46dd063cfec4 F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 97e11b79a52fb1c57f0afd2dbd6ee66cf00a922d -R 8e17a2728ff14bbeff2287e659139e9d -U dan -Z 3aa012086094b7ff1432167080b1bc87 +P 53dd7c4c65842c5c9ed3e84edd62e24f2c9be15b +R 9e61c8794766296f6abfb50c81f18f50 +U drh +Z a87c3731b988c508695a8d0d1121a40b diff --git a/manifest.uuid b/manifest.uuid index 2c90e71ff5..9f32f5f37e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -53dd7c4c65842c5c9ed3e84edd62e24f2c9be15b \ No newline at end of file +2928f8e87d2e5d121e6e7e5993cbb773bb2b0603 \ No newline at end of file diff --git a/src/main.c b/src/main.c index afdcfe4f21..ef2fa66ec3 100644 --- a/src/main.c +++ b/src/main.c @@ -25,6 +25,12 @@ #ifdef SQLITE_ENABLE_ICU # include "sqliteicu.h" #endif +#ifdef SQLITE_ENABLE_JSON1 +int sqlite3Json1Init(sqlite3*); +#endif +#ifdef SQLITE_ENABLE_FTS5 +int sqlite3Fts5Init(sqlite3*); +#endif #ifndef SQLITE_AMALGAMATION /* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant @@ -2638,13 +2644,6 @@ int sqlite3ParseUri( return rc; } -#ifdef SQLITE_ENABLE_FTS5 -#ifdef SQLITE_AMALGAMATION -static int sqlite3Fts5Init(sqlite3*); -#else -extern int sqlite3Fts5Init(sqlite3*); -#endif -#endif /* ** This routine does the work of opening a database on behalf of @@ -2911,7 +2910,6 @@ static int openDatabase( #ifdef SQLITE_ENABLE_JSON1 if( !db->mallocFailed && rc==SQLITE_OK){ - extern int sqlite3Json1Init(sqlite3*); rc = sqlite3Json1Init(db); } #endif diff --git a/src/test1.c b/src/test1.c index 1f76ea5ba5..df00e1943e 100644 --- a/src/test1.c +++ b/src/test1.c @@ -6377,7 +6377,6 @@ static int tclLoadStaticExtensionCmd( extern int sqlite3_fileio_init(sqlite3*,char**,const sqlite3_api_routines*); extern int sqlite3_fuzzer_init(sqlite3*,char**,const sqlite3_api_routines*); extern int sqlite3_ieee_init(sqlite3*,char**,const sqlite3_api_routines*); - extern int sqlite3_json_init(sqlite3*,char**,const sqlite3_api_routines*); extern int sqlite3_nextchar_init(sqlite3*,char**,const sqlite3_api_routines*); extern int sqlite3_percentile_init(sqlite3*,char**,const sqlite3_api_routines*); extern int sqlite3_regexp_init(sqlite3*,char**,const sqlite3_api_routines*); @@ -6399,7 +6398,6 @@ static int tclLoadStaticExtensionCmd( { "fileio", sqlite3_fileio_init }, { "fuzzer", sqlite3_fuzzer_init }, { "ieee754", sqlite3_ieee_init }, - { "json", sqlite3_json_init }, { "nextchar", sqlite3_nextchar_init }, { "percentile", sqlite3_percentile_init }, { "regexp", sqlite3_regexp_init }, @@ -6426,7 +6424,11 @@ static int tclLoadStaticExtensionCmd( Tcl_AppendResult(interp, "no such extension: ", zName, (char*)0); return TCL_ERROR; } - rc = aExtension[i].pInit(db, &zErrMsg, 0); + if( aExtension[i].pInit ){ + rc = aExtension[i].pInit(db, &zErrMsg, 0); + }else{ + rc = SQLITE_OK; + } if( rc!=SQLITE_OK || zErrMsg ){ Tcl_AppendResult(interp, "initialization of ", zName, " failed: ", zErrMsg, (char*)0); diff --git a/src/test_config.c b/src/test_config.c index 0aa29c70d7..5da2df16b7 100644 --- a/src/test_config.c +++ b/src/test_config.c @@ -167,6 +167,12 @@ static void set_options(Tcl_Interp *interp){ Tcl_SetVar2(interp, "sqlite_options", "atomicwrite", "0", TCL_GLOBAL_ONLY); #endif +#ifdef SQLITE_ENABLE_JSON1 + Tcl_SetVar2(interp, "sqlite_options", "json1", "1", TCL_GLOBAL_ONLY); +#else + Tcl_SetVar2(interp, "sqlite_options", "json1", "0", TCL_GLOBAL_ONLY); +#endif + #ifdef SQLITE_OMIT_ATTACH Tcl_SetVar2(interp, "sqlite_options", "attach", "0", TCL_GLOBAL_ONLY); #else diff --git a/test/json101.test b/test/json101.test index 943292640d..e11cdd0138 100644 --- a/test/json101.test +++ b/test/json101.test @@ -15,7 +15,11 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl -load_static_extension db json +ifcapable !json1 { + finish_test + return +} + do_execsql_test json101-1.1.00 { SELECT json_array(1,2.5,null,'hello'); } {[1,2.5,null,"hello"]} diff --git a/test/json102.test b/test/json102.test index f40580da4e..a4d88dbeaa 100644 --- a/test/json102.test +++ b/test/json102.test @@ -18,7 +18,11 @@ set testdir [file dirname $argv0] source $testdir/tester.tcl -load_static_extension db json +ifcapable !json1 { + finish_test + return +} + do_execsql_test json102-100 { SELECT json_object('ex','[52,3.14159]'); } {{{"ex":"[52,3.14159]"}}} diff --git a/test/releasetest.tcl b/test/releasetest.tcl index dde3f039d6..ef29a0d945 100644 --- a/test/releasetest.tcl +++ b/test/releasetest.tcl @@ -129,6 +129,7 @@ array set ::Configs [strip_comments { -DSQLITE_DISABLE_LFS=1 -DSQLITE_ENABLE_ATOMIC_WRITE=1 -DSQLITE_ENABLE_IOTRACE=1 + -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_MAX_PAGE_SIZE=4096 -DSQLITE_OMIT_LOAD_EXTENSION=1 @@ -145,6 +146,7 @@ array set ::Configs [strip_comments { -DSQLITE_DEFAULT_TEMP_CACHE_SIZE=1000 -DSQLITE_DISABLE_LFS=1 -DSQLITE_ENABLE_FTS3=1 + -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_MAX_COMPOUND_SELECT=50 @@ -163,6 +165,7 @@ array set ::Configs [strip_comments { -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_THREADSAFE=2 -DSQLITE_OS_UNIX=1 + -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_LOCKING_STYLE=1 -DUSE_PREAD=1 -DSQLITE_ENABLE_RTREE=1 @@ -197,6 +200,7 @@ array set ::Configs [strip_comments { -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE + -DSQLITE_ENABLE_JSON1=1 } # The next group of configurations are used only by the From 45fac889511c81929ee767b4928cd872949ee8ea Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 9 Oct 2015 01:42:49 +0000 Subject: [PATCH 09/15] Trying to get FTS5 tests to build and run using main.mk. Not yet working. FossilOrigin-Name: 206174f9b154c590a3e2e94236db38e111d64bdb --- Makefile.in | 4 ++-- ext/fts5/fts5Int.h | 4 ++++ ext/fts5/tool/mkfts5c.tcl | 2 +- main.mk | 8 +++++--- manifest | 20 ++++++++++---------- manifest.uuid | 2 +- tool/mksqlite3c.tcl | 3 ++- 7 files changed, 25 insertions(+), 18 deletions(-) diff --git a/Makefile.in b/Makefile.in index b66086417a..9d1020e070 100644 --- a/Makefile.in +++ b/Makefile.in @@ -65,7 +65,7 @@ TCC += -DSQLITE_THREADSAFE=@SQLITE_THREADSAFE@ # Any target libraries which libsqlite must be linked against # -TLIBS = @LIBS@ +TLIBS = @LIBS@ $(LIBS) # Flags controlling use of the in memory btree implementation # @@ -272,8 +272,8 @@ SRC = \ $(TOP)/src/sqliteInt.h \ $(TOP)/src/sqliteLimit.h \ $(TOP)/src/table.c \ - $(TOP)/src/threads.c \ $(TOP)/src/tclsqlite.c \ + $(TOP)/src/threads.c \ $(TOP)/src/tokenize.c \ $(TOP)/src/treeview.c \ $(TOP)/src/trigger.c \ diff --git a/ext/fts5/fts5Int.h b/ext/fts5/fts5Int.h index ce066f2aa8..407c9efed1 100644 --- a/ext/fts5/fts5Int.h +++ b/ext/fts5/fts5Int.h @@ -46,6 +46,10 @@ typedef sqlite3_uint64 u64; #endif +#ifndef SQLITE_PRIVATE +# define SQLITE_PRIVATE static +#endif + /* ** Maximum number of prefix indexes on single FTS5 table. This must be diff --git a/ext/fts5/tool/mkfts5c.tcl b/ext/fts5/tool/mkfts5c.tcl index 5a5eeae0af..c1acf8a493 100644 --- a/ext/fts5/tool/mkfts5c.tcl +++ b/ext/fts5/tool/mkfts5c.tcl @@ -88,7 +88,7 @@ proc fts5c_printfile {zIn} { foreach line [split $data "\n"] { if {[regexp {^#include.*fts5} $line]} continue if {[regexp {^(const )?[a-zA-Z][a-zA-Z0-9]* [*]?sqlite3Fts5} $line]} { - set line "static $line" + set line "SQLITE_PRIVATE $line" } set line [string map $sub_map $line] puts $G(fd) $line diff --git a/main.mk b/main.mk index 0fddfafe67..98a906eaaf 100644 --- a/main.mk +++ b/main.mk @@ -12,6 +12,8 @@ # THREADLIB Specify any extra linker options needed to make the library # thread safe # +# LIBS Extra libraries options +# # OPTS Extra compiler command-line options. # # EXE The suffix to add to executable files. ".exe" for windows @@ -48,6 +50,7 @@ TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP) TCCX += -I$(TOP)/ext/rtree -I$(TOP)/ext/icu -I$(TOP)/ext/fts3 TCCX += -I$(TOP)/ext/async -I$(TOP)/ext/userauth TCCX += -I$(TOP)/ext/fts5 +THREADLIB += $(LIBS) # Object files for the SQLite library. # @@ -59,7 +62,7 @@ LIBOBJ+= vdbe.o parse.o \ fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \ fts3_tokenize_vtab.o \ fts3_unicode.o fts3_unicode2.o \ - fts3_write.o func.o global.o hash.o \ + fts3_write.o fts5.o func.o global.o hash.o \ icu.o insert.o journal.o json1.o legacy.o loadext.o \ main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \ memjournal.o \ @@ -331,8 +334,7 @@ TESTSRC += \ $(TOP)/ext/misc/wholenumber.c \ $(TOP)/ext/misc/vfslog.c \ $(TOP)/ext/fts5/fts5_tcl.c \ - $(TOP)/ext/fts5/fts5_test_mi.c \ - fts5.c + $(TOP)/ext/fts5/fts5_test_mi.c #TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c diff --git a/manifest b/manifest index 76f039490f..2e1fa12c7f 100644 --- a/manifest +++ b/manifest @@ -1,7 +1,7 @@ -C Json1\stests\sare\sworking.\s\sBuilds\swithout\sFTS5\senabled.\s\sStill\ssome\sproblems\nbuilding\swith\sFTS5. -D 2015-10-08T23:37:00.134 +C Trying\sto\sget\sFTS5\stests\sto\sbuild\sand\srun\susing\smain.mk.\s\sNot\syet\sworking. +D 2015-10-09T01:42:49.474 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in ab670f8513a9aac7e6367f791bf5ac685111d0a9 +F Makefile.in f0088ff0d2ac949fce6de7c00f13a99ac5bdb663 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.msc f95e14e549addbf22304f6c01901b600aea10a6d F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 @@ -106,7 +106,7 @@ F ext/fts3/unicode/mkunicode.tcl 95cf7ec186e48d4985e433ff8a1c89090a774252 F ext/fts3/unicode/parseunicode.tcl da577d1384810fb4e2b209bf3313074353193e95 F ext/fts5/extract_api_docs.tcl a36e54ec777172ddd3f9a88daf593b00848368e0 F ext/fts5/fts5.h 98f802fe41481f9d797fce496f0fefcad72c7782 -F ext/fts5/fts5Int.h ed6c05b803e0bacf85228a8d255853e89796f6f5 +F ext/fts5/fts5Int.h 3e682a711ffa249cb327eec5c1b3e5a3deba4050 F ext/fts5/fts5_aux.c b09aa27dcdaa3d50a30be433fddaa48a50aa827b F ext/fts5/fts5_buffer.c b2fb69c1ee3378956c0d9ee964d61b59d296afaf F ext/fts5/fts5_config.c 57ee5fe71578cb494574fc0e6e51acb9a22a8695 @@ -186,7 +186,7 @@ F ext/fts5/test/fts5version.test 978f59541d8cef7e8591f8be2115ec5ccb863e2e F ext/fts5/test/fts5vocab.test cdf97b9678484e9bad5062edf9c9106e5c3b0c5c F ext/fts5/tool/fts5txt2db.tcl 3d19fb8ffb234031d33d7d2151acfbc55e9cfcc4 F ext/fts5/tool/loadfts5.tcl 58e90407cc5c2b1770460119488fd7c0090d4dd3 -F ext/fts5/tool/mkfts5c.tcl 52a2bae4dd05ca2c635d7f744e7dd684a1401570 +F ext/fts5/tool/mkfts5c.tcl 21552771bdb9e2a44a975a1a84ffa0a5a39d57f0 F ext/fts5/tool/showfts5.tcl 9eaf6c3df352f98a2ab5ce1921dd94128ab1381d F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43 F ext/icu/icu.c b2732aef0b076e4276d9b39b5a33cec7a05e1413 @@ -264,7 +264,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk e78ca7d50592dd4a4f2c7a09db478034feabc92f +F main.mk 82271e141b6b15693a66ddbdd1285c36e8606841 F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -1357,7 +1357,7 @@ F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e F tool/mkpragmatab.tcl 84af2b180484323a2ea22a2279e8bd9e3e1e492e F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97 F tool/mksqlite3c-noext.tcl 87240b09c20042999b41d5fabe091b7111287835 -F tool/mksqlite3c.tcl f38527a5125ada6705601d6665065a3bdf38ec64 +F tool/mksqlite3c.tcl b66b4170f693602cd6985aed15d9509fe2f18c84 F tool/mksqlite3h.tcl e3ac3f23897d86cb8f5f5df92e91643229fcc8d1 F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b F tool/mkvsix.tcl bbe57cd9ae11c6cc70319241101ef8d2b8c3765b @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 53dd7c4c65842c5c9ed3e84edd62e24f2c9be15b -R 9e61c8794766296f6abfb50c81f18f50 +P 2928f8e87d2e5d121e6e7e5993cbb773bb2b0603 +R 2760e46734f295e8733b8a00f5d6ba3d U drh -Z a87c3731b988c508695a8d0d1121a40b +Z 9cc40c2d063b915018c36739ed3ed59a diff --git a/manifest.uuid b/manifest.uuid index 9f32f5f37e..bcd6fffe1f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2928f8e87d2e5d121e6e7e5993cbb773bb2b0603 \ No newline at end of file +206174f9b154c590a3e2e94236db38e111d64bdb \ No newline at end of file diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl index ce808faa91..23241e27a6 100644 --- a/tool/mksqlite3c.tcl +++ b/tool/mksqlite3c.tcl @@ -211,7 +211,8 @@ proc copy_file {filename} { puts $out "#if 0" } elseif {!$linemacros && [regexp {^#line} $line]} { # Skip #line directives. - } elseif {$addstatic && ![regexp {^(static|typedef)} $line]} { + } elseif {$addstatic + && ![regexp {^(static|typedef|SQLITE_PRIVATE)} $line]} { # Skip adding the SQLITE_PRIVATE or SQLITE_API keyword before # functions if this header file does not need it. if {![info exists varonly_hdr($tail)] From 0008ce7cc5a320bc9ec796cab2eab0185c87f8e1 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 9 Oct 2015 11:09:47 +0000 Subject: [PATCH 10/15] Makefile and fts5 changes so that fts5 works with main.mk. Still does not work with Makefile.in. FossilOrigin-Name: 6ebac32d8378e46f44a6eb55aaa30baf4d7dde7d --- ext/fts5/fts5Int.h | 4 ---- ext/fts5/fts5_main.c | 22 ++++++++++++++++++---- ext/fts5/tool/mkfts5c.tcl | 6 ++++-- main.mk | 7 ++++--- manifest | 22 +++++++++++----------- manifest.uuid | 2 +- src/test1.c | 4 ---- 7 files changed, 38 insertions(+), 29 deletions(-) diff --git a/ext/fts5/fts5Int.h b/ext/fts5/fts5Int.h index 407c9efed1..ce066f2aa8 100644 --- a/ext/fts5/fts5Int.h +++ b/ext/fts5/fts5Int.h @@ -46,10 +46,6 @@ typedef sqlite3_uint64 u64; #endif -#ifndef SQLITE_PRIVATE -# define SQLITE_PRIVATE static -#endif - /* ** Maximum number of prefix indexes on single FTS5 table. This must be diff --git a/ext/fts5/fts5_main.c b/ext/fts5/fts5_main.c index 5aebc97fde..0fe204a3eb 100644 --- a/ext/fts5/fts5_main.c +++ b/ext/fts5/fts5_main.c @@ -2393,7 +2393,7 @@ static void fts5SourceIdFunc( sqlite3_result_text(pCtx, "--FTS5-SOURCE-ID--", -1, SQLITE_TRANSIENT); } -int sqlite3Fts5Init(sqlite3 *db){ +static int fts5Init(sqlite3 *db){ static const sqlite3_module fts5Mod = { /* iVersion */ 2, /* xCreate */ fts5CreateMethod, @@ -2454,6 +2454,15 @@ int sqlite3Fts5Init(sqlite3 *db){ return rc; } +/* +** The following functions are used to register the module with SQLite. If +** this module is being built as part of the SQLite core (SQLITE_CORE is +** defined), then sqlite3_open() will call sqlite3Fts5Init() directly. +** +** Or, if this module is being built as a loadable extension, +** sqlite3Fts5Init() is omitted and the two standard entry points +** sqlite3_fts_init() and sqlite3_fts5_init() defined instead. +*/ #ifndef SQLITE_CORE #ifdef _WIN32 __declspec(dllexport) @@ -2465,9 +2474,8 @@ int sqlite3_fts_init( ){ SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Unused parameter */ - return sqlite3Fts5Init(db); + return fts5Init(db); } -#endif #ifdef _WIN32 __declspec(dllexport) @@ -2479,5 +2487,11 @@ int sqlite3_fts5_init( ){ SQLITE_EXTENSION_INIT2(pApi); (void)pzErrMsg; /* Unused parameter */ - return sqlite3Fts5Init(db); + return fts5Init(db); } +#else +int sqlite3Fts5Init(sqlite3 *db){ + return fts5Init(db); +} +#endif + diff --git a/ext/fts5/tool/mkfts5c.tcl b/ext/fts5/tool/mkfts5c.tcl index c1acf8a493..535506de1b 100644 --- a/ext/fts5/tool/mkfts5c.tcl +++ b/ext/fts5/tool/mkfts5c.tcl @@ -87,8 +87,10 @@ proc fts5c_printfile {zIn} { foreach line [split $data "\n"] { if {[regexp {^#include.*fts5} $line]} continue - if {[regexp {^(const )?[a-zA-Z][a-zA-Z0-9]* [*]?sqlite3Fts5} $line]} { - set line "SQLITE_PRIVATE $line" + if { ![regexp { sqlite3Fts5Init\(} $line] + && [regexp {^(const )?[a-zA-Z][a-zA-Z0-9]* [*]?sqlite3Fts5} $line] + } { + set line "static $line" } set line [string map $sub_map $line] puts $G(fd) $line diff --git a/main.mk b/main.mk index 98a906eaaf..66068f668c 100644 --- a/main.mk +++ b/main.mk @@ -57,7 +57,8 @@ THREADLIB += $(LIBS) LIBOBJ+= vdbe.o parse.o \ alter.o analyze.o attach.o auth.o \ backup.o bitvec.o btmutex.o btree.o build.o \ - callback.o complete.o ctime.o date.o dbstat.o delete.o expr.o fault.o fkey.o \ + callback.o complete.o ctime.o date.o dbstat.o delete.o expr.o \ + fault.o fkey.o \ fts3.o fts3_aux.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \ fts3_snippet.o fts3_tokenizer.o fts3_tokenizer1.o \ fts3_tokenize_vtab.o \ @@ -728,9 +729,9 @@ testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c $(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c \ -o testfixture$(EXE) $(LIBTCL) libsqlite3.a $(THREADLIB) -amalgamation-testfixture$(EXE): sqlite3.c fts5.c $(TESTSRC) $(TOP)/src/tclsqlite.c +amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c $(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \ - $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts5.c \ + $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \ -o testfixture$(EXE) $(LIBTCL) $(THREADLIB) fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c diff --git a/manifest b/manifest index 2e1fa12c7f..1e1981c630 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Trying\sto\sget\sFTS5\stests\sto\sbuild\sand\srun\susing\smain.mk.\s\sNot\syet\sworking. -D 2015-10-09T01:42:49.474 +C Makefile\sand\sfts5\schanges\sso\sthat\sfts5\sworks\swith\smain.mk.\sStill\sdoes\snot\swork\swith\sMakefile.in. +D 2015-10-09T11:09:47.175 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in f0088ff0d2ac949fce6de7c00f13a99ac5bdb663 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -106,14 +106,14 @@ F ext/fts3/unicode/mkunicode.tcl 95cf7ec186e48d4985e433ff8a1c89090a774252 F ext/fts3/unicode/parseunicode.tcl da577d1384810fb4e2b209bf3313074353193e95 F ext/fts5/extract_api_docs.tcl a36e54ec777172ddd3f9a88daf593b00848368e0 F ext/fts5/fts5.h 98f802fe41481f9d797fce496f0fefcad72c7782 -F ext/fts5/fts5Int.h 3e682a711ffa249cb327eec5c1b3e5a3deba4050 +F ext/fts5/fts5Int.h ed6c05b803e0bacf85228a8d255853e89796f6f5 F ext/fts5/fts5_aux.c b09aa27dcdaa3d50a30be433fddaa48a50aa827b F ext/fts5/fts5_buffer.c b2fb69c1ee3378956c0d9ee964d61b59d296afaf F ext/fts5/fts5_config.c 57ee5fe71578cb494574fc0e6e51acb9a22a8695 F ext/fts5/fts5_expr.c 1df899afed24c9c6195eea1780dcc56fcd1d1139 F ext/fts5/fts5_hash.c 4bf4b99708848357b8a2b5819e509eb6d3df9246 F ext/fts5/fts5_index.c e03217c37f344f79673be385de6b03f732291000 -F ext/fts5/fts5_main.c d159079e618399f9b531ad1fe32772cff307ea91 +F ext/fts5/fts5_main.c 5125711e806d5d9382b4b12f71bd8a7b5e103ec6 F ext/fts5/fts5_storage.c df061a5caf9e50fbbd43113009b5b248362f4995 F ext/fts5/fts5_tcl.c 3bf445e66de32137d4693694ff7b1fd6074e32bd F ext/fts5/fts5_test_mi.c e96be827aa8f571031e65e481251dc1981d608bf @@ -186,7 +186,7 @@ F ext/fts5/test/fts5version.test 978f59541d8cef7e8591f8be2115ec5ccb863e2e F ext/fts5/test/fts5vocab.test cdf97b9678484e9bad5062edf9c9106e5c3b0c5c F ext/fts5/tool/fts5txt2db.tcl 3d19fb8ffb234031d33d7d2151acfbc55e9cfcc4 F ext/fts5/tool/loadfts5.tcl 58e90407cc5c2b1770460119488fd7c0090d4dd3 -F ext/fts5/tool/mkfts5c.tcl 21552771bdb9e2a44a975a1a84ffa0a5a39d57f0 +F ext/fts5/tool/mkfts5c.tcl 09ce6a7997440508360f5ba1651ab7e923a8bf31 F ext/fts5/tool/showfts5.tcl 9eaf6c3df352f98a2ab5ce1921dd94128ab1381d F ext/icu/README.txt d9fbbad0c2f647c3fdf715fc9fd64af53aedfc43 F ext/icu/icu.c b2732aef0b076e4276d9b39b5a33cec7a05e1413 @@ -264,7 +264,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk 82271e141b6b15693a66ddbdd1285c36e8606841 +F main.mk 784763e87a5080abc749d6263198bbe5aa93fd20 F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 @@ -353,7 +353,7 @@ F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46 F src/status.c f266ad8a2892d659b74f0f50cb6a88b6e7c12179 F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e F src/tclsqlite.c d9439b6a910985b7fff43ba6756bcef00de22649 -F src/test1.c 5d1bbac006ef00e6fe4332c554a7cd96abe5fa42 +F src/test1.c 8fff9c5aa63d6490f516d018b70c12a9cb9a4d8a F src/test2.c 577961fe48961b2f2e5c8b56ee50c3f459d3359d F src/test3.c 64d2afdd68feac1bb5e2ffb8226c8c639f798622 F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 2928f8e87d2e5d121e6e7e5993cbb773bb2b0603 -R 2760e46734f295e8733b8a00f5d6ba3d -U drh -Z 9cc40c2d063b915018c36739ed3ed59a +P 206174f9b154c590a3e2e94236db38e111d64bdb +R 7677b595a4a025d5b5c3743b20676b45 +U dan +Z 2d1f0773394fa57beba698d5cfa49140 diff --git a/manifest.uuid b/manifest.uuid index bcd6fffe1f..1147fff002 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -206174f9b154c590a3e2e94236db38e111d64bdb \ No newline at end of file +6ebac32d8378e46f44a6eb55aaa30baf4d7dde7d \ No newline at end of file diff --git a/src/test1.c b/src/test1.c index df00e1943e..6c47754bf9 100644 --- a/src/test1.c +++ b/src/test1.c @@ -6384,7 +6384,6 @@ static int tclLoadStaticExtensionCmd( extern int sqlite3_spellfix_init(sqlite3*,char**,const sqlite3_api_routines*); extern int sqlite3_totype_init(sqlite3*,char**,const sqlite3_api_routines*); extern int sqlite3_wholenumber_init(sqlite3*,char**,const sqlite3_api_routines*); - extern int sqlite3_fts5_init(sqlite3*,char**,const sqlite3_api_routines*); static const struct { const char *zExtName; int (*pInit)(sqlite3*,char**,const sqlite3_api_routines*); @@ -6392,9 +6391,6 @@ static int tclLoadStaticExtensionCmd( { "amatch", sqlite3_amatch_init }, { "closure", sqlite3_closure_init }, { "eval", sqlite3_eval_init }, -#ifdef SQLITE_ENABLE_FTS5 - { "fts5", sqlite3_fts5_init }, -#endif { "fileio", sqlite3_fileio_init }, { "fuzzer", sqlite3_fuzzer_init }, { "ieee754", sqlite3_ieee_init }, From ce1d9f546b38c133c1e4adfaef230a5c69e271a2 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 9 Oct 2015 12:48:33 +0000 Subject: [PATCH 11/15] Add configure script options --enable-fts5 and --enable-json1. Automatically search for -lm when using --enable-fts5. FossilOrigin-Name: a0c44f1d46f1f31043d66f20c8dc0df53db15c30 --- configure | 209 ++++++++++++++++++++++++++++++++++++++++--- configure.ac | 41 +++++++++ manifest | 18 ++-- manifest.uuid | 2 +- test/releasetest.tcl | 10 ++- 5 files changed, 253 insertions(+), 27 deletions(-) diff --git a/configure b/configure index 2969759f3c..532e0b202d 100755 --- a/configure +++ b/configure @@ -902,6 +902,11 @@ with_readline_inc enable_debug enable_amalgamation enable_load_extension +enable_fts3 +enable_fts4 +enable_fts5 +enable_json1 +enable_rtree enable_gcov ' ac_precious_vars='build_alias @@ -1544,6 +1549,11 @@ Optional Features: separately --disable-load-extension Disable loading of external extensions + --enable-fts3 Enable the FTS3 extension + --enable-fts4 Enable the FTS4 extension + --enable-fts5 Enable the FTS5 extension + --enable-json1 Enable the JSON1 extension + --enable-rtree Enable the RTREE extension --enable-gcov Enable coverage testing using gcov Optional Packages: @@ -3911,13 +3921,13 @@ if ${lt_cv_nm_interface+:} false; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:3914: $ac_compile\"" >&5) + (eval echo "\"\$as_me:3924: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:3917: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:3927: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:3920: output\"" >&5) + (eval echo "\"\$as_me:3930: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5123,7 +5133,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5126 "configure"' > conftest.$ac_ext + echo '#line 5136 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6648,11 +6658,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6661: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6655: \$? = $ac_status" >&5 + echo "$as_me:6665: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6987,11 +6997,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6990: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7000: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6994: \$? = $ac_status" >&5 + echo "$as_me:7004: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7092,11 +7102,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7095: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7105: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7099: \$? = $ac_status" >&5 + echo "$as_me:7109: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -7147,11 +7157,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7150: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7160: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7154: \$? = $ac_status" >&5 + echo "$as_me:7164: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9527,7 +9537,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 9530 "configure" +#line 9540 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9623,7 +9633,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 9626 "configure" +#line 9636 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11223,6 +11233,177 @@ else OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" fi +######### +# See whether we should enable Full Text Search extensions +# Check whether --enable-fts3 was given. +if test "${enable_fts3+set}" = set; then : + enableval=$enable_fts3; enable_fts3=yes +else + enable_fts3=no +fi + +if test "${enable_fts3}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_FTS3" +fi +# Check whether --enable-fts4 was given. +if test "${enable_fts4+set}" = set; then : + enableval=$enable_fts4; enable_fts4=yes +else + enable_fts4=no +fi + +if test "${enable_fts4}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_FTS4" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing log" >&5 +$as_echo_n "checking for library containing log... " >&6; } +if ${ac_cv_search_log+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char log (); +int +main () +{ +return log (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_log=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_log+:} false; then : + break +fi +done +if ${ac_cv_search_log+:} false; then : + +else + ac_cv_search_log=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_log" >&5 +$as_echo "$ac_cv_search_log" >&6; } +ac_res=$ac_cv_search_log +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi +# Check whether --enable-fts5 was given. +if test "${enable_fts5+set}" = set; then : + enableval=$enable_fts5; enable_fts5=yes +else + enable_fts5=no +fi + +if test "${enable_fts5}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_FTS5" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing log" >&5 +$as_echo_n "checking for library containing log... " >&6; } +if ${ac_cv_search_log+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char log (); +int +main () +{ +return log (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_log=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_log+:} false; then : + break +fi +done +if ${ac_cv_search_log+:} false; then : + +else + ac_cv_search_log=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_log" >&5 +$as_echo "$ac_cv_search_log" >&6; } +ac_res=$ac_cv_search_log +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + +######### +# See whether we should enable JSON1 +# Check whether --enable-json1 was given. +if test "${enable_json1+set}" = set; then : + enableval=$enable_json1; enable_json1=yes +else + enable_json1=no +fi + +if test "${enable_json1}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_JSON1" +fi + +######### +# See whether we should enable RTREE +# Check whether --enable-rtree was given. +if test "${enable_rtree+set}" = set; then : + enableval=$enable_rtree; enable_rtree=yes +else + enable_rtree=no +fi + +if test "${enable_rtree}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_RTREE" +fi + ######### # attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) parameter for option in $CFLAGS $CPPFLAGS diff --git a/configure.ac b/configure.ac index 92d9b47b39..8fb9449bd5 100644 --- a/configure.ac +++ b/configure.ac @@ -560,6 +560,47 @@ else OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" fi +######### +# See whether we should enable Full Text Search extensions +AC_ARG_ENABLE(fts3, AC_HELP_STRING([--enable-fts3], + [Enable the FTS3 extension]), + [enable_fts3=yes],[enable_fts3=no]) +if test "${enable_fts3}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_FTS3" +fi +AC_ARG_ENABLE(fts4, AC_HELP_STRING([--enable-fts4], + [Enable the FTS4 extension]), + [enable_fts4=yes],[enable_fts4=no]) +if test "${enable_fts4}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_FTS4" + AC_SEARCH_LIBS([log],[m]) +fi +AC_ARG_ENABLE(fts5, AC_HELP_STRING([--enable-fts5], + [Enable the FTS5 extension]), + [enable_fts5=yes],[enable_fts5=no]) +if test "${enable_fts5}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_FTS5" + AC_SEARCH_LIBS([log],[m]) +fi + +######### +# See whether we should enable JSON1 +AC_ARG_ENABLE(json1, AC_HELP_STRING([--enable-json1], + [Enable the JSON1 extension]), + [enable_json1=yes],[enable_json1=no]) +if test "${enable_json1}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_JSON1" +fi + +######### +# See whether we should enable RTREE +AC_ARG_ENABLE(rtree, AC_HELP_STRING([--enable-rtree], + [Enable the RTREE extension]), + [enable_rtree=yes],[enable_rtree=no]) +if test "${enable_rtree}" = "yes" ; then + OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_RTREE" +fi + ######### # attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) parameter for option in $CFLAGS $CPPFLAGS diff --git a/manifest b/manifest index 1e1981c630..4e165c5ce8 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Makefile\sand\sfts5\schanges\sso\sthat\sfts5\sworks\swith\smain.mk.\sStill\sdoes\snot\swork\swith\sMakefile.in. -D 2015-10-09T11:09:47.175 +C Add\sconfigure\sscript\soptions\s--enable-fts5\sand\s--enable-json1.\s\sAutomatically\nsearch\sfor\s-lm\swhen\susing\s--enable-fts5. +D 2015-10-09T12:48:33.545 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in f0088ff0d2ac949fce6de7c00f13a99ac5bdb663 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -38,8 +38,8 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63 F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977 F config.h.in 42b71ad3fe21c9e88fa59e8458ca1a6bc72eb0c0 F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55 -F configure 2f61915a1bdfbc589244334401cf97d3401e6a39 x -F configure.ac 713de38000413e469188db2cb85bed759b56f322 +F configure 6c28beb2c5adfea004c7eb0dc615ce5ebaca67ee x +F configure.ac 1e87304e51af110950c48a1eea6ffc7a577f600e F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad F doc/lemon.html 334dbf6621b8fb8790297ec1abf3cfa4621709d1 F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710 @@ -947,7 +947,7 @@ F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736 F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8 F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254 -F test/releasetest.tcl 97e4e5ca5925b21ef470b3c97d4c46dd063cfec4 +F test/releasetest.tcl f52239d28ed829ca7979617845a442d2d1b08aaa F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 206174f9b154c590a3e2e94236db38e111d64bdb -R 7677b595a4a025d5b5c3743b20676b45 -U dan -Z 2d1f0773394fa57beba698d5cfa49140 +P 6ebac32d8378e46f44a6eb55aaa30baf4d7dde7d +R 15162ca8241950d9040673fb4e5f94d0 +U drh +Z 8ecad2a04d12126eee50b9755a0e6c68 diff --git a/manifest.uuid b/manifest.uuid index 1147fff002..1b4a81fd0c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6ebac32d8378e46f44a6eb55aaa30baf4d7dde7d \ No newline at end of file +a0c44f1d46f1f31043d66f20c8dc0df53db15c30 \ No newline at end of file diff --git a/test/releasetest.tcl b/test/releasetest.tcl index ef29a0d945..c6ad2f4c04 100644 --- a/test/releasetest.tcl +++ b/test/releasetest.tcl @@ -78,6 +78,7 @@ array set ::Configs [strip_comments { -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 -DSQLITE_ENABLE_STMT_SCANSTATUS + --enable-json1 } "Check-Symbols" { -DSQLITE_MEMDEBUG=1 @@ -95,6 +96,7 @@ array set ::Configs [strip_comments { -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_STMT_SCANSTATUS + --enable-json1 --enable-fts5 } "Debug-One" { --disable-shared @@ -129,13 +131,13 @@ array set ::Configs [strip_comments { -DSQLITE_DISABLE_LFS=1 -DSQLITE_ENABLE_ATOMIC_WRITE=1 -DSQLITE_ENABLE_IOTRACE=1 - -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_MAX_PAGE_SIZE=4096 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_OMIT_VIRTUALTABLE=1 -DSQLITE_TEMP_STORE=3 + --enable-json1 --enable-fts5 } "Device-Two" { -DSQLITE_4_BYTE_ALIGNED_MALLOC=1 @@ -146,7 +148,6 @@ array set ::Configs [strip_comments { -DSQLITE_DEFAULT_TEMP_CACHE_SIZE=1000 -DSQLITE_DISABLE_LFS=1 -DSQLITE_ENABLE_FTS3=1 - -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_MAX_COMPOUND_SELECT=50 @@ -154,6 +155,7 @@ array set ::Configs [strip_comments { -DSQLITE_OMIT_TRACE=1 -DSQLITE_TEMP_STORE=3 -DSQLITE_THREADSAFE=2 + --enable-json1 --enable-fts5 } "Locking-Style" { -O2 @@ -177,6 +179,7 @@ array set ::Configs [strip_comments { -DSQLITE_DEBUG=1 -DSQLITE_PREFER_PROXY_LOCKING=1 -DSQLITE_ENABLE_API_ARMOR=1 + --enable-json1 --enable-fts5 } "Extra-Robustness" { -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 @@ -190,6 +193,7 @@ array set ::Configs [strip_comments { -DSQLITE_ENABLE_FTS4_PARENTHESIS -DSQLITE_DISABLE_FTS4_DEFERRED -DSQLITE_ENABLE_RTREE + --enable-json1 --enable-fts5 } "No-lookaside" { -DSQLITE_TEST_REALLOC_STRESS=1 @@ -200,7 +204,7 @@ array set ::Configs [strip_comments { -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE - -DSQLITE_ENABLE_JSON1=1 + --enable-json1 } # The next group of configurations are used only by the From 64db184efa98282a618279331c721681e6cf814d Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 9 Oct 2015 13:29:27 +0000 Subject: [PATCH 12/15] Fix a typo in the MSVC Makefile FossilOrigin-Name: c8a12082380991781b5ecd2f479ec65600f4f695 --- Makefile.msc | 2 +- manifest | 14 +++++++------- manifest.uuid | 2 +- test/releasetest.tcl | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index 5419071ca9..8e00eb83b1 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1213,7 +1213,7 @@ FUZZDATA = \ # Extra compiler options for various shell tools # -SHELL_OPT += -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 +SHELL_OPT = -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 diff --git a/manifest b/manifest index 4e165c5ce8..6fc180d764 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Add\sconfigure\sscript\soptions\s--enable-fts5\sand\s--enable-json1.\s\sAutomatically\nsearch\sfor\s-lm\swhen\susing\s--enable-fts5. -D 2015-10-09T12:48:33.545 +C Fix\sa\stypo\sin\sthe\sMSVC\sMakefile +D 2015-10-09T13:29:27.852 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in f0088ff0d2ac949fce6de7c00f13a99ac5bdb663 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc f95e14e549addbf22304f6c01901b600aea10a6d +F Makefile.msc cc5793c66d1d280d20c5a0652c176e0e115638df F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION ccfc4d1576dbfdeece0a4372a2e6a2e37d3e7975 @@ -947,7 +947,7 @@ F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736 F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8 F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254 -F test/releasetest.tcl f52239d28ed829ca7979617845a442d2d1b08aaa +F test/releasetest.tcl 67a82199e6ddee609211488bc04ed3f9ea3aa28a F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 6ebac32d8378e46f44a6eb55aaa30baf4d7dde7d -R 15162ca8241950d9040673fb4e5f94d0 +P a0c44f1d46f1f31043d66f20c8dc0df53db15c30 +R 79fcc81444e121108889bba9b50309d6 U drh -Z 8ecad2a04d12126eee50b9755a0e6c68 +Z 6994955bda3f00155718d20bf831c8ed diff --git a/manifest.uuid b/manifest.uuid index 1b4a81fd0c..e1713c873f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a0c44f1d46f1f31043d66f20c8dc0df53db15c30 \ No newline at end of file +c8a12082380991781b5ecd2f479ec65600f4f695 \ No newline at end of file diff --git a/test/releasetest.tcl b/test/releasetest.tcl index c6ad2f4c04..04c2419ace 100644 --- a/test/releasetest.tcl +++ b/test/releasetest.tcl @@ -137,7 +137,7 @@ array set ::Configs [strip_comments { -DSQLITE_OMIT_PROGRESS_CALLBACK=1 -DSQLITE_OMIT_VIRTUALTABLE=1 -DSQLITE_TEMP_STORE=3 - --enable-json1 --enable-fts5 + --enable-json1 } "Device-Two" { -DSQLITE_4_BYTE_ALIGNED_MALLOC=1 From c4e6d1775ee3eec429b85c3fa5712cd4a1f0c442 Mon Sep 17 00:00:00 2001 From: drh Date: Fri, 9 Oct 2015 13:42:52 +0000 Subject: [PATCH 13/15] Change the version number of the next release to 3.9.0. FossilOrigin-Name: aa8fdadf2defed00a28366a3b35a3e2eefecf0ed --- VERSION | 2 +- configure | 18 +++++++++--------- manifest | 15 +++++++-------- manifest.uuid | 2 +- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/VERSION b/VERSION index 89a1ad7ad3..a5c4c76339 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.8.12 +3.9.0 diff --git a/configure b/configure index 532e0b202d..67a926ecbb 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.8.12. +# Generated by GNU Autoconf 2.69 for sqlite 3.9.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -726,8 +726,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.8.12' -PACKAGE_STRING='sqlite 3.8.12' +PACKAGE_VERSION='3.9.0' +PACKAGE_STRING='sqlite 3.9.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1459,7 +1459,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.8.12 to adapt to many kinds of systems. +\`configure' configures sqlite 3.9.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1524,7 +1524,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.8.12:";; + short | recursive ) echo "Configuration of sqlite 3.9.0:";; esac cat <<\_ACEOF @@ -1644,7 +1644,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.8.12 +sqlite configure 3.9.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2063,7 +2063,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.8.12, which was +It was created by sqlite $as_me 3.9.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -11989,7 +11989,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.8.12, which was +This file was extended by sqlite $as_me 3.9.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -12055,7 +12055,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.8.12 +sqlite config.status 3.9.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/manifest b/manifest index a156fd5c23..b99d30edbf 100644 --- a/manifest +++ b/manifest @@ -1,12 +1,12 @@ -C Add\sthe\sJSON1\sand\sFTS5\sextensions\sto\sthe\samalgamation.\s\sAdd\snew\soptions\nto\s./configure:\s--enable-json1\sand\s--enable-fts5. -D 2015-10-09T13:39:51.526 +C Change\sthe\sversion\snumber\sof\sthe\snext\srelease\sto\s3.9.0. +D 2015-10-09T13:42:52.722 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in f0088ff0d2ac949fce6de7c00f13a99ac5bdb663 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.msc cc5793c66d1d280d20c5a0652c176e0e115638df F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 -F VERSION ccfc4d1576dbfdeece0a4372a2e6a2e37d3e7975 +F VERSION cacf16a72f9a03cd06b939a764e32f6f53254c7f F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 F addopcodes.awk 9eb448a552d5c0185cf62c463f9c173cedae3811 F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 @@ -38,7 +38,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63 F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977 F config.h.in 42b71ad3fe21c9e88fa59e8458ca1a6bc72eb0c0 F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55 -F configure 6c28beb2c5adfea004c7eb0dc615ce5ebaca67ee x +F configure 4561c28dbc22bd5c678e3d5dc631cf7ee7e78efb x F configure.ac 1e87304e51af110950c48a1eea6ffc7a577f600e F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad F doc/lemon.html 334dbf6621b8fb8790297ec1abf3cfa4621709d1 @@ -1390,8 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P df9ef61f1ba2e3a3420fae84e3eaa2e0e235bc28 c8a12082380991781b5ecd2f479ec65600f4f695 -R ff35e33c45066b639f8723b72567b740 -T +closed c8a12082380991781b5ecd2f479ec65600f4f695 +P 1eb769933108cf401b25c8d784ea23f27324a0bd +R cd6778cbc7950f234a6f4e35497db7c8 U drh -Z 9e03a387129508847442535127adeb67 +Z 1e0fc771971e482332435479dc5f8b1d diff --git a/manifest.uuid b/manifest.uuid index c12eaca407..74c82ba483 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1eb769933108cf401b25c8d784ea23f27324a0bd \ No newline at end of file +aa8fdadf2defed00a28366a3b35a3e2eefecf0ed \ No newline at end of file From 8381be4ace3abe03bfb5a6ef501f25426b41dab2 Mon Sep 17 00:00:00 2001 From: mistachkin Date: Fri, 9 Oct 2015 14:23:56 +0000 Subject: [PATCH 14/15] In the MSVC makefile, adjust the names of two nmake variables for consistency. FossilOrigin-Name: 92aa4b6b6fbb83f965e4c4be0aa21a8b7e330ed8 --- Makefile.msc | 18 +++++++++--------- manifest | 14 +++++++------- manifest.uuid | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile.msc b/Makefile.msc index 8e00eb83b1..b486c8b8d1 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -388,11 +388,11 @@ CORE_LINK_OPTS = /DEF:sqlite3.def # These are additional compiler options used for the shell executable. # -!IFNDEF SHELL_OPT +!IFNDEF SHELL_COMPILE_OPTS !IF $(DYNAMIC_SHELL)!=0 -SHELL_OPT = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport) +SHELL_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) -DSQLITE_API=__declspec(dllimport) !ELSE -SHELL_OPT = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) +SHELL_COMPILE_OPTS = -DSQLITE_SHELL_JSON1 $(SHELL_CCONV_OPTS) !ENDIF !ENDIF @@ -1213,9 +1213,9 @@ FUZZDATA = \ # Extra compiler options for various shell tools # -SHELL_OPT = -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 -FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 +SHELL_COMPILE_OPTS = -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 +FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 +FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 # Standard options to testfixture # @@ -1233,18 +1233,18 @@ libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib $(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCL:tcl=tclstub) $(TLIBS) sqlite3.exe: $(TOP)\src\shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h - $(LTLINK) $(SHELL_COMPILE_OPTS) $(SHELL_OPT) $(READLINE_FLAGS) $(TOP)\src\shell.c \ + $(LTLINK) $(SHELL_COMPILE_OPTS) $(SHELL_COMPILE_OPTS) $(READLINE_FLAGS) $(TOP)\src\shell.c \ /link /pdb:sqlite3sh.pdb $(LTLINKOPTS) $(SHELL_LINK_OPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LIBREADLINE) $(LTLIBS) $(TLIBS) sqldiff.exe: $(TOP)\tool\sqldiff.c sqlite3.c sqlite3.h $(LTLINK) $(NO_WARN) $(TOP)\tool\sqldiff.c sqlite3.c fuzzershell.exe: $(TOP)\tool\fuzzershell.c sqlite3.c sqlite3.h - $(LTLINK) $(NO_WARN) $(FUZZERSHELL_OPT) \ + $(LTLINK) $(NO_WARN) $(FUZZERSHELL_COMPILE_OPTS) \ $(TOP)\tool\fuzzershell.c sqlite3.c fuzzcheck.exe: $(TOP)\test\fuzzcheck.c sqlite3.c sqlite3.h - $(LTLINK) $(NO_WARN) $(FUZZCHECK_OPT) $(TOP)\test\fuzzcheck.c sqlite3.c + $(LTLINK) $(NO_WARN) $(FUZZCHECK_COMPILE_OPTS) $(TOP)\test\fuzzcheck.c sqlite3.c mptester.exe: $(TOP)\mptest\mptest.c $(SHELL_CORE_DEP) $(LIBRESOBJS) sqlite3.h $(LTLINK) $(NO_WARN) $(SHELL_COMPILE_OPTS) $(TOP)\mptest\mptest.c \ diff --git a/manifest b/manifest index b99d30edbf..827da675cc 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Change\sthe\sversion\snumber\sof\sthe\snext\srelease\sto\s3.9.0. -D 2015-10-09T13:42:52.722 +C In\sthe\sMSVC\smakefile,\sadjust\sthe\snames\sof\stwo\snmake\svariables\sfor\sconsistency. +D 2015-10-09T14:23:56.143 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in f0088ff0d2ac949fce6de7c00f13a99ac5bdb663 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc cc5793c66d1d280d20c5a0652c176e0e115638df +F Makefile.msc 0ed934b4ae6a5ec0b9d7e770104864f8372414ab F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION cacf16a72f9a03cd06b939a764e32f6f53254c7f @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 1eb769933108cf401b25c8d784ea23f27324a0bd -R cd6778cbc7950f234a6f4e35497db7c8 -U drh -Z 1e0fc771971e482332435479dc5f8b1d +P aa8fdadf2defed00a28366a3b35a3e2eefecf0ed +R 67a5030e734fab5c2a42f6160a4ca2ff +U mistachkin +Z a73711c3af55fff2b6c43d8879780308 diff --git a/manifest.uuid b/manifest.uuid index 74c82ba483..e8bf42d480 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -aa8fdadf2defed00a28366a3b35a3e2eefecf0ed \ No newline at end of file +92aa4b6b6fbb83f965e4c4be0aa21a8b7e330ed8 \ No newline at end of file From 2572751be87022f7dcfdfbae8d874e68a1382b66 Mon Sep 17 00:00:00 2001 From: dan Date: Fri, 9 Oct 2015 14:37:15 +0000 Subject: [PATCH 15/15] Add --enable-fts5 and --enable-json1 options to the amalgamation autoconf package. FossilOrigin-Name: 8a4e19888f512c3ee95aa3040924fc932fbdab1a --- autoconf/Makefile.am | 2 +- autoconf/configure.ac | 25 +++++++++++++++++++++++++ manifest | 16 ++++++++-------- manifest.uuid | 2 +- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/autoconf/Makefile.am b/autoconf/Makefile.am index 60d2ba2673..5b7c4a090a 100644 --- a/autoconf/Makefile.am +++ b/autoconf/Makefile.am @@ -1,5 +1,5 @@ -AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE +AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE lib_LTLIBRARIES = libsqlite3.la libsqlite3_la_SOURCES = sqlite3.c diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 46b6563edc..888b924e40 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -78,6 +78,31 @@ AC_MSG_RESULT($enable_dynamic_extensions) AC_SUBST(DYNAMIC_EXTENSION_FLAGS) #----------------------------------------------------------------------- +#----------------------------------------------------------------------- +# --enable-fts5 +# +AC_ARG_ENABLE(fts5, [AS_HELP_STRING( + [--enable-fts5], [include fts5 support [default=no]])], + [], [enable_fts5=no]) +if test x"$enable_fts5" == "xyes"; then + AC_SEARCH_LIBS(log, m) + FTS5_FLAGS=-DSQLITE_ENABLE_FTS5 +fi +AC_SUBST(FTS5_FLAGS) +#----------------------------------------------------------------------- + +#----------------------------------------------------------------------- +# --enable-json1 +# +AC_ARG_ENABLE(json1, [AS_HELP_STRING( + [--enable-json1], [include json1 support [default=no]])], + [], [enable_json1=no]) +if test x"$enable_json1" == "xyes"; then + JSON1_FLAGS=-DSQLITE_ENABLE_JSON1 +fi +AC_SUBST(JSON1_FLAGS) +#----------------------------------------------------------------------- + AC_CHECK_FUNCS(posix_fallocate) #----------------------------------------------------------------------- diff --git a/manifest b/manifest index 827da675cc..d0e0f762d0 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\sthe\sMSVC\smakefile,\sadjust\sthe\snames\sof\stwo\snmake\svariables\sfor\sconsistency. -D 2015-10-09T14:23:56.143 +C Add\s--enable-fts5\sand\s--enable-json1\soptions\sto\sthe\samalgamation\sautoconf\spackage. +D 2015-10-09T14:37:15.899 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in f0088ff0d2ac949fce6de7c00f13a99ac5bdb663 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -13,12 +13,12 @@ F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 -F autoconf/Makefile.am 27de1af382c82e81f1fe36a7f38528fba004eb1a +F autoconf/Makefile.am bd4a90972aa87f079af6624ddea3df3d58f26d2f F autoconf/README 14458f1046c118efa721aadec5f227e876d3cd38 F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7 F autoconf/config.guess 94cc57e2a3fdb9c235b362ace86d77e89d188cad x F autoconf/config.sub 1efb390a8fb4bfafd74783a15a8fb5311c84300e x -F autoconf/configure.ac ba3e99ba1a8171d0682b68443517088fc5d6f13a +F autoconf/configure.ac a1fe4eee429fd9d3170be41941514a2b7120ba4e F autoconf/depcomp 0b26f101e3bc9fd1ff0be1da9fb4a82371142f92 x F autoconf/install-sh 06ee6336e63bb845c8439d777c32eb2eccc4fbf1 x F autoconf/ltmain.sh 7a658a24028f02331c1d2446562758083c5eadd1 @@ -1390,7 +1390,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P aa8fdadf2defed00a28366a3b35a3e2eefecf0ed -R 67a5030e734fab5c2a42f6160a4ca2ff -U mistachkin -Z a73711c3af55fff2b6c43d8879780308 +P 92aa4b6b6fbb83f965e4c4be0aa21a8b7e330ed8 +R 22c99efaaba11dba793d1740711eaae0 +U dan +Z b821d121ea8aa17674df3a472339de94 diff --git a/manifest.uuid b/manifest.uuid index e8bf42d480..d20a675956 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -92aa4b6b6fbb83f965e4c4be0aa21a8b7e330ed8 \ No newline at end of file +8a4e19888f512c3ee95aa3040924fc932fbdab1a \ No newline at end of file