Merge the lastest trunk code into the bedrock branch.
FossilOrigin-Name: 73e9f8d0bf78bbbaa3435330e485126bb09f008f35c1d0f366efd5e511f8f4a9
This commit is contained in:
+10
-2
@@ -590,7 +590,8 @@ TESTOPTS = --verbose=file --output=test-out.txt
|
||||
|
||||
# Extra compiler options for various shell tools
|
||||
#
|
||||
SHELL_OPT = -DSQLITE_ENABLE_FTS4
|
||||
SHELL_OPT += -DSQLITE_DQS=0
|
||||
SHELL_OPT += -DSQLITE_ENABLE_FTS4
|
||||
#SHELL_OPT += -DSQLITE_ENABLE_FTS5
|
||||
SHELL_OPT += -DSQLITE_ENABLE_RTREE
|
||||
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
@@ -623,10 +624,17 @@ FUZZCHECK_SRC += $(TOP)/test/vt02.c
|
||||
DBFUZZ_OPT =
|
||||
ST_OPT = -DSQLITE_OS_KV_OPTIONAL
|
||||
|
||||
|
||||
# In wasi-sdk builds, disable the CLI shell build in the "all" target.
|
||||
SQLITE3_SHELL_TARGET_ = sqlite3$(TEXE)
|
||||
SQLITE3_SHELL_TARGET_1 =
|
||||
SQLITE3_SHELL_TARGET = $(SQLITE3_SHELL_TARGET_@HAVE_WASI_SDK@)
|
||||
|
||||
# This is the default Makefile target. The objects listed here
|
||||
# are what get build when you type just "make" with no arguments.
|
||||
#
|
||||
all: sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
|
||||
all: sqlite3.h libsqlite3.la $(SQLITE3_SHELL_TARGET) \
|
||||
$(HAVE_TCL:1=libtclsqlite3.la)
|
||||
|
||||
Makefile: $(TOP)/Makefile.in
|
||||
./config.status
|
||||
|
||||
@@ -1658,6 +1658,7 @@ FUZZDATA = \
|
||||
# when the shell is not being dynamically linked.
|
||||
#
|
||||
!IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
|
||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_DQS=0
|
||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_FTS4=1
|
||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1
|
||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC=1
|
||||
|
||||
@@ -800,6 +800,7 @@ TEMP_STORE
|
||||
ALLOWRELEASE
|
||||
SQLITE_THREADSAFE
|
||||
BUILD_CC
|
||||
HAVE_WASI_SDK
|
||||
RELEASE
|
||||
VERSION
|
||||
program_prefix
|
||||
@@ -892,6 +893,7 @@ enable_fast_install
|
||||
with_gnu_ld
|
||||
enable_libtool_lock
|
||||
enable_largefile
|
||||
with_wasi_sdk
|
||||
enable_threadsafe
|
||||
enable_releasemode
|
||||
enable_tempstore
|
||||
@@ -1579,6 +1581,8 @@ Optional Packages:
|
||||
--with-pic try to use only PIC/non-PIC objects [default=use
|
||||
both]
|
||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||
--with-wasi-sdk=DIR directory containing the WASI SDK. Triggers
|
||||
cross-compile to WASM.
|
||||
--with-tcl=DIR directory containing tcl configuration
|
||||
(tclConfig.sh)
|
||||
--with-readline-lib specify readline library
|
||||
@@ -3938,13 +3942,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:3941: $ac_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:3945: $ac_compile\"" >&5)
|
||||
(eval "$ac_compile" 2>conftest.err)
|
||||
cat conftest.err >&5
|
||||
(eval echo "\"\$as_me:3944: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval echo "\"\$as_me:3948: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
||||
cat conftest.err >&5
|
||||
(eval echo "\"\$as_me:3947: output\"" >&5)
|
||||
(eval echo "\"\$as_me:3951: output\"" >&5)
|
||||
cat conftest.out >&5
|
||||
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
||||
lt_cv_nm_interface="MS dumpbin"
|
||||
@@ -5150,7 +5154,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 5153 "configure"' > conftest.$ac_ext
|
||||
echo '#line 5157 "configure"' > conftest.$ac_ext
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@@ -6675,11 +6679,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:6678: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:6682: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:6682: \$? = $ac_status" >&5
|
||||
echo "$as_me:6686: \$? = $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.
|
||||
@@ -7014,11 +7018,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:7017: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7021: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:7021: \$? = $ac_status" >&5
|
||||
echo "$as_me:7025: \$? = $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.
|
||||
@@ -7119,11 +7123,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:7122: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7126: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:7126: \$? = $ac_status" >&5
|
||||
echo "$as_me:7130: \$? = $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
|
||||
@@ -7174,11 +7178,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:7177: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7181: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:7181: \$? = $ac_status" >&5
|
||||
echo "$as_me:7185: \$? = $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
|
||||
@@ -9554,7 +9558,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 9557 "configure"
|
||||
#line 9561 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -9650,7 +9654,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 9653 "configure"
|
||||
#line 9657 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -10393,6 +10397,68 @@ RELEASE=`cat $srcdir/VERSION`
|
||||
$as_echo "$as_me: Release set to $RELEASE" >&6;}
|
||||
|
||||
|
||||
##########
|
||||
# Handle --with-wasi-sdk=DIR
|
||||
#
|
||||
# This must be early because it changes the toolchain.
|
||||
#
|
||||
|
||||
# Check whether --with-wasi-sdk was given.
|
||||
if test "${with_wasi_sdk+set}" = set; then :
|
||||
withval=$with_wasi_sdk; with_wasisdk=${withval}
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WASI SDK directory" >&5
|
||||
$as_echo_n "checking for WASI SDK directory... " >&6; }
|
||||
if ${ac_cv_c_wasi_sdk+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
# First check to see if --with-tcl was specified.
|
||||
if test x"${with_wasi_sdk}" != x ; then
|
||||
if ! test -d "${with_wasi_sdk}" ; then
|
||||
as_fn_error $? "${with_wasi_sdk} directory doesn't exist" "$LINENO" 5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_wasi_sdk}: using wasi-sdk clang, disabling: tcl, CLI shell, DLL" >&5
|
||||
$as_echo "${with_wasi_sdk}: using wasi-sdk clang, disabling: tcl, CLI shell, DLL" >&6; }
|
||||
use_wasi_sdk=yes
|
||||
else
|
||||
use_wasi_sdk=no
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "${use_wasi_sdk}" = "no" ; then
|
||||
HAVE_WASI_SDK=""
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
else
|
||||
HAVE_WASI_SDK=1
|
||||
# Changing --host and --target have no effect here except to possibly
|
||||
# cause confusion. autoconf has finished processing them by this
|
||||
# point.
|
||||
#
|
||||
# host_alias=wasm32-wasi
|
||||
# target=wasm32-wasi
|
||||
#
|
||||
# Merely changing CC and LD to the wasi-sdk's is enough to get
|
||||
# sqlite3.o building in WASM format.
|
||||
CC="${with_wasi_sdk}/bin/clang"
|
||||
LD="${with_wasi_sdk}/bin/wasm-ld"
|
||||
RANLIB="${with_wasi_sdk}/bin/llvm-ranlib"
|
||||
cross_compiling=yes
|
||||
enable_threadsafe=no
|
||||
use_tcl=no
|
||||
enable_tcl=no
|
||||
# libtool is apparently hard-coded to use gcc for linking DLLs, so
|
||||
# we disable the DLL build...
|
||||
enable_shared=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#########
|
||||
# Locate a compiler for the build machine. This compiler should
|
||||
# generate command-line programs that run on the build machine.
|
||||
@@ -11267,6 +11333,7 @@ fi
|
||||
|
||||
#########
|
||||
# See whether we should use the amalgamation to build
|
||||
|
||||
# Check whether --enable-amalgamation was given.
|
||||
if test "${enable_amalgamation+set}" = set; then :
|
||||
enableval=$enable_amalgamation;
|
||||
|
||||
+90
-30
@@ -70,11 +70,11 @@
|
||||
# target platform. "" for Unix and ".exe" for windows.
|
||||
#
|
||||
# This configure.in file is easy to reuse on other projects. Just
|
||||
# change the argument to AC_INIT(). And disable any features that
|
||||
# change the argument to AC_INIT. And disable any features that
|
||||
# you don't need (for example BLT) by erasing or commenting out
|
||||
# the corresponding code.
|
||||
#
|
||||
AC_INIT(sqlite, m4_esyscmd([cat VERSION | tr -d '\n']))
|
||||
AC_INIT([sqlite],[m4_esyscmd(cat VERSION | tr -d '\n')])
|
||||
|
||||
dnl Make sure the local VERSION file matches this configure script
|
||||
sqlite_version_sanity_check=`cat $srcdir/VERSION | tr -d '\n'`
|
||||
@@ -88,7 +88,7 @@ fi
|
||||
#########
|
||||
# Programs needed
|
||||
#
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT
|
||||
AC_PROG_INSTALL
|
||||
|
||||
#########
|
||||
@@ -158,6 +158,56 @@ RELEASE=`cat $srcdir/VERSION`
|
||||
AC_MSG_NOTICE(Release set to $RELEASE)
|
||||
AC_SUBST(RELEASE)
|
||||
|
||||
##########
|
||||
# Handle --with-wasi-sdk=DIR
|
||||
#
|
||||
# This must be early because it changes the toolchain.
|
||||
#
|
||||
AC_ARG_WITH(wasi-sdk,
|
||||
AS_HELP_STRING([--with-wasi-sdk=DIR],
|
||||
[directory containing the WASI SDK. Triggers cross-compile to WASM.]), with_wasisdk=${withval})
|
||||
AC_MSG_CHECKING([for WASI SDK directory])
|
||||
AC_CACHE_VAL(ac_cv_c_wasi_sdk,[
|
||||
# First check to see if --with-tcl was specified.
|
||||
if test x"${with_wasi_sdk}" != x ; then
|
||||
if ! test -d "${with_wasi_sdk}" ; then
|
||||
AC_MSG_ERROR([${with_wasi_sdk} directory doesn't exist])
|
||||
fi
|
||||
AC_MSG_RESULT([${with_wasi_sdk}: using wasi-sdk clang, disabling: tcl, CLI shell, DLL])
|
||||
use_wasi_sdk=yes
|
||||
else
|
||||
use_wasi_sdk=no
|
||||
fi
|
||||
])
|
||||
if test "${use_wasi_sdk}" = "no" ; then
|
||||
HAVE_WASI_SDK=""
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
HAVE_WASI_SDK=1
|
||||
# Changing --host and --target have no effect here except to possibly
|
||||
# cause confusion. autoconf has finished processing them by this
|
||||
# point.
|
||||
#
|
||||
# host_alias=wasm32-wasi
|
||||
# target=wasm32-wasi
|
||||
#
|
||||
# Merely changing CC and LD to the wasi-sdk's is enough to get
|
||||
# sqlite3.o building in WASM format.
|
||||
CC="${with_wasi_sdk}/bin/clang"
|
||||
LD="${with_wasi_sdk}/bin/wasm-ld"
|
||||
RANLIB="${with_wasi_sdk}/bin/llvm-ranlib"
|
||||
cross_compiling=yes
|
||||
enable_threadsafe=no
|
||||
use_tcl=no
|
||||
enable_tcl=no
|
||||
# libtool is apparently hard-coded to use gcc for linking DLLs, so
|
||||
# we disable the DLL build...
|
||||
enable_shared=no
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
AC_SUBST(HAVE_WASI_SDK)
|
||||
|
||||
|
||||
#########
|
||||
# Locate a compiler for the build machine. This compiler should
|
||||
# generate command-line programs that run on the build machine.
|
||||
@@ -179,7 +229,7 @@ AC_SUBST(BUILD_CC)
|
||||
# Do we want to support multithreaded use of sqlite
|
||||
#
|
||||
AC_ARG_ENABLE(threadsafe,
|
||||
AC_HELP_STRING([--disable-threadsafe],[Disable mutexing]))
|
||||
AS_HELP_STRING([--disable-threadsafe],[Disable mutexing]))
|
||||
AC_MSG_CHECKING([whether to support threadsafe operation])
|
||||
if test "$enable_threadsafe" = "no"; then
|
||||
SQLITE_THREADSAFE=0
|
||||
@@ -199,7 +249,7 @@ fi
|
||||
# Do we want to support release
|
||||
#
|
||||
AC_ARG_ENABLE(releasemode,
|
||||
AC_HELP_STRING([--enable-releasemode],[Support libtool link to release mode]),,enable_releasemode=no)
|
||||
AS_HELP_STRING([--enable-releasemode],[Support libtool link to release mode]),,enable_releasemode=no)
|
||||
AC_MSG_CHECKING([whether to support shared library linked as release mode or not])
|
||||
if test "$enable_releasemode" = "no"; then
|
||||
ALLOWRELEASE=""
|
||||
@@ -214,7 +264,7 @@ AC_SUBST(ALLOWRELEASE)
|
||||
# Do we want temporary databases in memory
|
||||
#
|
||||
AC_ARG_ENABLE(tempstore,
|
||||
AC_HELP_STRING([--enable-tempstore],[Use an in-ram database for temporary tables (never,no,yes,always)]),,enable_tempstore=no)
|
||||
AS_HELP_STRING([--enable-tempstore],[Use an in-ram database for temporary tables (never,no,yes,always)]),,enable_tempstore=no)
|
||||
AC_MSG_CHECKING([whether to use an in-ram database for temporary tables])
|
||||
case "$enable_tempstore" in
|
||||
never )
|
||||
@@ -254,7 +304,15 @@ else
|
||||
AC_MSG_RESULT(unknown)
|
||||
fi
|
||||
if test "$CYGWIN" != "yes"; then
|
||||
AC_CYGWIN
|
||||
m4_warn([obsolete],
|
||||
[AC_CYGWIN is obsolete: use AC_CANONICAL_HOST and check if $host_os
|
||||
matches *cygwin*])dnl
|
||||
AC_CANONICAL_HOST
|
||||
case $host_os in
|
||||
*cygwin* ) CYGWIN=yes;;
|
||||
* ) CYGWIN=no;;
|
||||
esac
|
||||
|
||||
fi
|
||||
if test "$CYGWIN" = "yes"; then
|
||||
BUILD_EXEEXT=.exe
|
||||
@@ -289,10 +347,10 @@ AC_SUBST(TARGET_EXEEXT)
|
||||
# Those macros could not be used directly since we have to make some
|
||||
# minor changes to accomodate systems that do not have TCL installed.
|
||||
#
|
||||
AC_ARG_ENABLE(tcl, AC_HELP_STRING([--disable-tcl],[do not build TCL extension]),
|
||||
AC_ARG_ENABLE(tcl, AS_HELP_STRING([--disable-tcl],[do not build TCL extension]),
|
||||
[use_tcl=$enableval],[use_tcl=yes])
|
||||
if test "${use_tcl}" = "yes" ; then
|
||||
AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl=DIR],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
|
||||
AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl=DIR],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
|
||||
AC_MSG_CHECKING([for Tcl configuration])
|
||||
AC_CACHE_VAL(ac_cv_c_tclconfig,[
|
||||
# First check to see if --with-tcl was specified.
|
||||
@@ -474,11 +532,11 @@ TARGET_READLINE_INC=""
|
||||
TARGET_HAVE_READLINE=0
|
||||
TARGET_HAVE_EDITLINE=0
|
||||
AC_ARG_ENABLE([editline],
|
||||
[AC_HELP_STRING([--enable-editline],[enable BSD editline support])],
|
||||
[AS_HELP_STRING([--enable-editline],[enable BSD editline support])],
|
||||
[with_editline=$enableval],
|
||||
[with_editline=auto])
|
||||
AC_ARG_ENABLE([readline],
|
||||
[AC_HELP_STRING([--disable-readline],[disable readline support])],
|
||||
[AS_HELP_STRING([--disable-readline],[disable readline support])],
|
||||
[with_readline=$enableval],
|
||||
[with_readline=auto])
|
||||
|
||||
@@ -494,7 +552,7 @@ if test x"$with_readline" != xno; then
|
||||
found="yes"
|
||||
|
||||
AC_ARG_WITH([readline-lib],
|
||||
[AC_HELP_STRING([--with-readline-lib],[specify readline library])],
|
||||
[AS_HELP_STRING([--with-readline-lib],[specify readline library])],
|
||||
[with_readline_lib=$withval],
|
||||
[with_readline_lib="auto"])
|
||||
if test "x$with_readline_lib" = xauto; then
|
||||
@@ -509,7 +567,7 @@ if test x"$with_readline" != xno; then
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([readline-inc],
|
||||
[AC_HELP_STRING([--with-readline-inc],[specify readline include paths])],
|
||||
[AS_HELP_STRING([--with-readline-inc],[specify readline include paths])],
|
||||
[with_readline_inc=$withval],
|
||||
[with_readline_inc="auto"])
|
||||
if test "x$with_readline_inc" = xauto; then
|
||||
@@ -554,7 +612,7 @@ AC_SEARCH_LIBS(fdatasync, [rt])
|
||||
|
||||
#########
|
||||
# check for debug enabled
|
||||
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[enable debugging & verbose explain]))
|
||||
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[enable debugging & verbose explain]))
|
||||
AC_MSG_CHECKING([build type])
|
||||
if test "${enable_debug}" = "yes" ; then
|
||||
TARGET_DEBUG="-DSQLITE_DEBUG=1 -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE -O0"
|
||||
@@ -567,7 +625,8 @@ AC_SUBST(TARGET_DEBUG)
|
||||
|
||||
#########
|
||||
# See whether we should use the amalgamation to build
|
||||
AC_ARG_ENABLE(amalgamation, AC_HELP_STRING([--disable-amalgamation],
|
||||
|
||||
AC_ARG_ENABLE(amalgamation, AS_HELP_STRING([--disable-amalgamation],
|
||||
[Disable the amalgamation and instead build all files separately]))
|
||||
if test "${enable_amalgamation}" = "no" ; then
|
||||
USE_AMALGAMATION=0
|
||||
@@ -582,7 +641,7 @@ AC_SUBST(HAVE_ZLIB)
|
||||
|
||||
#########
|
||||
# See whether we should allow loadable extensions
|
||||
AC_ARG_ENABLE(load-extension, AC_HELP_STRING([--disable-load-extension],
|
||||
AC_ARG_ENABLE(load-extension, AS_HELP_STRING([--disable-load-extension],
|
||||
[Disable loading of external extensions]),,[enable_load_extension=yes])
|
||||
if test "${enable_load_extension}" = "yes" ; then
|
||||
OPT_FEATURE_FLAGS=""
|
||||
@@ -595,7 +654,7 @@ fi
|
||||
# Do we want to support math functions
|
||||
#
|
||||
AC_ARG_ENABLE(math,
|
||||
AC_HELP_STRING([--disable-math],[Disable math functions]))
|
||||
AS_HELP_STRING([--disable-math],[Disable math functions]))
|
||||
AC_MSG_CHECKING([whether to support math functions])
|
||||
if test "$enable_math" = "no"; then
|
||||
AC_MSG_RESULT([no])
|
||||
@@ -609,7 +668,7 @@ fi
|
||||
# Do we want to support JSON functions
|
||||
#
|
||||
AC_ARG_ENABLE(json,
|
||||
AC_HELP_STRING([--disable-json],[Disable JSON functions]))
|
||||
AS_HELP_STRING([--disable-json],[Disable JSON functions]))
|
||||
AC_MSG_CHECKING([whether to support JSON functions])
|
||||
if test "$enable_json" = "no"; then
|
||||
AC_MSG_RESULT([no])
|
||||
@@ -621,14 +680,14 @@ fi
|
||||
########
|
||||
# The --enable-all argument is short-hand to enable
|
||||
# multiple extensions.
|
||||
AC_ARG_ENABLE(all, AC_HELP_STRING([--enable-all],
|
||||
AC_ARG_ENABLE(all, AS_HELP_STRING([--enable-all],
|
||||
[Enable FTS4, FTS5, Geopoly, RTree, Sessions]))
|
||||
|
||||
##########
|
||||
# Do we want to support memsys3 and/or memsys5
|
||||
#
|
||||
AC_ARG_ENABLE(memsys5,
|
||||
AC_HELP_STRING([--enable-memsys5],[Enable MEMSYS5]))
|
||||
AS_HELP_STRING([--enable-memsys5],[Enable MEMSYS5]))
|
||||
AC_MSG_CHECKING([whether to support MEMSYS5])
|
||||
if test "${enable_memsys5}" = "yes"; then
|
||||
OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_MEMSYS5"
|
||||
@@ -637,7 +696,7 @@ else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_ARG_ENABLE(memsys3,
|
||||
AC_HELP_STRING([--enable-memsys3],[Enable MEMSYS3]))
|
||||
AS_HELP_STRING([--enable-memsys3],[Enable MEMSYS3]))
|
||||
AC_MSG_CHECKING([whether to support MEMSYS3])
|
||||
if test "${enable_memsys3}" = "yes" -a "${enable_memsys5}" = "no"; then
|
||||
OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_MEMSYS3"
|
||||
@@ -648,7 +707,7 @@ fi
|
||||
|
||||
#########
|
||||
# See whether we should enable Full Text Search extensions
|
||||
AC_ARG_ENABLE(fts3, AC_HELP_STRING([--enable-fts3],
|
||||
AC_ARG_ENABLE(fts3, AS_HELP_STRING([--enable-fts3],
|
||||
[Enable the FTS3 extension]))
|
||||
AC_MSG_CHECKING([whether to support FTS3])
|
||||
if test "${enable_fts3}" = "yes" ; then
|
||||
@@ -657,7 +716,7 @@ if test "${enable_fts3}" = "yes" ; then
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_ARG_ENABLE(fts4, AC_HELP_STRING([--enable-fts4],
|
||||
AC_ARG_ENABLE(fts4, AS_HELP_STRING([--enable-fts4],
|
||||
[Enable the FTS4 extension]))
|
||||
AC_MSG_CHECKING([whether to support FTS4])
|
||||
if test "${enable_fts4}" = "yes" -o "${enable_all}" = "yes" ; then
|
||||
@@ -667,7 +726,7 @@ if test "${enable_fts4}" = "yes" -o "${enable_all}" = "yes" ; then
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_ARG_ENABLE(fts5, AC_HELP_STRING([--enable-fts5],
|
||||
AC_ARG_ENABLE(fts5, AS_HELP_STRING([--enable-fts5],
|
||||
[Enable the FTS5 extension]))
|
||||
AC_MSG_CHECKING([whether to support FTS5])
|
||||
if test "${enable_fts5}" = "yes" -o "${enable_all}" = "yes" ; then
|
||||
@@ -681,7 +740,7 @@ fi
|
||||
#########
|
||||
# See whether we should enable the LIMIT clause on UPDATE and DELETE
|
||||
# statements.
|
||||
AC_ARG_ENABLE(update-limit, AC_HELP_STRING([--enable-update-limit],
|
||||
AC_ARG_ENABLE(update-limit, AS_HELP_STRING([--enable-update-limit],
|
||||
[Enable the UPDATE/DELETE LIMIT clause]))
|
||||
AC_MSG_CHECKING([whether to support LIMIT on UPDATE and DELETE statements])
|
||||
if test "${enable_update_limit}" = "yes" ; then
|
||||
@@ -693,7 +752,7 @@ fi
|
||||
|
||||
#########
|
||||
# See whether we should enable GEOPOLY
|
||||
AC_ARG_ENABLE(geopoly, AC_HELP_STRING([--enable-geopoly],
|
||||
AC_ARG_ENABLE(geopoly, AS_HELP_STRING([--enable-geopoly],
|
||||
[Enable the GEOPOLY extension]),
|
||||
[enable_geopoly=yes],[enable_geopoly=no])
|
||||
AC_MSG_CHECKING([whether to support GEOPOLY])
|
||||
@@ -707,7 +766,7 @@ fi
|
||||
|
||||
#########
|
||||
# See whether we should enable RTREE
|
||||
AC_ARG_ENABLE(rtree, AC_HELP_STRING([--enable-rtree],
|
||||
AC_ARG_ENABLE(rtree, AS_HELP_STRING([--enable-rtree],
|
||||
[Enable the RTREE extension]))
|
||||
AC_MSG_CHECKING([whether to support RTREE])
|
||||
if test "${enable_rtree}" = "yes" ; then
|
||||
@@ -719,7 +778,7 @@ fi
|
||||
|
||||
#########
|
||||
# See whether we should enable the SESSION extension
|
||||
AC_ARG_ENABLE(session, AC_HELP_STRING([--enable-session],
|
||||
AC_ARG_ENABLE(session, AS_HELP_STRING([--enable-session],
|
||||
[Enable the SESSION extension]))
|
||||
AC_MSG_CHECKING([whether to support SESSION])
|
||||
if test "${enable_session}" = "yes" -o "${enable_all}" = "yes" ; then
|
||||
@@ -783,7 +842,7 @@ BUILD_CFLAGS=$ac_temp_BUILD_CFLAGS
|
||||
|
||||
#########
|
||||
# See whether we should use GCOV
|
||||
AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov],
|
||||
AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],
|
||||
[Enable coverage testing using gcov]))
|
||||
if test "${use_gcov}" = "yes" ; then
|
||||
USE_GCOV=1
|
||||
@@ -812,7 +871,8 @@ AC_CONFIG_HEADERS(sqlite_cfg.h)
|
||||
# Generate the output files.
|
||||
#
|
||||
AC_SUBST(BUILD_CFLAGS)
|
||||
AC_OUTPUT([
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
sqlite3.pc
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
||||
+15
-1
@@ -289,6 +289,19 @@ int sqlite3Fts5ExprNew(
|
||||
return sParse.rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** Assuming that buffer z is at least nByte bytes in size and contains a
|
||||
** valid utf-8 string, return the number of characters in the string.
|
||||
*/
|
||||
static int fts5ExprCountChar(const char *z, int nByte){
|
||||
int nRet = 0;
|
||||
int ii;
|
||||
for(ii=0; ii<nByte; ii++){
|
||||
if( (z[ii] & 0xC0)!=0x80 ) nRet++;
|
||||
}
|
||||
return nRet;
|
||||
}
|
||||
|
||||
/*
|
||||
** This function is only called when using the special 'trigram' tokenizer.
|
||||
** Argument zText contains the text of a LIKE or GLOB pattern matched
|
||||
@@ -326,7 +339,8 @@ int sqlite3Fts5ExprPattern(
|
||||
if( i==nText
|
||||
|| zText[i]==aSpec[0] || zText[i]==aSpec[1] || zText[i]==aSpec[2]
|
||||
){
|
||||
if( i-iFirst>=3 ){
|
||||
|
||||
if( fts5ExprCountChar(&zText[iFirst], i-iFirst)>=3 ){
|
||||
int jj;
|
||||
zExpr[iOut++] = '"';
|
||||
for(jj=iFirst; jj<i; jj++){
|
||||
|
||||
@@ -4770,10 +4770,10 @@ static Fts5Structure *fts5IndexOptimizeStruct(
|
||||
if( pNew ){
|
||||
Fts5StructureLevel *pLvl;
|
||||
nByte = nSeg * sizeof(Fts5StructureSegment);
|
||||
pNew->nLevel = pStruct->nLevel+1;
|
||||
pNew->nLevel = MIN(pStruct->nLevel+1, FTS5_MAX_LEVEL);
|
||||
pNew->nRef = 1;
|
||||
pNew->nWriteCounter = pStruct->nWriteCounter;
|
||||
pLvl = &pNew->aLevel[MIN(pStruct->nLevel, FTS5_MAX_LEVEL-1)];
|
||||
pLvl = &pNew->aLevel[pNew->nLevel-1];
|
||||
pLvl->aSeg = (Fts5StructureSegment*)sqlite3Fts5MallocZero(&p->rc, nByte);
|
||||
if( pLvl->aSeg ){
|
||||
int iLvl, iSeg;
|
||||
|
||||
@@ -21,13 +21,15 @@ ifcapable !fts5 {
|
||||
return
|
||||
}
|
||||
|
||||
set nLoop 2500
|
||||
|
||||
do_execsql_test 1.0 {
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(x);
|
||||
INSERT INTO t1(t1, rank) VALUES('pgsz', 32);
|
||||
}
|
||||
|
||||
do_test 1.1 {
|
||||
for {set ii 0} {$ii < 1500} {incr ii} {
|
||||
for {set ii 0} {$ii < $nLoop} {incr ii} {
|
||||
execsql {
|
||||
INSERT INTO t1 VALUES('abc def ghi');
|
||||
INSERT INTO t1 VALUES('jkl mno pqr');
|
||||
@@ -38,7 +40,7 @@ do_test 1.1 {
|
||||
|
||||
do_execsql_test 1.2 {
|
||||
SELECT count(*) FROM t1('mno')
|
||||
} {1500}
|
||||
} $nLoop
|
||||
|
||||
do_execsql_test 2.0 {
|
||||
CREATE VIRTUAL TABLE t2 USING fts5(x);
|
||||
@@ -46,7 +48,7 @@ do_execsql_test 2.0 {
|
||||
}
|
||||
|
||||
do_test 2.1 {
|
||||
for {set ii 0} {$ii < 1500} {incr ii} {
|
||||
for {set ii 0} {$ii < $nLoop} {incr ii} {
|
||||
execsql {
|
||||
INSERT INTO t2 VALUES('abc def ghi');
|
||||
INSERT INTO t2 VALUES('jkl mno pqr');
|
||||
@@ -57,6 +59,6 @@ do_test 2.1 {
|
||||
|
||||
do_execsql_test 2.2 {
|
||||
SELECT count(*) FROM t2('mno')
|
||||
} {1500}
|
||||
} $nLoop
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -55,6 +55,7 @@ foreach {tn like res} {
|
||||
6 {abc%klm} 1
|
||||
7 {ABCDEFG%} 1
|
||||
8 {%รุงเ%} 2
|
||||
9 {%งเ%} 2
|
||||
} {
|
||||
do_execsql_test 1.3.$tn {
|
||||
SELECT rowid FROM t1 WHERE y LIKE $like
|
||||
@@ -197,4 +198,21 @@ do_eqp_test 6.4 {
|
||||
SELECT * FROM ci1 WHERE x GLOB ?
|
||||
} {VIRTUAL TABLE INDEX 0:G0}
|
||||
|
||||
reset_db
|
||||
do_execsql_test 7.0 {
|
||||
CREATE VIRTUAL TABLE f USING FTS5(filename, tokenize="trigram");
|
||||
INSERT INTO f (rowid, filename) VALUES
|
||||
(10, "giraffe.png"),
|
||||
(20, "жираф.png"),
|
||||
(30, "cat.png"),
|
||||
(40, "кот.png"),
|
||||
(50, "misic-🎵-.mp3");
|
||||
}
|
||||
do_execsql_test 7.1 {
|
||||
SELECT rowid FROM f WHERE +filename GLOB '*ир*';
|
||||
} {20}
|
||||
do_execsql_test 7.2 {
|
||||
SELECT rowid FROM f WHERE filename GLOB '*ир*';
|
||||
} {20}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -20,8 +20,9 @@ proc if_no_rbu_support {tcl} {
|
||||
ifcapable !rbu { set bOk 0 }
|
||||
if {[permutation]=="journaltest"} { set bOk 0 }
|
||||
if {$bOk==0} {
|
||||
uplevel $tcl
|
||||
}
|
||||
set c [catch {uplevel 1 $tcl} r]
|
||||
return -code $c $r
|
||||
}
|
||||
}
|
||||
|
||||
proc check_prestep_state {target state} {
|
||||
|
||||
@@ -24,6 +24,7 @@ for {set tn 1} {1} {incr tn} {
|
||||
INSERT INTO t1 VALUES(1, 2, 3);
|
||||
INSERT INTO t1 VALUES(4, 5, 6);
|
||||
}
|
||||
db close
|
||||
|
||||
forcedelete test.db2
|
||||
sqlite3rbu_vacuum rbu test.db test.db2
|
||||
@@ -53,8 +54,10 @@ for {set tn 1} {1} {incr tn} {
|
||||
set trc [rbu close]
|
||||
if {$trc!="SQLITE_DONE"} { error "Got $trc instead of SQLITE_DONE!" }
|
||||
|
||||
sqlite3 db test.db
|
||||
set rc [db one {PRAGMA integrity_check}]
|
||||
if {$rc!="ok"} { error "Got $rc instead of ok!" }
|
||||
db close
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ for {set n 1} {$n < 5000} {incr n} {
|
||||
break
|
||||
}
|
||||
|
||||
foreach f {test.db test.db-oal test.db-wal test.db-shm test.db-vacuum} {
|
||||
foreach f {test.db test.db-oal test.db-wal test.db-vacuum} {
|
||||
set f2 [string map [list test.db test.db2] $f]
|
||||
if {[file exists $f]} {
|
||||
forcecopy $f $f2
|
||||
@@ -159,7 +159,7 @@ for {set n 1} {$n < 5000} {incr n} {
|
||||
break
|
||||
}
|
||||
|
||||
foreach f {test.db test.db-oal test.db-wal test.db-shm test.db-vacuum} {
|
||||
foreach f {test.db test.db-oal test.db-wal test.db-vacuum} {
|
||||
set f2 [string map [list test.db test.db2] $f]
|
||||
if {[file exists $f]} {
|
||||
forcecopy $f $f2
|
||||
@@ -226,7 +226,7 @@ for {set n 1} {$n < 5000} {incr n} {
|
||||
break
|
||||
}
|
||||
|
||||
foreach f {test.db test.db-oal test.db-wal test.db-shm test.db-vacuum} {
|
||||
foreach f {test.db test.db-oal test.db-wal test.db-vacuum} {
|
||||
set f2 [string map [list test.db test.db2] $f]
|
||||
if {[file exists $f]} {
|
||||
forcecopy $f $f2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
** LICENSE for the sqlite3 WebAssembly/JavaScript APIs.
|
||||
**
|
||||
** This bundle (typically released as sqlite3.js or sqlite3-wasmfs.js)
|
||||
** This bundle (typically released as sqlite3.js or sqlite3.mjs)
|
||||
** is an amalgamation of JavaScript source code from two projects:
|
||||
**
|
||||
** 1) https://emscripten.org: the Emscripten "glue code" is covered by
|
||||
|
||||
@@ -74,9 +74,9 @@ const installAsyncProxy = function(self){
|
||||
state.verbose = 1;
|
||||
|
||||
const loggers = {
|
||||
0:sqlite3.config.error.bind(console),
|
||||
1:sqlite3.config.warn.bind(console),
|
||||
2:sqlite3.config.log.bind(console)
|
||||
0:console.error.bind(console),
|
||||
1:console.warn.bind(console),
|
||||
2:console.log.bind(console)
|
||||
};
|
||||
const logImpl = (level,...args)=>{
|
||||
if(state.verbose>level) loggers[level]("OPFS asyncer:",...args);
|
||||
@@ -106,12 +106,12 @@ const installAsyncProxy = function(self){
|
||||
w += m.wait;
|
||||
m.avgTime = (m.count && m.time) ? (m.time / m.count) : 0;
|
||||
}
|
||||
sqlite3.config.log(self.location.href,
|
||||
console.log(self.location.href,
|
||||
"metrics for",self.location.href,":\n",
|
||||
metrics,
|
||||
"\nTotal of",n,"op(s) for",t,"ms",
|
||||
"approx",w,"ms spent waiting on OPFS APIs.");
|
||||
sqlite3.config.log("Serialization metrics:",metrics.s11n);
|
||||
console.log("Serialization metrics:",metrics.s11n);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -272,7 +272,7 @@ const installAsyncProxy = function(self){
|
||||
|| (e.cause.name==='DOMException'
|
||||
&& 0===e.cause.message.indexOf('Access Handles cannot')))
|
||||
) ? (
|
||||
/*sqlite3.config.warn("SQLITE_BUSY",e),*/
|
||||
/*console.warn("SQLITE_BUSY",e),*/
|
||||
state.sq3Codes.SQLITE_BUSY
|
||||
) : rc;
|
||||
}else{
|
||||
|
||||
@@ -36,7 +36,6 @@ fiddle.emcc-flags = \
|
||||
-sWASM_BIGINT=$(emcc.WASM_BIGINT) \
|
||||
-sEXPORT_NAME=$(sqlite3.js.init-func) \
|
||||
-Wno-limited-postlink-optimizations \
|
||||
$(sqlite3.js.flags.--post-js) \
|
||||
$(emcc.exportedRuntimeMethods) \
|
||||
-sEXPORTED_FUNCTIONS=@$(abspath $(EXPORTED_FUNCTIONS.fiddle)) \
|
||||
-sEXPORTED_RUNTIME_METHODS=FS,wasmMemory \
|
||||
@@ -59,7 +58,7 @@ fiddle.SOAP.js := $(dir.fiddle)/$(notdir $(SOAP.js))
|
||||
$(fiddle.SOAP.js): $(SOAP.js)
|
||||
cp $< $@
|
||||
|
||||
$(eval $(call call-make-pre-js,fiddle-module,vanilla))
|
||||
$(eval $(call call-make-pre-post,fiddle-module,vanilla))
|
||||
$(fiddle-module.js): $(MAKEFILE) $(MAKEFILE.fiddle) \
|
||||
$(EXPORTED_FUNCTIONS.fiddle) \
|
||||
$(fiddle.cses) $(pre-post-fiddle-module.deps.vanilla) $(fiddle.SOAP.js)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
about module loading status so that, e.g., the main thread can
|
||||
update a progress widget and DTRT when the module is finished
|
||||
loading and available for work. Status messages come in the form
|
||||
|
||||
|
||||
{type:'module', data:{
|
||||
type:'status',
|
||||
data: {text:string|null, step:1-based-integer}
|
||||
@@ -370,6 +370,9 @@
|
||||
*/
|
||||
sqlite3InitModule(fiddleModule).then((_sqlite3)=>{
|
||||
sqlite3 = _sqlite3;
|
||||
console.warn("Installing sqlite3 module globally (in Worker)",
|
||||
"for use in the dev console.");
|
||||
self.sqlite3 = sqlite3;
|
||||
const dbVfs = sqlite3.wasm.xWrap('fiddle_db_vfs', "*", ['string']);
|
||||
fiddleModule.fsUnlink = (fn)=>{
|
||||
return sqlite3.wasm.sqlite3_wasm_vfs_unlink(dbVfs(0), fn);
|
||||
|
||||
@@ -41,13 +41,25 @@
|
||||
<div>and the individual pages be started in their own tab.
|
||||
Warnings and Caveats:
|
||||
<ul class='warning'>
|
||||
<li>Some of these pages require that the web server emit the
|
||||
so-called
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy'>COOP</a>
|
||||
and
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'>COEP</a>
|
||||
headers. <a href='https://sqlite.org/althttpd'>althttpd</a> requires the
|
||||
<code>-enable-sab</code> flag for that.
|
||||
<li>All of these pages must be served via an HTTP
|
||||
server. Browsers do not support loading WASM files via
|
||||
file:// URLs.</li>
|
||||
<li>Any OPFS-related pages or tests require:
|
||||
<ul>
|
||||
<li>That the web server emit the so-called
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy'>COOP</a>
|
||||
and
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'>COEP</a>
|
||||
headers. <a href='https://sqlite.org/althttpd'>althttpd</a> requires the
|
||||
<code>-enable-sab</code> flag for that.
|
||||
</li>
|
||||
<li>A very recent version of a Chromium-based browser
|
||||
(v102 at least, possibly newer). OPFS support in the
|
||||
other major browsers is pending. Development and testing
|
||||
is currently done against a dev-channel release of
|
||||
Chrome (v111 as of 2023-02-10).
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
+19
-13
@@ -26,19 +26,25 @@
|
||||
<div>and the individual tests be started in their own tab.
|
||||
Warnings and Caveats:
|
||||
<ul class='warning'>
|
||||
<li>Some of these pages require that
|
||||
the web server emit the so-called
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy'>COOP</a>
|
||||
and
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'>COEP</a>
|
||||
headers. <a href='https://sqlite.org/althttpd'>althttpd</a> requires the
|
||||
<code>-enable-sab</code> flag for that.
|
||||
</li>
|
||||
<li>Any OPFS-related pages require very recent version of
|
||||
Chrome or Chromium (v102 at least, possibly newer). OPFS
|
||||
support in the other major browsers is pending. Development
|
||||
and testing is currently done against a dev-channel release
|
||||
of Chrome (v110 as of 2022-12-02).
|
||||
<li>All of these pages must be served via an HTTP
|
||||
server. Browsers do not support loading WASM files via
|
||||
file:// URLs.</li>
|
||||
<li>Any OPFS-related pages or tests require:
|
||||
<ul>
|
||||
<li>That the web server emit the so-called
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy'>COOP</a>
|
||||
and
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'>COEP</a>
|
||||
headers. <a href='https://sqlite.org/althttpd'>althttpd</a> requires the
|
||||
<code>-enable-sab</code> flag for that.
|
||||
</li>
|
||||
<li>A very recent version of a
|
||||
Chromium-based browser (v102 at least, possibly newer). OPFS
|
||||
support in the other major browsers is pending. Development
|
||||
and testing is currently done against a dev-channel release
|
||||
of Chrome (v111 as of 2023-02-10).
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
C Fix\san\spcache\smemory\sleak\sthat\smight\soccur\sdue\sto\sthe\smunmap()\senhancement\nof\s[754f331614f6f6e6]\sif\s"PRAGMA\sshrink_memory"\sis\sused.
|
||||
D 2023-02-07T16:23:00.173
|
||||
C Merge\sthe\slastest\strunk\scode\sinto\sthe\sbedrock\sbranch.
|
||||
D 2023-02-18T21:52:25.879
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
F Makefile.in feacf96184ea58052e204049c49a30025cc919c6ba1f3737399ebbd1e31f71a5
|
||||
F Makefile.in 25a8940b13d297de050136c8439ae5543431dbcf2ecc1ac27f4f21bde947dd29
|
||||
F Makefile.linux-gcc f609543700659711fbd230eced1f01353117621dccae7b9fb70daa64236c5241
|
||||
F Makefile.msc 423d0830030df99fbf9615b9e47ee0ac36478c4bc9440fae60e1b1a2e1ce2186
|
||||
F Makefile.msc 85b14c8ed0ec7885c3feaf68dce5cee8d916d510f8d72ae6f62ad608c909f8f2
|
||||
F README.md 8b8df9ca852aeac4864eb1e400002633ee6db84065bd01b78c33817f97d31f5e
|
||||
F VERSION 413ec94920a487ae32c9a2a8819544d690662d6f7c7ce025c0d0b8a1e74fa9db
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
@@ -33,8 +33,8 @@ F autoconf/tea/win/nmakehlp.c b01f822eabbe1ed2b64e70882d97d48402b42d2689a1ea0034
|
||||
F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
|
||||
F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6
|
||||
F config.sub c2d0260f17f3e4bc0b6808fccf1b291cb5e9126c14fc5890efc77b9fd0175559
|
||||
F configure 9cbf6a15a4b5f2b3551a466420e5f51ce04c40aaed7f90c886402bf0b66ec110 x
|
||||
F configure.ac 48dc6bfee293eef05910faf085760f2fd79b680aa47b50e8e6a22ca40bb026bb
|
||||
F configure 6ba84abf7878bb072d460766d29e492028468775d4c09464940343092eb6493c x
|
||||
F configure.ac 4654d32ac0a0d0b48f1e1e79bdc3d777b723cf2f63c33eb1d7c4ed8b435938e8
|
||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||
F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
|
||||
F doc/begin_concurrent.md 4bee2c3990d1eb800f1ce3726a911292a8e4b889300b2ffd4b08d357370db299
|
||||
@@ -92,9 +92,9 @@ F ext/fts5/fts5Int.h c0d46e399e345e35985b72a1c1af025973bfaa5b1e3563b0ce3bb0ce144
|
||||
F ext/fts5/fts5_aux.c f558e1fb9f0f86a4f7489e258c162e1f947de5ff2709087fbb465fddb7092f98
|
||||
F ext/fts5/fts5_buffer.c 3001fbabb585d6de52947b44b455235072b741038391f830d6b729225eeaf6a5
|
||||
F ext/fts5/fts5_config.c 501e7d3566bc92766b0e11c0109a7c5a6146bc41144195459af5422f6c2078aa
|
||||
F ext/fts5/fts5_expr.c 40174a64829d30cc86e8266306ad24980f6911edd5ca0b8c1ce7821ea1341b88
|
||||
F ext/fts5/fts5_expr.c 48e8e45261c6030cf5c77f606217a22722b1a4d0b34e2ba6cbfc386581627989
|
||||
F ext/fts5/fts5_hash.c d4fb70940359f2120ccd1de7ffe64cc3efe65de9e8995b822cd536ff64c96982
|
||||
F ext/fts5/fts5_index.c 8a78d6c57a1ac1b4652e88ca994ac024a8652335431e12443f241fa61c6c6049
|
||||
F ext/fts5/fts5_index.c df5b29576a409f673e54b470723d817df9d5167cff208c48ab9a3773cba6fa89
|
||||
F ext/fts5/fts5_main.c fa213e1b894441b4ee5dbcc597a17a3fab8daf34b8d1c4d9691d53281d968746
|
||||
F ext/fts5/fts5_storage.c 76c6085239eb44424004c022e9da17a5ecd5aaec859fba90ad47d3b08f4c8082
|
||||
F ext/fts5/fts5_tcl.c b1445cbe69908c411df8084a10b2485500ac70a9c747cdc8cda175a3da59d8ae
|
||||
@@ -177,7 +177,7 @@ F ext/fts5/test/fts5multiclient.test 5ff811c028d6108045ffef737f1e9f05028af2458e4
|
||||
F ext/fts5/test/fts5near.test 211477940142d733ac04fad97cb24095513ab2507073a99c2765c3ddd2ef58bd
|
||||
F ext/fts5/test/fts5onepass.test f9b7d9b2c334900c6542a869760290e2ab5382af8fbd618834bf1fcc3e7b84da
|
||||
F ext/fts5/test/fts5optimize.test 36a752d24c818792032e4ff502936fc9cc5ef938721696396fdc79214b2717f1
|
||||
F ext/fts5/test/fts5optimize2.test 8ec4fccee2b33f3a7dbd431064b2e79f11e636345e3c997683eb158d6975999c
|
||||
F ext/fts5/test/fts5optimize2.test c7c97693abe8a2cb572acfb1f252d78f03d3984094cfc5eb2285a76d8a702a92
|
||||
F ext/fts5/test/fts5phrase.test 13e5d8e9083077b3d9c74315b3c92ec723cc6eb37c8155e0bfe1bba00559f07b
|
||||
F ext/fts5/test/fts5plan.test b65cfcca9ddd6fdaa118c61e17aeec8e8433bc5b6bb307abd116514f79c49c5a
|
||||
F ext/fts5/test/fts5porter.test 8d08010c28527db66bc3feebd2b8767504aaeb9b101a986342fa7833d49d0d15
|
||||
@@ -198,7 +198,7 @@ F ext/fts5/test/fts5synonym2.test b54cce5c34ec08ed616f646635538ae82e34a0e28f947e
|
||||
F ext/fts5/test/fts5tok1.test 1f7817499f5971450d8c4a652114b3d833393c8134e32422d0af27884ffe9cef
|
||||
F ext/fts5/test/fts5tok2.test dcacb32d4a2a3f0dd3215d4a3987f78ae4be21a2
|
||||
F ext/fts5/test/fts5tokenizer.test ac3c9112b263a639fb0508ae73a3ee886bf4866d2153771a8e8a20c721305a43
|
||||
F ext/fts5/test/fts5trigram.test 5b4feb53a4d5aca70c841f6919c8719b5a9c805474727dda99285fccdd2e9cce
|
||||
F ext/fts5/test/fts5trigram.test c76acc1913a06182e791a0dfdae285b9cdd67327a1a35b34cabf0a6aa09cf05e
|
||||
F ext/fts5/test/fts5ubsan.test 783d5a8d13ebfa169e634940228db54540780e3ba7a87ad1e4510e61440bf64b
|
||||
F ext/fts5/test/fts5umlaut.test a42fe2fe6387c40c49ab27ccbd070e1ae38e07f38d05926482cc0bccac9ad602
|
||||
F ext/fts5/test/fts5unicode.test 17056f4efe6b0a5d4f41fdf7a7dc9af2873004562eaa899d40633b93dc95f5a9
|
||||
@@ -338,7 +338,7 @@ F ext/rbu/rbu9.test 4b66f0705442711a44b54ef2cc3c59952f1ea15f12e34442681bdb1a6eb3
|
||||
F ext/rbu/rbuA.test 3f8fdd4ae7b9a0571af7361cd88359254f63e445ac4acfe395173e31d7e3fc31
|
||||
F ext/rbu/rbuB.test c639803bbc1dc9358afe6abe046dc4d3e9965238b75239b04e3a8e33e3e90f85
|
||||
F ext/rbu/rbuC.test 5326ea3954754c68fd518beb70d3e6b6690af53e1a5fa102d650e4110b26b4c5
|
||||
F ext/rbu/rbu_common.tcl 815cc97be0e67e96f3ccaff74d951eef89cefc34cec7d93d64f01d9402121545
|
||||
F ext/rbu/rbu_common.tcl 15d063397a89aeaf26b4cbdf6f29911b4154a902ba61a40c4f180ab452454a63
|
||||
F ext/rbu/rbubusy.test 88298187ad35aac9084436d85ca66b3722f96eaa704a09cfe5f931d452ab7237
|
||||
F ext/rbu/rbucollate.test 9852ec5e5ba7f3b04ce849a24ef7298e03ae0f16e58e6031d0f845234559feec
|
||||
F ext/rbu/rbucrash.test d2b5d619d9281c89cad74401b73b46172daa89906940b1d739c813ddc0cd2cf5
|
||||
@@ -350,7 +350,7 @@ F ext/rbu/rbuexpr.test 2c91617509c88b6e9030f7bf6ff720df26032fcd801adc25533feae72
|
||||
F ext/rbu/rbufault.test c51de14067cfe867849530d3d1718ffeb28522f28d52937f95dd7bc2116eb42e
|
||||
F ext/rbu/rbufault2.test 8cc8f6298d2d7d20080b2c77e65b607af8b89839f9d87c0972b27e6442edc258
|
||||
F ext/rbu/rbufault3.test d14ff46e050816ce43c4ed320a0927712636ac11bf48bfc5f74601f183af5445
|
||||
F ext/rbu/rbufault4.test fa2f9d10b213eaa3cfbf0711ba9255761febe372c9546fa22ef4006f53ed8acc
|
||||
F ext/rbu/rbufault4.test 39fbf093b7e16aae85dc309262ec570d217a1578538c1c74dd621e5451c083d6
|
||||
F ext/rbu/rbufts.test df754d2f96c22d1da8b5d685b4a4a49863971920856d17620cef724e3a9b6edd
|
||||
F ext/rbu/rbumisc.test 6641749e42c83062824c86b3d03a47f8ec35760f341bc023f53e612655b0a8af
|
||||
F ext/rbu/rbumulti.test 6f6cdd9b3775108aada5216762cbbd7b5d5caa7cb620b3e6e1b8ace81286a2e0
|
||||
@@ -358,7 +358,7 @@ F ext/rbu/rbupartial.test 4ed7789f47128c8aa7ff58445face8a070cef852993afe03c86391
|
||||
F ext/rbu/rbupass.test 2ee86581a441f3b4b449b99a2dc203d5d6a08750dd2ee9ab6a02743e238d3c8a
|
||||
F ext/rbu/rbuprogress.test db8bb26a8123d35f52acfc3984b56caa31c8fcd1fa3589991b9c8e8a68e64b59
|
||||
F ext/rbu/rburename.test 8d8a6a6ba896338d0610658e1f60e8055a181d5913e1e21c41b866a8f15bb7cd
|
||||
F ext/rbu/rburesume.test ed122426a0411fb16efca49f19a5f2ba18956a765d5d9031b9d01931cbe7f282
|
||||
F ext/rbu/rburesume.test 1403752d152b55efb7fc25749c0fccc790061371ec9ffe428cc04f8a69bb834c
|
||||
F ext/rbu/rbusave.test 588b618dad9d65c4b13d03a79931de82213503fedc26bdf5789c996ecf427fba
|
||||
F ext/rbu/rbusplit.test a6dedd23cf37bcf2e8646d9d7139846e96d60d92f9bc6d6ba6ca8c24c0bd1f72
|
||||
F ext/rbu/rbutemplimit.test 4980df2d4b74f4dd982add8f78809106154ef5a3c4bdce747422ab0b0481e029
|
||||
@@ -491,8 +491,8 @@ F ext/wasm/api/sqlite3-api-glue.js 0a93e58aabf52b32ddccbb107a1fd4552f2505e103ab6
|
||||
F ext/wasm/api/sqlite3-api-oo1.js 9b50c188513c70438a497914089cfeac79b6ac2d73501775538f9e467325ea15
|
||||
F ext/wasm/api/sqlite3-api-prologue.js 5cc817b67a774bfa3c47d4c2fa484b10b24b5529a66094b35546f3ebba1ef646
|
||||
F ext/wasm/api/sqlite3-api-worker1.js 9551f04cdfcde354e5a6ccb48951e007d618abb4e95758297b7fd44ccffdf89f
|
||||
F ext/wasm/api/sqlite3-license-version-header.js a661182fc93fc2cf212dfd0b987f8e138a3ac98f850b1112e29b5fbdaecc87c3
|
||||
F ext/wasm/api/sqlite3-opfs-async-proxy.js 2bc6b2b68198467ff467cea9657df7a9b06dcd50adb78efc8c7d893394eb3010
|
||||
F ext/wasm/api/sqlite3-license-version-header.js 0c807a421f0187e778dc1078f10d2994b915123c1223fe752b60afdcd1263f89
|
||||
F ext/wasm/api/sqlite3-opfs-async-proxy.js 7795b84b66a7a8dedc791340709b310bb497c3c72a80bef364fa2a58e2ddae3f
|
||||
F ext/wasm/api/sqlite3-v-helper.js 6f6c3e390a72e08b0a5b16a0d567d7af3c04d172831853a29d72a6f1dd40ff24
|
||||
F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js ca291837840b3eae3a60810721a7970c98f7c7cd3ee1c879acb7e91f1e3fe65a
|
||||
F ext/wasm/api/sqlite3-wasi.h 25356084cfe0d40458a902afb465df8c21fc4152c1d0a59b563a3fba59a068f9
|
||||
@@ -516,13 +516,13 @@ F ext/wasm/demo-worker1-promiser.js b99c550763fa792c204e9a7cceadd976004036d9fc3e
|
||||
F ext/wasm/demo-worker1.html 2c178c1890a2beb5a5fecb1453e796d067a4b8d3d2a04d65ca2eb1ab2c68ef5d
|
||||
F ext/wasm/demo-worker1.js a619adffc98b75b66c633b00f747b856449a134a9a0357909287d80a182d70fa
|
||||
F ext/wasm/dist.make f55f9c9e1980ea11a59964e59535c66175a17f004d1c2e274522c3366b3a084a
|
||||
F ext/wasm/fiddle.make d5308b5c35f691758ef20badd25f91f3780b20415760daf0d98afbe4f24921b9
|
||||
F ext/wasm/fiddle.make 396a0d6e2b3aa63ad448ea71d91676cb9cbbba8f5e6529cf1248d17f29142f47
|
||||
F ext/wasm/fiddle/emscripten.css 3d253a6fdb8983a2ac983855bfbdd4b6fa1ff267c28d69513dd6ef1f289ada3f
|
||||
F ext/wasm/fiddle/fiddle-worker.js b4a0c8ab6c0983218543ca771c45f6075449f63a1dcf290ae5a681b2cba8800d
|
||||
F ext/wasm/fiddle/fiddle-worker.js 163d6139a93fab4bcb72064923df050d4e7c0ff0d8aa061ce8776a6e75da8a10
|
||||
F ext/wasm/fiddle/fiddle.html 550c5aafce40bd218de9bf26192749f69f9b10bc379423ecd2e162bcef885c08
|
||||
F ext/wasm/fiddle/fiddle.js 974b995119ac443685d7d94d3b3c58c6a36540e9eb3fed7069d5653284071715
|
||||
F ext/wasm/index-dist.html c806b6005145b71d64240606e9c6e0bf56878ee8829c66fe7486cebf34b0e6b1
|
||||
F ext/wasm/index.html 6b7139e64eef500aee9315deac5e4ac84ef31453aaf053b794bb0505859dcde5
|
||||
F ext/wasm/index-dist.html 22379774f0ad4edcaaa8cf9c674c82e794cc557719a8addabed74eb8069d412e
|
||||
F ext/wasm/index.html dd900891844caebd9cadbddd704f66bd841d7c12fd69ce5af490e2c10fb49f45
|
||||
F ext/wasm/jaccwabyt/jaccwabyt.js 06f2ef1ad640c26c593def3d960336e9bb789819b920516480895c38ed5f58fa
|
||||
F ext/wasm/jaccwabyt/jaccwabyt.md 37911f00db12cbcca73aa1ed72594430365f30aafae2fa9c886961de74e5e0eb
|
||||
F ext/wasm/module-symbols.html 841de62fc198988b8330e238c260e70ec93028b096e1a1234db31b187a899d10
|
||||
@@ -575,14 +575,14 @@ F src/build.c a5641434e3ae4050da833f1df9ab2b1475866112df16568e0ad196c8b6e25f7d
|
||||
F src/callback.c 4cd7225b26a97f7de5fee5ae10464bed5a78f2adefe19534cc2095b3a8ca484a
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c f439c21d439aaf4706950a2597474f1a796b557a0750666308202c0f601ef0fd
|
||||
F src/date.c 94ce83b4cd848a387680a5f920c9018c16655db778c4d36525af0a0f34679ac5
|
||||
F src/date.c f21815ca7172ce073db3163ac54c8d9f2841077165c1a6123b4d1c376a0c7ec7
|
||||
F src/dbpage.c d47549716549311f79dc39fe5c8fb19390a6eb2c960f8e37c89a9c4de0c1052e
|
||||
F src/dbstat.c ec92074baa61d883de58c945162d9e666c13cd7cf3a23bc38b4d1c4d0b2c2bef
|
||||
F src/delete.c 86573edae75e3d3e9a8b590d87db8e47222103029df4f3e11fa56044459b514e
|
||||
F src/expr.c 204af6a83c191f5ac19ec4af6ecc546f188cc2dd1c76fc5280982f710ec4b9c4
|
||||
F src/expr.c 2e5e67e800c9416996df52409746a2f3c7dadf5d38b5a367ce379b239e3f40c8
|
||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||
F src/fkey.c 722f20779f5342a787922deded3628d8c74b5249cab04098cf17ee2f2aaff002
|
||||
F src/func.c 6d8dc5786e035c52c939201afc8e998b7a447eeb427720258c20620e9b89ed2e
|
||||
F src/func.c 9274f1c5c664b35108dfdaaee1444488573317e1ba58f14a4c12638677b1119a
|
||||
F src/global.c e06ff8e0acd85aec13563c9ecb44fbbf38232ccf73594998fd880b92d619594b
|
||||
F src/hash.c c6af5f96a7a76d000f07c5402c48c318c2566beecdee9e78b9d9f60ce7119565
|
||||
F src/hash.h 3340ab6e1d13e725571d7cee6d3e3135f0779a7d8e76a9ce0a85971fa3953c51
|
||||
@@ -613,12 +613,12 @@ F src/os.h 1ff5ae51d339d0e30d8a9d814f4b8f8e448169304d83a7ed9db66a65732f3e63
|
||||
F src/os_common.h 6c0eb8dd40ef3e12fe585a13e709710267a258e2c8dd1c40b1948a1d14582e06
|
||||
F src/os_kv.c 4d39e1f1c180b11162c6dc4aa8ad34053873a639bac6baae23272fc03349986a
|
||||
F src/os_setup.h 6011ad7af5db4e05155f385eb3a9b4470688de6f65d6166b8956e58a3d872107
|
||||
F src/os_unix.c 5c00a6d1243afeb045d8c366f7245c0b274140c7a3c48b39510746ac907cbadd
|
||||
F src/os_unix.c d861b444c69a9889a8a7c039c0d99f65344f71e458ae4a3ea659169f4f7bbb46
|
||||
F src/os_win.c 295fe45f18bd86f2477f4cd79f3377c6f883ceb941b1f46808665c73747f2345
|
||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||
F src/pager.c 5a8e1b8dc19156a0263e12324ca6560a272415740e9b9e515bf6fd24f141a0fe
|
||||
F src/pager.c e5b7c68297f0192f5e3262604c79544284969d6267c305a66708cddadd620be8
|
||||
F src/pager.h 3ddab454e313da7c93f92fea35c842ad17ae9f4e96254871ddb0171b2bfb859a
|
||||
F src/parse.y 17c50d262d92083badeb60b3ebe4725e19c76548f90aea898ab07d4f2940a7d8
|
||||
F src/parse.y 9006b990da7f22268bb7825603a2d4c32140e13ce15771f4cf35dbb114216c31
|
||||
F src/pcache.c f4268f7f73c6a3db12ce22fd25bc68dc42315d19599414ab1207d7cf32f79197
|
||||
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
|
||||
F src/pcache1.c f3d06b0c1bd400cf657095757d427b149f6c1788e9447b2ce019988a5344ede8
|
||||
@@ -629,12 +629,12 @@ F src/printf.c ff4b05e38bf928ff1b80d3dda4f977b10fe39ecbfe69c018224c7e5594fb2455
|
||||
F src/random.c 9bd018738ec450bf35d28050b4b33fa9a6eebf3aaefb1a1cff42dc14a7725673
|
||||
F src/resolve.c d62c5665279cc7485f9d45b5e20911cc7b19c203f268321a90d05d74f4725750
|
||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||
F src/select.c 394c577f0634fadbeb1101d74906b21667095da6f80d6693c3ccec5a659d4da9
|
||||
F src/shell.c.in 250817509dbf12e258e334fdcd87901e35a6b63dc285885fec5f577ebb67b498
|
||||
F src/sqlite.h.in d9571e2c9ba0d4d46ce09598a95d57a0b90c49a3e00ed63ffe8f1b702fc3edf7
|
||||
F src/select.c f2be1c513413f4b78e2276ed1cfb492470d48c9f46e87a4f562e973aae349ae4
|
||||
F src/shell.c.in 5cb750dc00bb8b20b020031fd1bb0cb8759a6e567c27aee6b0af31d187984985
|
||||
F src/sqlite.h.in ea91228dc95d01c0547543aaa4cc24056826540522e813f49cea6be38d93b962
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h da473ce2b3d0ae407a6300c4a164589b9a6bfdbec9462688a8593ff16f3bb6e4
|
||||
F src/sqliteInt.h 179393f8271208944603fc1ca321bd1d1fcf786557626afbc31f7ce9a61a6ebb
|
||||
F src/sqliteInt.h dba61730ba58f7686f5746d676fff240d54aaf259c56212b6e65a97fb3900a67
|
||||
F src/sqliteLimit.h d7323ffea5208c6af2734574bae933ca8ed2ab728083caa117c9738581a31657
|
||||
F src/status.c 160c445d7d28c984a0eae38c144f6419311ed3eace59b44ac6dafc20db4af749
|
||||
F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
|
||||
@@ -705,7 +705,7 @@ F src/vdbeInt.h a4147a4ddf613cb1bcb555ace9e9e74a9c099d65facd88155f191b1fb4d74cfb
|
||||
F src/vdbeapi.c 40c47b1528d308a322203de21d2e0d711753257ed9771771b6129214b1d65932
|
||||
F src/vdbeaux.c 9aa60599fb2a94a7f3603f14c184576963bf29556d42fd6299669047a87ec616
|
||||
F src/vdbeblob.c 5e61ce31aca17db8fb60395407457a8c1c7fb471dde405e0cd675974611dcfcd
|
||||
F src/vdbemem.c 87d3811aabb68eb9210c14c9a8b5e8ec3acb7ba787beb80a4323af54fb6013f7
|
||||
F src/vdbemem.c 0388576b7cf0be13ce14b9e3b8aa90b8a1b923b60321d0242131ae0b5732b43b
|
||||
F src/vdbesort.c 43756031ca7430f7aec3ef904824a7883c4ede783e51f280d99b9b65c0796e35
|
||||
F src/vdbetrace.c fe0bc29ebd4e02c8bc5c1945f1d2e6be5927ec12c06d89b03ef2a4def34bf823
|
||||
F src/vdbevtab.c aae4bd769410eb7e1d02c42613eec961d514459b1c3c1c63cfc84e92a137daac
|
||||
@@ -714,10 +714,10 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c b3378fe90ee98d63dc2f054423b552be61ec5d73c19e4438b6bb62d4724256d4
|
||||
F src/wal.h 7a733af13b966ecb81872ce397e862116b3575ea53245b90b139a2873ee87825
|
||||
F src/walker.c f890a3298418d7cba3b69b8803594fdc484ea241206a8dfa99db6dd36f8cbb3b
|
||||
F src/where.c 3bbca705410258969d6d2e0c54b468de9674445d41b67714bb4fc3f1edef41d2
|
||||
F src/where.c 5b20d08699c9a55c0556661ff6f937dd1c8e27567b7553e48d477d3fad22ec4c
|
||||
F src/whereInt.h e25203e5bfee149f5f1225ae0166cfb4f1e65490c998a024249e98bb0647377c
|
||||
F src/wherecode.c 76bca3379219880d2527493b71a3be49e696f75396d3481e4de5d4ceec7886b2
|
||||
F src/whereexpr.c 7c5671a04b00c876bec5e99fd4e6f688065feb4773160fbf76fd7900d2901777
|
||||
F src/wherecode.c b82d0d33315e1526904b95155e55e61149c4462147668e1cc4567c812735eff1
|
||||
F src/whereexpr.c a60a1f88650c561eded95c5affbe846cda71fac35033e1280f28e47934df33c8
|
||||
F src/window.c 76a27cff9ea2ded0c2c3527187029259440fabcc4cc4c07b11d942c78494a614
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
F test/affinity2.test ce1aafc86e110685b324e9a763eab4f2a73f737842ec3b687bd965867de90627
|
||||
@@ -961,11 +961,11 @@ F test/e_blobclose.test 692fc02a058476c2222a63d97e3f3b2b809c1842e5525ded7f854d54
|
||||
F test/e_blobopen.test 29f6055ee453b8e679fe9570c4d3acfedbef821622c5dad16875148c5952ef50
|
||||
F test/e_blobwrite.test 3075ff539827576d9a34cbb5a2ac75eb65fb49cd5aadc27686b0719fbf99c156
|
||||
F test/e_changes.test 0f8c3e6aab7335cb772d5a3ea34ca4c82f98d0eb896e2eb3add971c16984b405
|
||||
F test/e_createtable.test e3b9782e80c0cf2898ac0eb1d9cd058412955ff53a8e47307a60c8289d62ff9c
|
||||
F test/e_createtable.test 31b9bcb6ac8876bc7ec342d86d9c231a84c62b442093a6651dfd0fa93650eea3
|
||||
F test/e_delete.test ab39084f26ae1f033c940b70ebdbbd523dc4962e
|
||||
F test/e_droptrigger.test 235c610f8bf8ec44513e222b9085c7e49fad65ad0c1975ac2577109dd06fd8fa
|
||||
F test/e_dropview.test 74e405df7fa0f762e0c9445b166fe03955856532e2bb234c372f7c51228d75e7
|
||||
F test/e_expr.test bc6aa5906ba967587525bc746ea403011557cf6d8e4fc9efb1fab5dae7fb4fd6
|
||||
F test/e_expr.test 27e905ed17266c745bffe65f56b809c13ae6e225e56aeda1aaec926b32439286
|
||||
F test/e_fkey.test feeba6238aeff9d809fb6236b351da8df4ae9bda89e088e54526b31a0cbfeec5
|
||||
F test/e_fts3.test 17ba7c373aba4d4f5696ba147ee23fd1a1ef70782af050e03e262ca187c5ee07
|
||||
F test/e_insert.test f02f7f17852b2163732c6611d193f84fc67bc641fb4882c77a464076e5eba80e
|
||||
@@ -1002,7 +1002,7 @@ F test/extraquick.test cb254400bd42bfb777ff675356aabf3287978f79
|
||||
F test/fallocate.test 37a62e396a68eeede8f8d2ecf23573a80faceb630788d314d0a073d862616717
|
||||
F test/filectrl.test 6e871c2d35dead1d9a88e176e8d2ca094fec6bb3
|
||||
F test/filefmt.test f393e80c4b8d493b7a7f8f3809a8425bbf4292af1f5140f01cb1427798a2bbd4
|
||||
F test/filter1.test 6c483ecf7886c8843a8612c021aa23f33c581f584151f251842b3a3592c95ac8
|
||||
F test/filter1.test 590f8ba9a0cd0823b80d89ac75c5ce72276189cef9225d2436adaf1ee87f3727
|
||||
F test/filter2.tcl 44e525497ce07382915f01bd29ffd0fa49dab3adb87253b5e5103ba8f93393e8
|
||||
F test/filter2.test 485cf95d1f6d6ceee5632201ca52a71868599836f430cdee42e5f7f14666e30a
|
||||
F test/filterfault.test c08fb491d698e8df6c122c98f7db1c65ffcfcad2c1ab0e07fa8a5be1b34eaa8b
|
||||
@@ -1166,7 +1166,7 @@ F test/fuzzdata4.db b502c7d5498261715812dd8b3c2005bad08b3a26e6489414bd13926cd3e4
|
||||
F test/fuzzdata5.db e35f64af17ec48926481cfaf3b3855e436bd40d1cfe2d59a9474cb4b748a52a5
|
||||
F test/fuzzdata6.db 92a80e4afc172c24f662a10a612d188fb272de4a9bd19e017927c95f737de6d7
|
||||
F test/fuzzdata7.db 0166b56fd7a6b9636a1d60ef0a060f86ddaecf99400a666bb6e5bbd7199ad1f2
|
||||
F test/fuzzdata8.db d07d68dcebbc4d537eb9fe066ed858239f901f48032c8e627b52e0f39058ac7a
|
||||
F test/fuzzdata8.db f6c2f2af4deaaae0ddb3310d509c2659990794aa653dc501b80a0534c3493f80
|
||||
F test/fuzzer1.test 3d4c4b7e547aba5e5511a2991e3e3d07166cfbb8
|
||||
F test/fuzzer2.test a85ef814ce071293bce1ad8dffa217cbbaad4c14
|
||||
F test/fuzzerfault.test f64c4aef4c9e9edf1d6dc0d3f1e65dcc81e67c996403c88d14f09b74807a42bc
|
||||
@@ -1182,7 +1182,7 @@ F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
|
||||
F test/icu.test 716a6b89fbabe5cc63e0cd4c260befb08fd7b9d761f04d43669233292f0753b1
|
||||
F test/ieee754.test b0945d12be7d255f3dfa18e2511b17ca37e0edd2b803231c52d05b86c04ab26e
|
||||
F test/imposter1.test c3f1db2d3db2c24611a6596a3fc0ffc14f1466c8
|
||||
F test/in.test 55503d3633c434120d8b2d5966a34f0d9a55393a589050b1366afe4b188093c7
|
||||
F test/in.test 7399a6562fb09de7f786901f0b24b7bbe7c0b541f29ead9eb13f091edea37da4
|
||||
F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
|
||||
F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
|
||||
F test/in4.test fdd1d8134da8376985c2edba6035a2de1f6c731524d2ffa651419e8fe2cd1c5a
|
||||
@@ -1209,7 +1209,7 @@ F test/index7.test b238344318e0b4e42126717f6554f0e7dfd0b39cecad4b736039b43e1e3b6
|
||||
F test/index8.test caa097735c91dbc23d8a402f5e63a2a03c83840ba3928733ed7f9a03f8a912a3
|
||||
F test/index9.test 2ac891806a4136ef3e91280477e23114e67575207dc331e6797fa0ed9379f997
|
||||
F test/indexedby.test f21eca4f7a6ffe14c8500a7ad6cd53166666c99e5ccd311842a28bc94a195fe0
|
||||
F test/indexexpr1.test 1cd460113e3999a1477754fd0e3ac0d7bcbbbc742b427b418945f28af708c695
|
||||
F test/indexexpr1.test b2a15637dcbae7fd8d7e2fc51f74ac4feaf5510130ee2089a5ec5bd1ef7270e1
|
||||
F test/indexexpr2.test 2c7abe3c48f8aaa5a448615ab4d13df3662185d28419c00999670834a3f0b484
|
||||
F test/indexfault.test 98d78a8ff1f5335628b62f886a1cb7c7dac1ef6d48fa39c51ec871c87dce9811
|
||||
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
|
||||
@@ -1440,7 +1440,7 @@ F test/rowvalue5.test 00740304ea6a53a8704640c7405690f0045d5d2a6b4b04dde7bccc14c3
|
||||
F test/rowvalue6.test d19b54feb604d5601f8614b15e214e0774c01087
|
||||
F test/rowvalue7.test c1cbdbf407029db01f87764097c6ac02a1c5a37efd2776eff32a9cdfdf6f2dba
|
||||
F test/rowvalue8.test 5900eddad9e2c3c2e26f1a95f74aafc1232ee5e0
|
||||
F test/rowvalue9.test cb5380df82dca9db463081e26952c1e097b34fc2c2ac87453970c048d97df687
|
||||
F test/rowvalue9.test 138252b53b835208a5712e01595403a0ae32b4bc58284d9fe6bea10e58203fe4
|
||||
F test/rowvalueA.test 51f79b6098c193f838168752c9640f4eae6c63346bf64b5bed4f4e22fe2c71d0
|
||||
F test/rowvaluefault.test 963ae9cdaed30a85a29668dd514e639f3556cae903ee9f172ea972d511c54fff
|
||||
F test/rowvaluevtab.test cd9747bb3f308086944c07968f547ad6b05022e698d80b9ffbdfe09ce0b8da6f
|
||||
@@ -1582,7 +1582,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163
|
||||
F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637
|
||||
F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc
|
||||
F test/tester.tcl 81c85e60fe81a570e96936c59a317547896107ae2c429d84e64fe3faf16704b5
|
||||
F test/testrunner.tcl cd6fbd8c0fdb61b3b3cdd732c2d4fa9065b1b976815145b8cfdcb7ddad2a0bef
|
||||
F test/testrunner.tcl e0b36a732956c69ce19370611b8dc69b44e627d5ea8ec2a5455ca3e8a170ddaa
|
||||
F test/testrunner_data.tcl 8169c68654ac8906833b8a6aadca973358a441ebf88270dd05c153e5f96f76b8
|
||||
F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899
|
||||
F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502
|
||||
@@ -1918,7 +1918,7 @@ F test/whereH.test e4b07f7a3c2f5d31195cd33710054c78667573b2
|
||||
F test/whereI.test c4bb7e2ca56d49bd8ab5c7bd085b8b83e353922b46904d68aefb3c7468643581
|
||||
F test/whereJ.test fc05e374cc9f2dc204148d6c06822c380ad388895fe97a6d335b94a26a08aecf
|
||||
F test/whereK.test 0270ab7f04ba5436fb9156d31d642a1c82727f4c4bfe5ba90d435c78cf44684a
|
||||
F test/whereL.test 50171e3ec00b4c8ad5ec773119a35d9e9642cec45154b44c366d628326479f4d
|
||||
F test/whereL.test 9d7c8a9f4e5e82d6859e61cf8758c3856c7e0a7fd8be11c92cac8c3ec39228fd
|
||||
F test/whereM.test 0dbc9998783458ddcf3cc078ca7c2951d8b2677d472ecf0028f449ed327c0250
|
||||
F test/wherefault.test 6cf2a9c5712952d463d3f45ebee7f6caf400984df51a195d884cfb7eb0e837a7
|
||||
F test/wherelfault.test 9012e4ef5259058b771606616bd007af5d154e64cc25fa9fd4170f6411db44e3
|
||||
@@ -2004,7 +2004,7 @@ F tool/max-limits.c cbb635fbb37ae4d05f240bfb5b5270bb63c54439
|
||||
F tool/merge-test.tcl de76b62f2de2a92d4c1ca4f976bce0aea6899e0229e250479b229b2a1914b176
|
||||
F tool/mkautoconfamal.sh f62353eb6c06ab264da027fd4507d09914433dbdcab9cb011cdc18016f1ab3b8
|
||||
F tool/mkccode.tcl 86463e68ce9c15d3041610fedd285ce32a5cf7a58fc88b3202b8b76837650dbe x
|
||||
F tool/mkctimec.tcl 82e75faafe0625a9fedd3817a22bd9ac337b5ab8ba5486a9a113afce4ed1f67b x
|
||||
F tool/mkctimec.tcl 64c69c774528f23d623b3b295f4714b49d2b9b44ec0f282b617a3816f1b94bf6 x
|
||||
F tool/mkkeywordhash.c 35bfc41adacc4aa6ef6fca7fd0c63e0ec0534b78daf4d0cfdebe398216bbffc3
|
||||
F tool/mkmsvcmin.tcl 6ecab9fe22c2c8de4d82d4c46797bda3d2deac8e763885f5a38d0c44a895ab33
|
||||
F tool/mkopcodec.tcl 33d20791e191df43209b77d37f0ff0904620b28465cca6990cf8d60da61a07ef
|
||||
@@ -2081,8 +2081,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P b7d9f14d78a52f87fcc7bc1d3e9f00d6ce1d648b1b244bc3989d7308f52063a0
|
||||
R 01c5f59ba9109ba76cbb949c3f19564e
|
||||
P f8c1f9c44bb3da7856690ac04c1de1fb8b7e3ccc32141bf414cd85bd90644a30 a36de0c803ee170b34105fadfc1f9790cda68a921fd5034790397f9853798f43
|
||||
R ec427ff51e19c580acdf818f05b83e20
|
||||
U drh
|
||||
Z 323ecce8708401861de806d60c76fa96
|
||||
Z 741ad6649934b1ef9e64a3be4ae8286e
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
f8c1f9c44bb3da7856690ac04c1de1fb8b7e3ccc32141bf414cd85bd90644a30
|
||||
73e9f8d0bf78bbbaa3435330e485126bb09f008f35c1d0f366efd5e511f8f4a9
|
||||
+1
-1
@@ -749,7 +749,7 @@ static int parseModifier(
|
||||
i64 iOrigJD; /* Original localtime */
|
||||
i64 iGuess; /* Guess at the corresponding utc time */
|
||||
int cnt = 0; /* Safety to prevent infinite loop */
|
||||
int iErr; /* Guess is off by this much */
|
||||
i64 iErr; /* Guess is off by this much */
|
||||
|
||||
computeJD(p);
|
||||
iGuess = iOrigJD = p->iJD;
|
||||
|
||||
+5
-2
@@ -4103,11 +4103,14 @@ static int exprCodeInlineFunction(
|
||||
** the type affinity of the argument. This is used for testing of
|
||||
** the SQLite type logic.
|
||||
*/
|
||||
const char *azAff[] = { "blob", "text", "numeric", "integer", "real" };
|
||||
const char *azAff[] = { "blob", "text", "numeric", "integer",
|
||||
"real", "flexnum" };
|
||||
char aff;
|
||||
assert( nFarg==1 );
|
||||
aff = sqlite3ExprAffinity(pFarg->a[0].pExpr);
|
||||
sqlite3VdbeLoadString(v, target,
|
||||
assert( aff<=SQLITE_AFF_NONE
|
||||
|| (aff>=SQLITE_AFF_BLOB && aff<=SQLITE_AFF_FLEXNUM) );
|
||||
sqlite3VdbeLoadString(v, target,
|
||||
(aff<=SQLITE_AFF_NONE) ? "none" : azAff[aff-SQLITE_AFF_BLOB]);
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1271,7 +1271,7 @@ static void unhexFunc(
|
||||
const u8 *zHex = sqlite3_value_text(argv[0]);
|
||||
int nHex = sqlite3_value_bytes(argv[0]);
|
||||
#ifdef SQLITE_DEBUG
|
||||
const u8 *zEnd = &zHex[nHex];
|
||||
const u8 *zEnd = zHex ? &zHex[nHex] : 0;
|
||||
#endif
|
||||
u8 *pBlob = 0;
|
||||
u8 *p = 0;
|
||||
|
||||
+48
-4
@@ -105,7 +105,8 @@
|
||||
#include <time.h>
|
||||
#include <sys/time.h> /* amalgamator: keep */
|
||||
#include <errno.h>
|
||||
#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
|
||||
#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \
|
||||
&& !defined(SQLITE_WASI)
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
@@ -193,9 +194,46 @@
|
||||
*/
|
||||
#define SQLITE_MAX_SYMLINKS 100
|
||||
|
||||
/*
|
||||
** Remove and stub certain info for WASI (WebAssembly System
|
||||
** Interface) builds.
|
||||
*/
|
||||
#ifdef SQLITE_WASI
|
||||
# undef HAVE_FCHMOD
|
||||
# undef HAVE_FCHOWN
|
||||
# undef HAVE_MREMAP
|
||||
# define HAVE_MREMAP 0
|
||||
# ifndef SQLITE_DEFAULT_UNIX_VFS
|
||||
# define SQLITE_DEFAULT_UNIX_VFS "unix-dotfile"
|
||||
/* ^^^ should SQLITE_DEFAULT_UNIX_VFS be "unix-none"? */
|
||||
# endif
|
||||
# ifndef F_RDLCK
|
||||
# define F_RDLCK 0
|
||||
# define F_WRLCK 1
|
||||
# define F_UNLCK 2
|
||||
# if __LONG_MAX == 0x7fffffffL
|
||||
# define F_GETLK 12
|
||||
# define F_SETLK 13
|
||||
# define F_SETLKW 14
|
||||
# else
|
||||
# define F_GETLK 5
|
||||
# define F_SETLK 6
|
||||
# define F_SETLKW 7
|
||||
# endif
|
||||
# endif
|
||||
#else /* !SQLITE_WASI */
|
||||
# ifndef HAVE_FCHMOD
|
||||
# define HAVE_FCHMOD
|
||||
# endif
|
||||
#endif /* SQLITE_WASI */
|
||||
|
||||
#ifdef SQLITE_WASI
|
||||
# define osGetpid(X) (pid_t)1
|
||||
#else
|
||||
/* Always cast the getpid() return type for compatibility with
|
||||
** kernel modules in VxWorks. */
|
||||
#define osGetpid(X) (pid_t)getpid()
|
||||
# define osGetpid(X) (pid_t)getpid()
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Only set the lastErrno if the error code is a real error and not
|
||||
@@ -467,7 +505,11 @@ static struct unix_syscall {
|
||||
#define osPwrite64 ((ssize_t(*)(int,const void*,size_t,off64_t))\
|
||||
aSyscall[13].pCurrent)
|
||||
|
||||
#if defined(HAVE_FCHMOD)
|
||||
{ "fchmod", (sqlite3_syscall_ptr)fchmod, 0 },
|
||||
#else
|
||||
{ "fchmod", (sqlite3_syscall_ptr)0, 0 },
|
||||
#endif
|
||||
#define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent)
|
||||
|
||||
#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
|
||||
@@ -503,14 +545,16 @@ static struct unix_syscall {
|
||||
#endif
|
||||
#define osGeteuid ((uid_t(*)(void))aSyscall[21].pCurrent)
|
||||
|
||||
#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
|
||||
#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \
|
||||
&& !defined(SQLITE_WASI)
|
||||
{ "mmap", (sqlite3_syscall_ptr)mmap, 0 },
|
||||
#else
|
||||
{ "mmap", (sqlite3_syscall_ptr)0, 0 },
|
||||
#endif
|
||||
#define osMmap ((void*(*)(void*,size_t,int,int,int,off_t))aSyscall[22].pCurrent)
|
||||
|
||||
#if !defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0
|
||||
#if (!defined(SQLITE_OMIT_WAL) || SQLITE_MAX_MMAP_SIZE>0) \
|
||||
&& !defined(SQLITE_WASI)
|
||||
{ "munmap", (sqlite3_syscall_ptr)munmap, 0 },
|
||||
#else
|
||||
{ "munmap", (sqlite3_syscall_ptr)0, 0 },
|
||||
|
||||
+1
-14
@@ -3618,7 +3618,6 @@ void sqlite3PagerShrink(Pager *pPager){
|
||||
** Numeric values associated with these states are OFF==1, NORMAL=2,
|
||||
** and FULL=3.
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_PAGER_PRAGMAS
|
||||
void sqlite3PagerSetFlags(
|
||||
Pager *pPager, /* The pager to set safety level for */
|
||||
unsigned pgFlags /* Various flags */
|
||||
@@ -3653,7 +3652,6 @@ void sqlite3PagerSetFlags(
|
||||
pPager->doNotSpill |= SPILLFLAG_OFF;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
** The following global variable is incremented whenever the library
|
||||
@@ -5066,18 +5064,7 @@ act_like_temp_file:
|
||||
pPager->memDb = (u8)memDb;
|
||||
pPager->readOnly = (u8)readOnly;
|
||||
assert( useJournal || pPager->tempFile );
|
||||
pPager->noSync = pPager->tempFile;
|
||||
if( pPager->noSync ){
|
||||
assert( pPager->fullSync==0 );
|
||||
assert( pPager->extraSync==0 );
|
||||
assert( pPager->syncFlags==0 );
|
||||
assert( pPager->walSyncFlags==0 );
|
||||
}else{
|
||||
pPager->fullSync = 1;
|
||||
pPager->extraSync = 0;
|
||||
pPager->syncFlags = SQLITE_SYNC_NORMAL;
|
||||
pPager->walSyncFlags = SQLITE_SYNC_NORMAL | (SQLITE_SYNC_NORMAL<<2);
|
||||
}
|
||||
sqlite3PagerSetFlags(pPager, (SQLITE_DEFAULT_SYNCHRONOUS+1)|PAGER_CACHESPILL);
|
||||
/* pPager->pFirst = 0; */
|
||||
/* pPager->pFirstSynced = 0; */
|
||||
/* pPager->pLast = 0; */
|
||||
|
||||
@@ -1317,6 +1317,11 @@ expr(A) ::= expr(A) between_op(N) expr(X) AND expr(Y). [BETWEEN] {
|
||||
sqlite3ExprListDelete(pParse->db, Y);
|
||||
pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0);
|
||||
A = sqlite3PExpr(pParse, TK_EQ, A, pRHS);
|
||||
}else if( Y->nExpr==1 && pRHS->op==TK_SELECT ){
|
||||
A = sqlite3PExpr(pParse, TK_IN, A, 0);
|
||||
sqlite3PExprAddSelect(pParse, A, pRHS->x.pSelect);
|
||||
pRHS->x.pSelect = 0;
|
||||
sqlite3ExprListDelete(pParse->db, Y);
|
||||
}else{
|
||||
A = sqlite3PExpr(pParse, TK_IN, A, 0);
|
||||
if( A==0 ){
|
||||
|
||||
@@ -6812,6 +6812,7 @@ static int countOfViewOptimization(Parse *pParse, Select *p){
|
||||
assert( ExprUseXList(pExpr) );
|
||||
if( pExpr->x.pList!=0 ) return 0; /* Must be count(*) */
|
||||
if( p->pSrc->nSrc!=1 ) return 0; /* One table in FROM */
|
||||
if( ExprHasProperty(pExpr, EP_WinFunc) ) return 0;/* Not a window function */
|
||||
pSub = p->pSrc->a[0].pSelect;
|
||||
if( pSub==0 ) return 0; /* The FROM is a subquery */
|
||||
if( pSub->pPrior==0 ) return 0; /* Must be a compound ry */
|
||||
|
||||
+6
-6
@@ -111,7 +111,7 @@ typedef unsigned char u8;
|
||||
|
||||
#if !defined(_WIN32) && !defined(WIN32)
|
||||
# include <signal.h>
|
||||
# if !defined(__RTP__) && !defined(_WRS_KERNEL)
|
||||
# if !defined(__RTP__) && !defined(_WRS_KERNEL) && !defined(SQLITE_WASI)
|
||||
# include <pwd.h>
|
||||
# endif
|
||||
#endif
|
||||
@@ -168,7 +168,7 @@ typedef unsigned char u8;
|
||||
|
||||
#ifndef deliberate_fall_through
|
||||
/* Quiet some compilers about some of our intentional code. */
|
||||
# if GCC_VERSION>=7000000
|
||||
# if defined(GCC_VERSION) && GCC_VERSION>=7000000
|
||||
# define deliberate_fall_through __attribute__((fallthrough));
|
||||
# else
|
||||
# define deliberate_fall_through
|
||||
@@ -200,7 +200,7 @@ typedef unsigned char u8;
|
||||
/* Make sure isatty() has a prototype. */
|
||||
extern int isatty(int);
|
||||
|
||||
# if !defined(__RTP__) && !defined(_WRS_KERNEL)
|
||||
# if !defined(__RTP__) && !defined(_WRS_KERNEL) && !defined(SQLITE_WASI)
|
||||
/* popen and pclose are not C89 functions and so are
|
||||
** sometimes omitted from the <stdio.h> header */
|
||||
extern FILE *popen(const char*,const char*);
|
||||
@@ -5474,7 +5474,7 @@ static void linenoise_completion(const char *zLine, linenoiseCompletions *lc){
|
||||
char *zSql;
|
||||
char zBuf[1000];
|
||||
|
||||
if( nLine>sizeof(zBuf)-30 ) return;
|
||||
if( nLine>(i64)sizeof(zBuf)-30 ) return;
|
||||
if( zLine[0]=='.' || zLine[0]=='#') return;
|
||||
for(i=nLine-1; i>=0 && (isalnum(zLine[i]) || zLine[i]=='_'); i--){}
|
||||
if( i==nLine-1 ) return;
|
||||
@@ -5490,7 +5490,7 @@ static void linenoise_completion(const char *zLine, linenoiseCompletions *lc){
|
||||
while( sqlite3_step(pStmt)==SQLITE_ROW ){
|
||||
const char *zCompletion = (const char*)sqlite3_column_text(pStmt, 0);
|
||||
int nCompletion = sqlite3_column_bytes(pStmt, 0);
|
||||
if( iStart+nCompletion < sizeof(zBuf)-1 && zCompletion ){
|
||||
if( iStart+nCompletion < (i64)sizeof(zBuf)-1 && zCompletion ){
|
||||
memcpy(zBuf+iStart, zCompletion, nCompletion+1);
|
||||
linenoiseAddCompletion(lc, zBuf);
|
||||
}
|
||||
@@ -11502,7 +11502,7 @@ static char *find_home_dir(int clearFlag){
|
||||
if( home_dir ) return home_dir;
|
||||
|
||||
#if !defined(_WIN32) && !defined(WIN32) && !defined(_WIN32_WCE) \
|
||||
&& !defined(__RTP__) && !defined(_WRS_KERNEL)
|
||||
&& !defined(__RTP__) && !defined(_WRS_KERNEL) && !defined(SQLITE_WASI)
|
||||
{
|
||||
struct passwd *pwent;
|
||||
uid_t uid = getuid();
|
||||
|
||||
+15
-2
@@ -9819,7 +9819,7 @@ int sqlite3_vtab_in(sqlite3_index_info*, int iCons, int bHandle);
|
||||
**
|
||||
** <blockquote><pre>
|
||||
** for(rc=sqlite3_vtab_in_first(pList, &pVal);
|
||||
** rc==SQLITE_OK && pVal
|
||||
** rc==SQLITE_OK && pVal;
|
||||
** rc=sqlite3_vtab_in_next(pList, &pVal)
|
||||
** ){
|
||||
** // do something with pVal
|
||||
@@ -10123,7 +10123,7 @@ int sqlite3_db_cacheflush(sqlite3*);
|
||||
** function is not defined for operations on WITHOUT ROWID tables, or for
|
||||
** DELETE operations on rowid tables.
|
||||
**
|
||||
** ^The sqlite3_update_hook(D,C,P) function returns the P argument from
|
||||
** ^The sqlite3_preupdate_hook(D,C,P) function returns the P argument from
|
||||
** the previous call on the same [database connection] D, or NULL for
|
||||
** the first call on D.
|
||||
**
|
||||
@@ -10557,6 +10557,19 @@ int sqlite3_deserialize(
|
||||
# undef double
|
||||
#endif
|
||||
|
||||
#if defined(__wasi__)
|
||||
# undef SQLITE_WASI
|
||||
# define SQLITE_WASI 1
|
||||
# undef SQLITE_OMIT_WAL
|
||||
# define SQLITE_OMIT_WAL 1/* because it requires shared memory APIs */
|
||||
# ifndef SQLITE_OMIT_LOAD_EXTENSION
|
||||
# define SQLITE_OMIT_LOAD_EXTENSION
|
||||
# endif
|
||||
# ifndef SQLITE_THREADSAFE
|
||||
# define SQLITE_THREADSAFE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* End of the 'extern "C"' block */
|
||||
#endif
|
||||
|
||||
+2
-8
@@ -819,15 +819,9 @@ typedef INT8_TYPE i8; /* 1-byte signed integer */
|
||||
|
||||
/*
|
||||
** The datatype used to store estimates of the number of rows in a
|
||||
** table or index. This is an unsigned integer type. For 99.9% of
|
||||
** the world, a 32-bit integer is sufficient. But a 64-bit integer
|
||||
** can be used at compile-time if desired.
|
||||
** table or index.
|
||||
*/
|
||||
#ifdef SQLITE_64BIT_STATS
|
||||
typedef u64 tRowcnt; /* 64-bit only if requested at compile-time */
|
||||
#else
|
||||
typedef u32 tRowcnt; /* 32-bit is the default */
|
||||
#endif
|
||||
typedef u64 tRowcnt;
|
||||
|
||||
/*
|
||||
** Estimated quantities used for query planning are stored as 16-bit
|
||||
|
||||
+4
-2
@@ -1519,7 +1519,9 @@ static int valueFromFunction(
|
||||
}else{
|
||||
sqlite3ValueApplyAffinity(pVal, aff, SQLITE_UTF8);
|
||||
assert( rc==SQLITE_OK );
|
||||
assert( enc==pVal->enc || db->mallocFailed );
|
||||
assert( enc==pVal->enc
|
||||
|| (pVal->flags & MEM_Str)==0
|
||||
|| db->mallocFailed );
|
||||
#if 0 /* Not reachable except after a prior failure */
|
||||
rc = sqlite3VdbeChangeEncoding(pVal, enc);
|
||||
if( rc==SQLITE_OK && sqlite3VdbeMemTooBig(pVal) ){
|
||||
@@ -1528,11 +1530,11 @@ static int valueFromFunction(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
pCtx->pParse->rc = rc;
|
||||
|
||||
value_from_function_out:
|
||||
if( rc!=SQLITE_OK ){
|
||||
pVal = 0;
|
||||
pCtx->pParse->rc = rc;
|
||||
}
|
||||
if( apVal ){
|
||||
for(i=0; i<nVal; i++){
|
||||
|
||||
+2
-2
@@ -1621,12 +1621,12 @@ static int whereKeyStats(
|
||||
if( iCol>0 ){
|
||||
pRec->nField = iCol;
|
||||
assert( sqlite3VdbeRecordCompare(aSample[i].n, aSample[i].p, pRec)<=0
|
||||
|| pParse->db->mallocFailed );
|
||||
|| pParse->db->mallocFailed || CORRUPT_DB );
|
||||
}
|
||||
if( i>0 ){
|
||||
pRec->nField = nField;
|
||||
assert( sqlite3VdbeRecordCompare(aSample[i-1].n, aSample[i-1].p, pRec)<0
|
||||
|| pParse->db->mallocFailed );
|
||||
|| pParse->db->mallocFailed || CORRUPT_DB );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+60
-53
@@ -489,68 +489,75 @@ static Expr *removeUnindexableInClauseTerms(
|
||||
Expr *pX /* The IN expression to be reduced */
|
||||
){
|
||||
sqlite3 *db = pParse->db;
|
||||
Select *pSelect; /* Pointer to the SELECT on the RHS */
|
||||
Expr *pNew;
|
||||
pNew = sqlite3ExprDup(db, pX, 0);
|
||||
if( db->mallocFailed==0 ){
|
||||
ExprList *pOrigRhs; /* Original unmodified RHS */
|
||||
ExprList *pOrigLhs; /* Original unmodified LHS */
|
||||
ExprList *pRhs = 0; /* New RHS after modifications */
|
||||
ExprList *pLhs = 0; /* New LHS after mods */
|
||||
int i; /* Loop counter */
|
||||
Select *pSelect; /* Pointer to the SELECT on the RHS */
|
||||
for(pSelect=pNew->x.pSelect; pSelect; pSelect=pSelect->pPrior){
|
||||
ExprList *pOrigRhs; /* Original unmodified RHS */
|
||||
ExprList *pOrigLhs = 0; /* Original unmodified LHS */
|
||||
ExprList *pRhs = 0; /* New RHS after modifications */
|
||||
ExprList *pLhs = 0; /* New LHS after mods */
|
||||
int i; /* Loop counter */
|
||||
|
||||
assert( ExprUseXSelect(pNew) );
|
||||
pOrigRhs = pNew->x.pSelect->pEList;
|
||||
assert( pNew->pLeft!=0 );
|
||||
assert( ExprUseXList(pNew->pLeft) );
|
||||
pOrigLhs = pNew->pLeft->x.pList;
|
||||
for(i=iEq; i<pLoop->nLTerm; i++){
|
||||
if( pLoop->aLTerm[i]->pExpr==pX ){
|
||||
int iField;
|
||||
assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 );
|
||||
iField = pLoop->aLTerm[i]->u.x.iField - 1;
|
||||
if( pOrigRhs->a[iField].pExpr==0 ) continue; /* Duplicate PK column */
|
||||
pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr);
|
||||
pOrigRhs->a[iField].pExpr = 0;
|
||||
assert( pOrigLhs->a[iField].pExpr!=0 );
|
||||
pLhs = sqlite3ExprListAppend(pParse, pLhs, pOrigLhs->a[iField].pExpr);
|
||||
pOrigLhs->a[iField].pExpr = 0;
|
||||
assert( ExprUseXSelect(pNew) );
|
||||
pOrigRhs = pSelect->pEList;
|
||||
assert( pNew->pLeft!=0 );
|
||||
assert( ExprUseXList(pNew->pLeft) );
|
||||
if( pSelect==pNew->x.pSelect ){
|
||||
pOrigLhs = pNew->pLeft->x.pList;
|
||||
}
|
||||
}
|
||||
sqlite3ExprListDelete(db, pOrigRhs);
|
||||
sqlite3ExprListDelete(db, pOrigLhs);
|
||||
pNew->pLeft->x.pList = pLhs;
|
||||
pNew->x.pSelect->pEList = pRhs;
|
||||
if( pLhs && pLhs->nExpr==1 ){
|
||||
/* Take care here not to generate a TK_VECTOR containing only a
|
||||
** single value. Since the parser never creates such a vector, some
|
||||
** of the subroutines do not handle this case. */
|
||||
Expr *p = pLhs->a[0].pExpr;
|
||||
pLhs->a[0].pExpr = 0;
|
||||
sqlite3ExprDelete(db, pNew->pLeft);
|
||||
pNew->pLeft = p;
|
||||
}
|
||||
pSelect = pNew->x.pSelect;
|
||||
if( pSelect->pOrderBy ){
|
||||
/* If the SELECT statement has an ORDER BY clause, zero the
|
||||
** iOrderByCol variables. These are set to non-zero when an
|
||||
** ORDER BY term exactly matches one of the terms of the
|
||||
** result-set. Since the result-set of the SELECT statement may
|
||||
** have been modified or reordered, these variables are no longer
|
||||
** set correctly. Since setting them is just an optimization,
|
||||
** it's easiest just to zero them here. */
|
||||
ExprList *pOrderBy = pSelect->pOrderBy;
|
||||
for(i=0; i<pOrderBy->nExpr; i++){
|
||||
pOrderBy->a[i].u.x.iOrderByCol = 0;
|
||||
for(i=iEq; i<pLoop->nLTerm; i++){
|
||||
if( pLoop->aLTerm[i]->pExpr==pX ){
|
||||
int iField;
|
||||
assert( (pLoop->aLTerm[i]->eOperator & (WO_OR|WO_AND))==0 );
|
||||
iField = pLoop->aLTerm[i]->u.x.iField - 1;
|
||||
if( pOrigRhs->a[iField].pExpr==0 ) continue; /* Duplicate PK column */
|
||||
pRhs = sqlite3ExprListAppend(pParse, pRhs, pOrigRhs->a[iField].pExpr);
|
||||
pOrigRhs->a[iField].pExpr = 0;
|
||||
if( pOrigLhs ){
|
||||
assert( pOrigLhs->a[iField].pExpr!=0 );
|
||||
pLhs = sqlite3ExprListAppend(pParse,pLhs,pOrigLhs->a[iField].pExpr);
|
||||
pOrigLhs->a[iField].pExpr = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
sqlite3ExprListDelete(db, pOrigRhs);
|
||||
if( pOrigLhs ){
|
||||
sqlite3ExprListDelete(db, pOrigLhs);
|
||||
pNew->pLeft->x.pList = pLhs;
|
||||
}
|
||||
pSelect->pEList = pRhs;
|
||||
if( pLhs && pLhs->nExpr==1 ){
|
||||
/* Take care here not to generate a TK_VECTOR containing only a
|
||||
** single value. Since the parser never creates such a vector, some
|
||||
** of the subroutines do not handle this case. */
|
||||
Expr *p = pLhs->a[0].pExpr;
|
||||
pLhs->a[0].pExpr = 0;
|
||||
sqlite3ExprDelete(db, pNew->pLeft);
|
||||
pNew->pLeft = p;
|
||||
}
|
||||
if( pSelect->pOrderBy ){
|
||||
/* If the SELECT statement has an ORDER BY clause, zero the
|
||||
** iOrderByCol variables. These are set to non-zero when an
|
||||
** ORDER BY term exactly matches one of the terms of the
|
||||
** result-set. Since the result-set of the SELECT statement may
|
||||
** have been modified or reordered, these variables are no longer
|
||||
** set correctly. Since setting them is just an optimization,
|
||||
** it's easiest just to zero them here. */
|
||||
ExprList *pOrderBy = pSelect->pOrderBy;
|
||||
for(i=0; i<pOrderBy->nExpr; i++){
|
||||
pOrderBy->a[i].u.x.iOrderByCol = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
printf("For indexing, change the IN expr:\n");
|
||||
sqlite3TreeViewExpr(0, pX, 0);
|
||||
printf("Into:\n");
|
||||
sqlite3TreeViewExpr(0, pNew, 0);
|
||||
printf("For indexing, change the IN expr:\n");
|
||||
sqlite3TreeViewExpr(0, pX, 0);
|
||||
printf("Into:\n");
|
||||
sqlite3TreeViewExpr(0, pNew, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return pNew;
|
||||
}
|
||||
|
||||
+33
-23
@@ -974,36 +974,40 @@ static Bitmask exprSelectUsage(WhereMaskSet *pMaskSet, Select *pS){
|
||||
*/
|
||||
static SQLITE_NOINLINE int exprMightBeIndexed2(
|
||||
SrcList *pFrom, /* The FROM clause */
|
||||
Bitmask mPrereq, /* Bitmask of FROM clause terms referenced by pExpr */
|
||||
int *aiCurCol, /* Write the referenced table cursor and column here */
|
||||
Expr *pExpr /* An operand of a comparison operator */
|
||||
Expr *pExpr, /* An operand of a comparison operator */
|
||||
int j /* Start looking with the j-th pFrom entry */
|
||||
){
|
||||
Index *pIdx;
|
||||
int i;
|
||||
int iCur;
|
||||
for(i=0; mPrereq>1; i++, mPrereq>>=1){}
|
||||
iCur = pFrom->a[i].iCursor;
|
||||
for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
|
||||
if( pIdx->aColExpr==0 ) continue;
|
||||
for(i=0; i<pIdx->nKeyCol; i++){
|
||||
if( pIdx->aiColumn[i]!=XN_EXPR ) continue;
|
||||
assert( pIdx->bHasExpr );
|
||||
if( sqlite3ExprCompareSkip(pExpr, pIdx->aColExpr->a[i].pExpr, iCur)==0 ){
|
||||
aiCurCol[0] = iCur;
|
||||
aiCurCol[1] = XN_EXPR;
|
||||
return 1;
|
||||
do{
|
||||
iCur = pFrom->a[j].iCursor;
|
||||
for(pIdx=pFrom->a[j].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
|
||||
if( pIdx->aColExpr==0 ) continue;
|
||||
for(i=0; i<pIdx->nKeyCol; i++){
|
||||
if( pIdx->aiColumn[i]!=XN_EXPR ) continue;
|
||||
assert( pIdx->bHasExpr );
|
||||
if( sqlite3ExprCompareSkip(pExpr,pIdx->aColExpr->a[i].pExpr,iCur)==0
|
||||
&& pExpr->op!=TK_STRING
|
||||
){
|
||||
aiCurCol[0] = iCur;
|
||||
aiCurCol[1] = XN_EXPR;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}while( ++j < pFrom->nSrc );
|
||||
return 0;
|
||||
}
|
||||
static int exprMightBeIndexed(
|
||||
SrcList *pFrom, /* The FROM clause */
|
||||
Bitmask mPrereq, /* Bitmask of FROM clause terms referenced by pExpr */
|
||||
int *aiCurCol, /* Write the referenced table cursor & column here */
|
||||
Expr *pExpr, /* An operand of a comparison operator */
|
||||
int op /* The specific comparison operator */
|
||||
){
|
||||
int i;
|
||||
|
||||
/* If this expression is a vector to the left or right of a
|
||||
** inequality constraint (>, <, >= or <=), perform the processing
|
||||
** on the first element of the vector. */
|
||||
@@ -1013,7 +1017,6 @@ static int exprMightBeIndexed(
|
||||
if( pExpr->op==TK_VECTOR && (op>=TK_GT && ALWAYS(op<=TK_GE)) ){
|
||||
assert( ExprUseXList(pExpr) );
|
||||
pExpr = pExpr->x.pList->a[0].pExpr;
|
||||
|
||||
}
|
||||
|
||||
if( pExpr->op==TK_COLUMN ){
|
||||
@@ -1021,9 +1024,16 @@ static int exprMightBeIndexed(
|
||||
aiCurCol[1] = pExpr->iColumn;
|
||||
return 1;
|
||||
}
|
||||
if( mPrereq==0 ) return 0; /* No table references */
|
||||
if( (mPrereq&(mPrereq-1))!=0 ) return 0; /* Refs more than one table */
|
||||
return exprMightBeIndexed2(pFrom,mPrereq,aiCurCol,pExpr);
|
||||
|
||||
for(i=0; i<pFrom->nSrc; i++){
|
||||
Index *pIdx;
|
||||
for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
|
||||
if( pIdx->aColExpr ){
|
||||
return exprMightBeIndexed2(pFrom,aiCurCol,pExpr,i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1149,7 +1159,7 @@ static void exprAnalyze(
|
||||
pLeft = pLeft->x.pList->a[pTerm->u.x.iField-1].pExpr;
|
||||
}
|
||||
|
||||
if( exprMightBeIndexed(pSrc, prereqLeft, aiCurCol, pLeft, op) ){
|
||||
if( exprMightBeIndexed(pSrc, aiCurCol, pLeft, op) ){
|
||||
pTerm->leftCursor = aiCurCol[0];
|
||||
assert( (pTerm->eOperator & (WO_OR|WO_AND))==0 );
|
||||
pTerm->u.x.leftColumn = aiCurCol[1];
|
||||
@@ -1157,7 +1167,7 @@ static void exprAnalyze(
|
||||
}
|
||||
if( op==TK_IS ) pTerm->wtFlags |= TERM_IS;
|
||||
if( pRight
|
||||
&& exprMightBeIndexed(pSrc, pTerm->prereqRight, aiCurCol, pRight, op)
|
||||
&& exprMightBeIndexed(pSrc, aiCurCol, pRight, op)
|
||||
&& !ExprHasProperty(pRight, EP_FixedCol)
|
||||
){
|
||||
WhereTerm *pNew;
|
||||
@@ -1368,7 +1378,6 @@ static void exprAnalyze(
|
||||
transferJoinMarkings(pNewExpr1, pExpr);
|
||||
idxNew1 = whereClauseInsert(pWC, pNewExpr1, wtFlags);
|
||||
testcase( idxNew1==0 );
|
||||
exprAnalyze(pSrc, pWC, idxNew1);
|
||||
pNewExpr2 = sqlite3ExprDup(db, pLeft, 0);
|
||||
pNewExpr2 = sqlite3PExpr(pParse, TK_LT,
|
||||
sqlite3ExprAddCollateString(pParse,pNewExpr2,zCollSeqName),
|
||||
@@ -1376,6 +1385,7 @@ static void exprAnalyze(
|
||||
transferJoinMarkings(pNewExpr2, pExpr);
|
||||
idxNew2 = whereClauseInsert(pWC, pNewExpr2, wtFlags);
|
||||
testcase( idxNew2==0 );
|
||||
exprAnalyze(pSrc, pWC, idxNew1);
|
||||
exprAnalyze(pSrc, pWC, idxNew2);
|
||||
pTerm = &pWC->a[idxTerm];
|
||||
if( isComplete ){
|
||||
@@ -1432,7 +1442,7 @@ static void exprAnalyze(
|
||||
&& pTerm->u.x.iField==0
|
||||
&& pExpr->pLeft->op==TK_VECTOR
|
||||
&& ALWAYS( ExprUseXSelect(pExpr) )
|
||||
&& pExpr->x.pSelect->pPrior==0
|
||||
&& (pExpr->x.pSelect->pPrior==0 || (pExpr->x.pSelect->selFlags & SF_Values))
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
&& pExpr->x.pSelect->pWin==0
|
||||
#endif
|
||||
|
||||
@@ -1514,9 +1514,10 @@ do_createtable_tests 4.14 -error {NOT NULL constraint failed: %s} {
|
||||
5 "INSERT INTO t3 VALUES(NULL, 'g', 'h')" {t3.a}
|
||||
}
|
||||
|
||||
# EVIDENCE-OF: R-42511-39459 PRIMARY KEY, UNIQUE and NOT NULL
|
||||
# constraints may be explicitly assigned a default conflict resolution
|
||||
# algorithm by including a conflict-clause in their definitions.
|
||||
# EVIDENCE-OF: R-34093-09213 PRIMARY KEY, UNIQUE and NOT NULL
|
||||
# constraints may be explicitly assigned another default conflict
|
||||
# resolution algorithm by including a conflict-clause in their
|
||||
# definitions.
|
||||
#
|
||||
# Conflict clauses: ABORT, ROLLBACK, IGNORE, FAIL, REPLACE
|
||||
#
|
||||
@@ -1631,9 +1632,9 @@ foreach {tn tbl res ac data} {
|
||||
}
|
||||
catchsql COMMIT
|
||||
|
||||
# EVIDENCE-OF: R-12645-39772 Or, if a constraint definition does not
|
||||
# include a conflict-clause or it is a CHECK constraint, the default
|
||||
# conflict resolution algorithm is ABORT.
|
||||
# EVIDENCE-OF: R-17539-59899 Or, if a constraint definition does not
|
||||
# include a conflict-clause, the default conflict resolution algorithm
|
||||
# is ABORT.
|
||||
#
|
||||
# The first half of the above is tested along with explicit ON
|
||||
# CONFLICT clauses above (specifically, the tests involving t1_xx, t2_xx
|
||||
|
||||
+5
-4
@@ -215,7 +215,7 @@ foreach {tn literal type} {
|
||||
#
|
||||
# EVIDENCE-OF: R-03679-60639 Equals can be either = or ==.
|
||||
#
|
||||
# EVIDENCE-OF: R-30082-38996 The non-equals operator can be either != or
|
||||
# EVIDENCE-OF: R-49372-18364 The not-equal operator can be either != or
|
||||
# <>.
|
||||
#
|
||||
foreach {tn literal different} {
|
||||
@@ -1892,9 +1892,10 @@ do_expr_test e_expr-35.1.6 {
|
||||
(SELECT a FROM t2 UNION SELECT COALESCE(b, 55) FROM t2 ORDER BY 1)
|
||||
} integer 4
|
||||
|
||||
# EVIDENCE-OF: R-22239-33740 A subquery that returns two or more columns
|
||||
# is a row value subquery and can only be used as the operand of a
|
||||
# comparison operator.
|
||||
# EVIDENCE-OF: R-43101-20178 A subquery that returns two or more columns
|
||||
# is a row value subquery and can only be used as an operand of a
|
||||
# comparison operator or as the value in an UPDATE SET clause whose
|
||||
# column name list has the same size.
|
||||
#
|
||||
# The following block tests that errors are returned in a bunch of cases
|
||||
# where a subquery returns more than one column.
|
||||
|
||||
+13
-1
@@ -220,6 +220,18 @@ do_execsql_test 7.1 {
|
||||
444 {} 120000
|
||||
}
|
||||
|
||||
|
||||
# 2023-02-17 dbsqlfuzz 4f8e0de6e272bbbb3e1b41cb5aea31e0b47297e3
|
||||
# count() with FILTER clause using the COUNTOFVIEW optimization.
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 8.0 {
|
||||
CREATE TABLE t0(c0 INT);
|
||||
CREATE TABLE t1a(a INTEGER PRIMARY KEY, b TEXT);
|
||||
INSERT INTO t1a VALUES(1,'one'),(2,NULL),(3,'three');
|
||||
CREATE TABLE t1b(c INTEGER PRIMARY KEY, d TEXT);
|
||||
INSERT INTO t1b VALUES(4,'four'),(5,NULL),(6,'six');
|
||||
CREATE VIEW t1 AS SELECT a, b FROM t1a UNION ALL SELECT c, d FROM t1b;
|
||||
SELECT count()FILTER(WHERE b IS NULL) FROM t1;
|
||||
} 2
|
||||
|
||||
finish_test
|
||||
|
||||
Binary file not shown.
@@ -806,5 +806,30 @@ do_execsql_test in-21.1 {
|
||||
SELECT COUNT(*) FROM t0 ORDER BY (t0.c0 IN ());
|
||||
} {0}
|
||||
|
||||
# Ignore extra parentheses around a subquery on the RHS of an IN operator,
|
||||
# because that is what PostgreSQL does.
|
||||
#
|
||||
do_execsql_test in-22.1 {
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(x INT PRIMARY KEY, y INT);
|
||||
WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<8)
|
||||
INSERT INTO t1(x,y) SELECT x, x*100 FROM c;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2(a INT);
|
||||
INSERT INTO t2 VALUES(2),(4),(6);
|
||||
SELECT * FROM t1 WHERE x IN (SELECT a FROM t2);
|
||||
} {2 200 4 400 6 600}
|
||||
do_execsql_test in-22.2 {
|
||||
SELECT * FROM t1 WHERE x IN ((SELECT a FROM t2));
|
||||
} {2 200 4 400 6 600}
|
||||
do_execsql_test in-22.3 {
|
||||
SELECT * FROM t1 WHERE x IN (((SELECT a FROM t2)));
|
||||
} {2 200 4 400 6 600}
|
||||
do_execsql_test in-22.4 {
|
||||
SELECT * FROM t1 WHERE x IN ((((((SELECT a FROM t2))))));
|
||||
} {2 200 4 400 6 600}
|
||||
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -565,6 +565,32 @@ do_execsql_test indexexpr1-2030 {
|
||||
FROM t1;
|
||||
} {/.*SCAN t1 USING INDEX t1x.*/}
|
||||
|
||||
reset_db
|
||||
do_execsql_test indexexpr1-2100 {
|
||||
CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT);
|
||||
INSERT INTO t1(a,b) VALUES(1,0);
|
||||
CREATE INDEX x1 ON t1( "y" );
|
||||
CREATE INDEX x2 ON t1( +"y" );
|
||||
CREATE INDEX x3 ON t1( +'y' );
|
||||
CREATE INDEX x4 ON t1( "y*" );
|
||||
}
|
||||
do_execsql_test indexexpr1-2110 {
|
||||
UPDATE t1 SET b=100 WHERE (SELECT 'y') GLOB "y";
|
||||
SELECT b FROM t1;
|
||||
} 100
|
||||
do_execsql_test indexexpr1-2120 {
|
||||
UPDATE t1 SET b=200 WHERE (SELECT 'y') GLOB +"y";
|
||||
SELECT b FROM t1;
|
||||
} 200
|
||||
do_execsql_test indexexpr1-2130 {
|
||||
UPDATE t1 SET b=300 WHERE (SELECT 'y') GLOB +'y';
|
||||
SELECT b FROM t1;
|
||||
} 300
|
||||
do_execsql_test indexexpr1-2140 {
|
||||
UPDATE t1 SET b=400 WHERE (SELECT 'y') GLOB "y*";
|
||||
SELECT b FROM t1;
|
||||
} 400
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -308,6 +308,46 @@ do_catchsql_test 8.2 {
|
||||
SELECT a FROM t1 NATURAL JOIN t1 WHERE (a,b)> (SELECT 2 IN (SELECT 2,2), 2);
|
||||
} {1 {sub-select returns 2 columns - expected 1}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 9.0 {
|
||||
CREATE TABLE t1(a, b);
|
||||
INSERT INTO t1 VALUES(1, 1), (1, 2), (2, 2), (2, 3), (3, 3), (3, 4), (4, 4);
|
||||
}
|
||||
|
||||
do_execsql_test 9.1 {
|
||||
SELECT * FROM t1 WHERE (a, b) IN ( (3, 3), (2, 2) );
|
||||
} {
|
||||
2 2 3 3
|
||||
}
|
||||
do_execsql_test 9.2 {
|
||||
CREATE INDEX i1 ON t1(a);
|
||||
}
|
||||
|
||||
do_execsql_test 9.4 {
|
||||
SELECT * FROM t1 WHERE (a, b) IN ( (3, 3), (2, 2) );
|
||||
} {
|
||||
2 2 3 3
|
||||
}
|
||||
do_eqp_test 9.4e {
|
||||
SELECT * FROM t1 WHERE (a, b) IN ( (3, 3), (2, 2) );
|
||||
} {
|
||||
*SEARCH t1 USING INDEX i1*
|
||||
}
|
||||
|
||||
do_execsql_test 9.5 {
|
||||
CREATE INDEX i2 ON t1(b, a);
|
||||
SELECT * FROM t1 WHERE (a, b) IN ( (3, 3), (2, 2) );
|
||||
} {
|
||||
2 2 3 3
|
||||
}
|
||||
do_eqp_test 9.5e {
|
||||
SELECT * FROM t1 WHERE (a, b) IN ( (3, 3), (2, 2) );
|
||||
} {
|
||||
*SEARCH t1 USING COVERING INDEX i2*
|
||||
}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
+22
-6
@@ -24,6 +24,7 @@ Usage:
|
||||
where SWITCHES are:
|
||||
--jobs NUMBER-OF-JOBS
|
||||
--fuzztest
|
||||
--zipvfs ZIPVFS-SOURCE-DIR
|
||||
|
||||
Interesting values for PERMUTATION are:
|
||||
|
||||
@@ -106,6 +107,7 @@ set TRG(patternlist) [list]
|
||||
set TRG(cmdline) $argv
|
||||
set TRG(reporttime) 2000
|
||||
set TRG(fuzztest) 0 ;# is the fuzztest option present.
|
||||
set TRG(zipvfs) "" ;# -zipvfs option, if any
|
||||
|
||||
switch -nocase -glob -- $tcl_platform(os) {
|
||||
*darwin* {
|
||||
@@ -344,6 +346,10 @@ for {set ii 0} {$ii < [llength $argv]} {incr ii} {
|
||||
if {$isLast} { usage }
|
||||
} elseif {($n>2 && [string match "$a*" --fuzztest]) || $a=="-f"} {
|
||||
set TRG(fuzztest) 1
|
||||
} elseif {($n>2 && [string match "$a*" --zipvfs]) || $a=="-z"} {
|
||||
incr ii
|
||||
set TRG(zipvfs) [lindex $argv $ii]
|
||||
if {$isLast} { usage }
|
||||
} else {
|
||||
usage
|
||||
}
|
||||
@@ -573,6 +579,12 @@ proc make_new_testset {} {
|
||||
global TRG
|
||||
|
||||
set tests [testset_patternlist $TRG(patternlist)]
|
||||
|
||||
if {$TRG(zipvfs)!=""} {
|
||||
source [file join $TRG(zipvfs) test zipvfs_testrunner.tcl]
|
||||
set tests [concat $tests [zipvfs_testrunner_testset]]
|
||||
}
|
||||
|
||||
r_write_db {
|
||||
|
||||
trdb eval $TRG(schema)
|
||||
@@ -700,13 +712,17 @@ proc launch_another_job {iJob} {
|
||||
set builddir [build_to_dirname $b]
|
||||
create_or_clear_dir $builddir
|
||||
|
||||
set cmd [info nameofexec]
|
||||
lappend cmd [file join $testdir releasetest_data.tcl]
|
||||
lappend cmd trscript
|
||||
if {$TRG(platform)=="win"} { lappend cmd -msvc }
|
||||
lappend cmd $b $srcdir
|
||||
if {$b=="Zipvfs"} {
|
||||
set script [zipvfs_testrunner_script]
|
||||
} else {
|
||||
set cmd [info nameofexec]
|
||||
lappend cmd [file join $testdir releasetest_data.tcl]
|
||||
lappend cmd trscript
|
||||
if {$TRG(platform)=="win"} { lappend cmd -msvc }
|
||||
lappend cmd $b $srcdir
|
||||
set script [exec {*}$cmd]
|
||||
}
|
||||
|
||||
set script [exec {*}$cmd]
|
||||
set fd [open [file join $builddir $TRG(make)] w]
|
||||
puts $fd $script
|
||||
close $fd
|
||||
|
||||
@@ -189,5 +189,24 @@ do_execsql_test 610 {
|
||||
AND A.RunYearMonth = B.RunYearMonth;
|
||||
} {4 202004 4 202004 5 202004 5 202004}
|
||||
|
||||
# 2023-02-10 https://sqlite.org/forum/forumpost/0a539c76db3b9e29
|
||||
# The original constant propagation implementation caused a performance
|
||||
# regression. Because "abs(v)" was rewritten into "abs(1)" it no longer
|
||||
# matches the indexed column and the index is not used.
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 700 {
|
||||
CREATE TABLE t1(v INTEGER);
|
||||
WITH RECURSIVE c(x) AS (VALUES(-10) UNION ALL SELECT x+1 FROM c WHERE x<10)
|
||||
INSERT INTO t1(v) SELECT x FROM c;
|
||||
CREATE INDEX idx ON t1( abs(v) );
|
||||
SELECT v FROM t1 WHERE abs(v)=1 and v=1;
|
||||
} 1
|
||||
do_eqp_test 710 {
|
||||
SELECT v FROM t1 WHERE abs(v)=1 and v=1;
|
||||
} {
|
||||
QUERY PLAN
|
||||
`--SEARCH t1 USING INDEX idx (<expr>=?)
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -98,7 +98,6 @@ set boolean_defnnz_options {
|
||||
set boolean_defnil_options {
|
||||
SQLITE_32BIT_ROWID
|
||||
SQLITE_4_BYTE_ALIGNED_MALLOC
|
||||
SQLITE_64BIT_STATS
|
||||
SQLITE_ALLOW_URI_AUTHORITY
|
||||
SQLITE_BUG_COMPATIBLE_20160819
|
||||
SQLITE_CASE_SENSITIVE_LIKE
|
||||
|
||||
Reference in New Issue
Block a user