aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in43
-rw-r--r--Makefile.msc29
-rw-r--r--VERSION2
-rw-r--r--autoconf/Makefile.am2
-rw-r--r--autoconf/configure.ac25
-rwxr-xr-xconfigure227
-rw-r--r--configure.ac41
-rw-r--r--ext/fts5/fts5_aux.c2
-rw-r--r--ext/fts5/fts5_expr.c10
-rw-r--r--ext/fts5/fts5_main.c42
-rw-r--r--ext/fts5/fts5_tcl.c1
-rw-r--r--ext/fts5/fts5parse.y1
-rw-r--r--ext/fts5/test/fts5_common.tcl1
-rw-r--r--ext/fts5/test/fts5fault6.test2
-rw-r--r--ext/fts5/tool/mkfts5c.tcl14
-rw-r--r--ext/misc/json1.c2
-rw-r--r--ext/rbu/sqlite3rbu.c59
-rw-r--r--main.mk64
-rw-r--r--manifest66
-rw-r--r--manifest.uuid2
-rw-r--r--src/ctime.c6
-rw-r--r--src/main.c15
-rw-r--r--src/shell.c7
-rw-r--r--src/test1.c12
-rw-r--r--src/test_config.c6
-rw-r--r--test/json101.test6
-rw-r--r--test/json102.test6
-rw-r--r--test/releasetest.tcl8
-rw-r--r--tool/mksqlite3c.tcl5
-rw-r--r--tool/mksqlite3h.tcl1
30 files changed, 545 insertions, 162 deletions
diff --git a/Makefile.in b/Makefile.in
index d34ee84fb..d8b087c2e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -66,7 +66,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
#
@@ -177,7 +177,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 \
@@ -275,8 +275,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 \
@@ -353,6 +353,8 @@ SRC += \
SRC += \
$(TOP)/ext/rbu/sqlite3rbu.h \
$(TOP)/ext/rbu/sqlite3rbu.c
+SRC += \
+ $(TOP)/ext/misc/json1.c
# Generated source code files
#
@@ -423,7 +425,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 \
@@ -548,16 +549,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.
#
@@ -580,20 +581,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 \
@@ -619,13 +620,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) <tsrc/vdbe.c >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
@@ -1001,6 +1003,9 @@ rtree.lo: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
sqlite3session.lo: $(TOP)/ext/session/sqlite3session.c $(HDR) $(EXTHDR)
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/session/sqlite3session.c
+json1.lo: $(TOP)/ext/misc/json1.c
+ $(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/misc/json1.c
+
# FTS5 things
#
FTS5_SRC = \
diff --git a/Makefile.msc b/Makefile.msc
index b818ff160..883fb967f 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -1021,7 +1021,8 @@ SRC4 = \
$(TOP)\ext\session\sqlite3session.h \
$(TOP)\ext\session\sqlite3session.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
@@ -1234,11 +1235,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_COMPILE_OPTS = -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
+FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
+FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
# Standard options to testfixture
#
@@ -1255,19 +1256,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_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 $(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_COMPILE_OPTS) \
+ $(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_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 \
@@ -1293,7 +1294,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
@@ -1301,6 +1302,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/VERSION b/VERSION
index 89a1ad7ad..a5c4c7633 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.8.12
+3.9.0
diff --git a/autoconf/Makefile.am b/autoconf/Makefile.am
index 60d2ba267..5b7c4a090 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 46b6563ed..888b924e4 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/configure b/configure
index 2969759f3..67a926ecb 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=''
@@ -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
@@ -1454,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]...
@@ -1519,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
@@ -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:
@@ -1634,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.
@@ -2053,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 $@
@@ -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
@@ -11224,6 +11234,177 @@ else
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
do
@@ -11808,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
@@ -11874,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/configure.ac b/configure.ac
index 92d9b47b3..8fb9449bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -561,6 +561,47 @@ else
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
do
diff --git a/ext/fts5/fts5_aux.c b/ext/fts5/fts5_aux.c
index 2e33d5132..ad581bba7 100644
--- a/ext/fts5/fts5_aux.c
+++ b/ext/fts5/fts5_aux.c
@@ -13,7 +13,7 @@
#include "fts5Int.h"
-#include <math.h>
+#include <math.h> /* amalgamator: keep */
/*
** Object used to iterate through all "coalesced phrase instances" in
diff --git a/ext/fts5/fts5_expr.c b/ext/fts5/fts5_expr.c
index c90a2e470..02351478a 100644
--- a/ext/fts5/fts5_expr.c
+++ b/ext/fts5/fts5_expr.c
@@ -32,6 +32,11 @@ typedef struct Fts5ExprTerm Fts5ExprTerm;
void *sqlite3Fts5ParserAlloc(void *(*mallocProc)(u64));
void sqlite3Fts5ParserFree(void*, void (*freeProc)(void*));
void sqlite3Fts5Parser(void*, int, Fts5Token, Fts5Parse*);
+#ifndef NDEBUG
+#include <stdio.h>
+void sqlite3Fts5ParserTrace(FILE*, char*);
+#endif
+
struct Fts5Expr {
Fts5Index *pIndex;
@@ -2276,6 +2281,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 644d32323..0fe204a3e 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
-){
+static int fts5Init(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;
@@ -2463,6 +2454,16 @@ int sqlite3_fts5_init(
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)
#endif
@@ -2471,7 +2472,26 @@ 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 fts5Init(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 fts5Init(db);
+}
+#else
+int sqlite3Fts5Init(sqlite3 *db){
+ return fts5Init(db);
+}
+#endif
diff --git a/ext/fts5/fts5_tcl.c b/ext/fts5/fts5_tcl.c
index 21ce5f7bd..b470c557d 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/ext/fts5/fts5parse.y b/ext/fts5/fts5parse.y
index e87290822..065af7705 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/ext/fts5/test/fts5_common.tcl b/ext/fts5/test/fts5_common.tcl
index 5eba1296a..2c64b3b9a 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 c79cf7ab7..118761fab 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/ext/fts5/tool/mkfts5c.tcl b/ext/fts5/tool/mkfts5c.tcl
index f5cf5197e..535506de1 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,12 +20,11 @@ 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) {
-#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) */
}
#-------------------------------------------------------------------------
@@ -87,7 +87,9 @@ 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]} {
+ 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]
@@ -107,7 +109,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 77857f544..f6fb2eafe 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/ext/rbu/sqlite3rbu.c b/ext/rbu/sqlite3rbu.c
index d76d2f4cc..4c38e14c9 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/main.mk b/main.mk
index 401906d98..38cca8437 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
@@ -49,19 +51,21 @@ 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/session
TCCX += -I$(TOP)/ext/fts5
+THREADLIB += $(LIBS)
# Object files for the SQLite library.
#
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 \
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 \
+ 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 \
mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \
@@ -230,10 +234,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
@@ -326,7 +331,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 \
@@ -336,8 +340,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
@@ -386,7 +389,8 @@ TESTSRC2 = \
$(TOP)/ext/fts3/fts3_write.c \
$(TOP)/ext/async/sqlite3async.c \
$(TOP)/ext/session/sqlite3session.c \
- $(TOP)/ext/session/test_session.c
+ $(TOP)/ext/session/test_session.c \
+ $(FTS5_SRC)
# Header files used by all library source files.
#
@@ -458,16 +462,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.
#
@@ -477,24 +481,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 \
@@ -522,13 +525,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) <tsrc/vdbe.c >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
@@ -676,9 +680,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
@@ -727,10 +739,10 @@ 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 \
$(TOP)/ext/session/test_session.c
$(TCCX) $(TCL_FLAGS) -DTCLSH=1 $(TESTFIXTURE_FLAGS) \
- $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts5.c \
+ $(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
$(TOP)/ext/session/test_session.c \
-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
diff --git a/manifest b/manifest
index de9d87e9c..3a14d6a19 100644
--- a/manifest
+++ b/manifest
@@ -1,24 +1,24 @@
-C Merge\sthe\s3.8.12\sbeta\schanges\sfrom\strunk.
-D 2015-10-08T14:55:30.090
+C Merge\sthe\sversion\s3.9.0\schanges\sand\sthe\sincorporation\sof\sJSON1\sand\sFTS5\ninto\sthe\samalgamation\sfrom\strunk.
+D 2015-10-09T15:29:24.465
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
-F Makefile.in fdcfdc361f0a3723da9b48b967f259f7aaff3ad5
+F Makefile.in de2700ab4ca481c15970405274ccf3c872026e3c
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
-F Makefile.msc 2f913bc2229596a31ec1025ce34aef9634164a6a
+F Makefile.msc 9025b539b5dc491ea9c6c9c04109d2ff617bc990
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
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
@@ -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 4561c28dbc22bd5c678e3d5dc631cf7ee7e78efb x
+F configure.ac 1e87304e51af110950c48a1eea6ffc7a577f600e
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/lemon.html 334dbf6621b8fb8790297ec1abf3cfa4621709d1
F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
@@ -107,23 +107,23 @@ 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
+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 aa96828990274927e2b404e0b6e60f9ae1274254
+F ext/fts5/fts5_main.c 5125711e806d5d9382b4b12f71bd8a7b5e103ec6
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
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/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
@@ -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 09ce6a7997440508360f5ba1651ab7e923a8bf31
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
@@ -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
@@ -284,7 +284,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
-F main.mk f0a074da8e55de2646bc3aca50f13989d4558c1e
+F main.mk a43e99059b03953281f629ac8b27ba600cdd4429
F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea
F mkopcodeh.awk 0e7f04a8eb90f92259e47d80110e4e98d7ce337a
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
@@ -311,7 +311,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 4545c9f793f27d14a32195f6a0b121913a80f692
@@ -328,7 +328,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 34206b735954c44defba8f324b613e5d5de89ce3
+F src/main.c 3679a4f40434358fdfdfc86bf9576604b8d6fc9b
F src/malloc.c 3a37ce6979a40f499d8cea9e9ab4e8517854d35d
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c abe6ee469b6c5a35c7f22bfeb9c9bac664a1c987
@@ -364,7 +364,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 f38cfe6a0b971d50158e71880852119bdca89ce9
+F src/shell.c 993863f82d764be0c00803056e56b9b744f86f02
F src/sqlite.h.in 8f4deb5874227c7635300fb75105ff6e92131fb5
F src/sqlite3.rc 992c9f5fb8285ae285d6be28240a7e8d3a7f2bad
F src/sqlite3ext.h 64350bf36833a56ad675e27392a913f417c5c308
@@ -373,7 +373,7 @@ F src/sqliteLimit.h 216557999cb45f2e3578ed53ebefe228d779cb46
F src/status.c f266ad8a2892d659b74f0f50cb6a88b6e7c12179
F src/table.c 51b46b2a62d1b3a959633d593b89bab5e2c9155e
F src/tclsqlite.c e2344bee0d192397f555a24ef3fab26f2ed93bcc
-F src/test1.c c96508c835979bf15dc0e3146e2c7a51a2333d3c
+F src/test1.c 8fff9c5aa63d6490f516d018b70c12a9cb9a4d8a
F src/test2.c 577961fe48961b2f2e5c8b56ee50c3f459d3359d
F src/test3.c 64d2afdd68feac1bb5e2ffb8226c8c639f798622
F src/test4.c d168f83cc78d02e8d35567bb5630e40dcd85ac1e
@@ -387,7 +387,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 548c99a1a91fd89fe2c94ee08017884091e3d6f0
+F src/test_config.c 6d95fdff9fa8668db56a8b8ac78c7fa1d1ffd483
F src/test_demovfs.c 0de72c2c89551629f58486fde5734b7d90758852
F src/test_devsym.c e7498904e72ba7491d142d5c83b476c4e76993bc
F src/test_fs.c ced436e3d4b8e4681328409b8081051ce614e28f
@@ -840,8 +840,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
@@ -967,7 +967,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 67a82199e6ddee609211488bc04ed3f9ea3aa28a
F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea
F test/rollback2.test fc14cf6d1a2b250d2735ef16124b971bce152f14
@@ -1378,8 +1378,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 038ed0aee939e6207c462727088a08d0bdf49a8c
-F tool/mksqlite3h.tcl 96d92fcac21c6037d9db20c7cb2e06b534b550ac
+F tool/mksqlite3c.tcl a52d7e8c0888f9384fbfa2c6ddd5f357409758b9
+F tool/mksqlite3h.tcl 39ed050ffc5ec8951bd5118c06a132ef41b859c7
F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b
F tool/mkvsix.tcl bbe57cd9ae11c6cc70319241101ef8d2b8c3765b
F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
@@ -1411,7 +1411,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 7695890230dc1e0c6db9b7aa509db2039c7f7239 77b707b77496a08703fe9405e8e4521a4e5b419e
-R 484e6e15f7bc3708de45fd25742a1667
+P 35b1b8d4b97715030700e37b292bb4f1bb3f44d6 8a4e19888f512c3ee95aa3040924fc932fbdab1a
+R f005c1911f49ea59f115ca01df4b8659
U drh
-Z 02c522f97e4db3ce71ca22576dc5b408
+Z fe8223e98215302615def90ec799c3a5
diff --git a/manifest.uuid b/manifest.uuid
index 03f88e0e6..94a03e8a6 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-35b1b8d4b97715030700e37b292bb4f1bb3f44d6 \ No newline at end of file
+c1d96fb654b2c0f66d586aa39d80ea0468186690 \ No newline at end of file
diff --git a/src/ctime.c b/src/ctime.c
index 9503214f5..17dd710bc 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 2aca573b0..f41ea3b65 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
@@ -2893,12 +2899,18 @@ 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 ){
+ rc = sqlite3Fts5Init(db);
+ }
+#endif
+
#ifdef SQLITE_ENABLE_ICU
if( !db->mallocFailed && rc==SQLITE_OK ){
rc = sqlite3IcuInit(db);
@@ -2919,7 +2931,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/shell.c b/src/shell.c
index ca8e37186..ec76eeea9 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -4935,13 +4935,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/src/test1.c b/src/test1.c
index 1f76ea5ba..6c47754bf 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*);
@@ -6385,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*);
@@ -6393,13 +6391,9 @@ 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 },
- { "json", sqlite3_json_init },
{ "nextchar", sqlite3_nextchar_init },
{ "percentile", sqlite3_percentile_init },
{ "regexp", sqlite3_regexp_init },
@@ -6426,7 +6420,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 1335ced67..ef59467a4 100644
--- a/src/test_config.c
+++ b/src/test_config.c
@@ -173,6 +173,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 943292640..e11cdd013 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 f40580da4..a4d88dbea 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 dde3f039d..04c2419ac 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
@@ -135,6 +137,7 @@ array set ::Configs [strip_comments {
-DSQLITE_OMIT_PROGRESS_CALLBACK=1
-DSQLITE_OMIT_VIRTUALTABLE=1
-DSQLITE_TEMP_STORE=3
+ --enable-json1
}
"Device-Two" {
-DSQLITE_4_BYTE_ALIGNED_MALLOC=1
@@ -152,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
@@ -163,6 +167,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
@@ -174,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
@@ -187,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
@@ -197,6 +204,7 @@ array set ::Configs [strip_comments {
-DSQLITE_ENABLE_STAT4
-DSQLITE_ENABLE_FTS4
-DSQLITE_ENABLE_RTREE
+ --enable-json1
}
# The next group of configurations are used only by the
diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl
index f2f949e40..97b42a475 100644
--- a/tool/mksqlite3c.tcl
+++ b/tool/mksqlite3c.tcl
@@ -214,7 +214,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)]
@@ -382,6 +383,8 @@ foreach file {
sqlite3rbu.c
dbstat.c
sqlite3session.c
+ json1.c
+ fts5.c
} {
copy_file tsrc/$file
}
diff --git a/tool/mksqlite3h.tcl b/tool/mksqlite3h.tcl
index 07d3e8be3..4cf8595fa 100644
--- a/tool/mksqlite3h.tcl
+++ b/tool/mksqlite3h.tcl
@@ -72,6 +72,7 @@ set filelist [subst {
$TOP/src/sqlite.h.in
$TOP/ext/rtree/sqlite3rtree.h
$TOP/ext/session/sqlite3session.h
+ $TOP/ext/fts5/fts5.h
}]
# These are the functions that accept a variable number of arguments. They