Merge changes from trunk.
FossilOrigin-Name: 6ef3de810d54563c227045b16197b8011ce285ea867261946f93b2de55344f29
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
compat
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
compat/*
|
||||||
+19
-4
@@ -448,7 +448,8 @@ TESTSRC += \
|
|||||||
$(TOP)/ext/misc/spellfix.c \
|
$(TOP)/ext/misc/spellfix.c \
|
||||||
$(TOP)/ext/misc/totype.c \
|
$(TOP)/ext/misc/totype.c \
|
||||||
$(TOP)/ext/misc/unionvtab.c \
|
$(TOP)/ext/misc/unionvtab.c \
|
||||||
$(TOP)/ext/misc/wholenumber.c
|
$(TOP)/ext/misc/wholenumber.c \
|
||||||
|
$(TOP)/ext/misc/zipfile.c
|
||||||
|
|
||||||
# Source code to the library files needed by the test fixture
|
# Source code to the library files needed by the test fixture
|
||||||
#
|
#
|
||||||
@@ -559,7 +560,8 @@ TESTPROGS = \
|
|||||||
sqlite3$(TEXE) \
|
sqlite3$(TEXE) \
|
||||||
sqlite3_analyzer$(TEXE) \
|
sqlite3_analyzer$(TEXE) \
|
||||||
sqldiff$(TEXE) \
|
sqldiff$(TEXE) \
|
||||||
dbhash$(TEXE)
|
dbhash$(TEXE) \
|
||||||
|
sqltclsh$(TEXE)
|
||||||
|
|
||||||
# Databases containing fuzzer test cases
|
# Databases containing fuzzer test cases
|
||||||
#
|
#
|
||||||
@@ -577,7 +579,8 @@ TESTOPTS = --verbose=file --output=test-out.txt
|
|||||||
# Extra compiler options for various shell tools
|
# Extra compiler options for various shell tools
|
||||||
#
|
#
|
||||||
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
|
SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
|
||||||
# SHELL_OPT += -DSQLITE_ENABLE_FTS5
|
#SHELL_OPT += -DSQLITE_ENABLE_FTS5
|
||||||
|
SHELL_OPT += -DSQLITE_ENABLE_RTREE
|
||||||
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||||
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||||
SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
|
SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
|
||||||
@@ -996,9 +999,15 @@ keywordhash.h: $(TOP)/tool/mkkeywordhash.c
|
|||||||
# Source files that go into making shell.c
|
# Source files that go into making shell.c
|
||||||
SHELL_SRC = \
|
SHELL_SRC = \
|
||||||
$(TOP)/src/shell.c.in \
|
$(TOP)/src/shell.c.in \
|
||||||
|
$(TOP)/ext/misc/appendvfs.c \
|
||||||
$(TOP)/ext/misc/shathree.c \
|
$(TOP)/ext/misc/shathree.c \
|
||||||
$(TOP)/ext/misc/fileio.c \
|
$(TOP)/ext/misc/fileio.c \
|
||||||
$(TOP)/ext/misc/completion.c
|
$(TOP)/ext/misc/completion.c \
|
||||||
|
$(TOP)/ext/misc/sqlar.c \
|
||||||
|
$(TOP)/ext/expert/sqlite3expert.c \
|
||||||
|
$(TOP)/ext/expert/sqlite3expert.h \
|
||||||
|
$(TOP)/ext/misc/zipfile.c \
|
||||||
|
$(TOP)/src/test_windirent.c
|
||||||
|
|
||||||
shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
|
shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
|
||||||
$(TCLSH_CMD) $(TOP)/tool/mkshellc.tcl >shell.c
|
$(TCLSH_CMD) $(TOP)/tool/mkshellc.tcl >shell.c
|
||||||
@@ -1198,6 +1207,12 @@ sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $
|
|||||||
sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
|
sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
|
||||||
$(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
|
$(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
|
||||||
|
|
||||||
|
sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
|
||||||
|
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
|
||||||
|
|
||||||
|
sqltclsh$(TEXE): sqltclsh.c
|
||||||
|
$(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
|
||||||
|
|
||||||
sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
|
sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
|
||||||
$(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
|
$(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
|
||||||
|
|
||||||
|
|||||||
+137
-15
@@ -92,6 +92,29 @@ SPLIT_AMALGAMATION = 0
|
|||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# <<mark>>
|
# <<mark>>
|
||||||
|
# Set this non-0 to have this makefile assume the Tcl shell executable
|
||||||
|
# (tclsh*.exe) is available in the PATH. By default, this is disabled
|
||||||
|
# for compatibility with older build environments. This setting only
|
||||||
|
# applies if TCLSH_CMD is not set manually.
|
||||||
|
#
|
||||||
|
!IFNDEF USE_TCLSH_IN_PATH
|
||||||
|
USE_TCLSH_IN_PATH = 0
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Set this non-0 to use zlib, possibly compiling it from source code.
|
||||||
|
#
|
||||||
|
!IFNDEF USE_ZLIB
|
||||||
|
USE_ZLIB = 0
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Set this non-0 to build zlib from source code. This is enabled by
|
||||||
|
# default and in that case it will be assumed that the ZLIBDIR macro
|
||||||
|
# points to the top-level source code directory for zlib.
|
||||||
|
#
|
||||||
|
!IFNDEF BUILD_ZLIB
|
||||||
|
BUILD_ZLIB = 1
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
# Set this non-0 to use the International Components for Unicode (ICU).
|
# Set this non-0 to use the International Components for Unicode (ICU).
|
||||||
#
|
#
|
||||||
!IFNDEF USE_ICU
|
!IFNDEF USE_ICU
|
||||||
@@ -612,6 +635,15 @@ SHELL_CORE_DEP =
|
|||||||
!ENDIF
|
!ENDIF
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
# <<mark>>
|
||||||
|
# If zlib support is enabled, add the dependencies for it.
|
||||||
|
#
|
||||||
|
!IF $(USE_ZLIB)!=0 && $(BUILD_ZLIB)!=0
|
||||||
|
SHELL_CORE_DEP = zlib $(SHELL_CORE_DEP)
|
||||||
|
TESTFIXTURE_DEP = zlib $(TESTFIXTURE_DEP)
|
||||||
|
!ENDIF
|
||||||
|
# <</mark>>
|
||||||
|
|
||||||
# This is the core library that the shell executable should link with.
|
# This is the core library that the shell executable should link with.
|
||||||
#
|
#
|
||||||
!IFNDEF SHELL_CORE_LIB
|
!IFNDEF SHELL_CORE_LIB
|
||||||
@@ -802,12 +834,16 @@ RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
|
|||||||
# prior to running nmake in order to match the actual installed location and
|
# prior to running nmake in order to match the actual installed location and
|
||||||
# version on this machine.
|
# version on this machine.
|
||||||
#
|
#
|
||||||
|
!IFNDEF TCLDIR
|
||||||
|
TCLDIR = $(TOP)\compat\tcl
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF TCLINCDIR
|
!IFNDEF TCLINCDIR
|
||||||
TCLINCDIR = c:\tcl\include
|
TCLINCDIR = $(TCLDIR)\include
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF TCLLIBDIR
|
!IFNDEF TCLLIBDIR
|
||||||
TCLLIBDIR = c:\tcl\lib
|
TCLLIBDIR = $(TCLDIR)\lib
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF LIBTCL
|
!IFNDEF LIBTCL
|
||||||
@@ -819,7 +855,32 @@ LIBTCLSTUB = tclstub86.lib
|
|||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF LIBTCLPATH
|
!IFNDEF LIBTCLPATH
|
||||||
LIBTCLPATH = c:\tcl\bin
|
LIBTCLPATH = $(TCLDIR)\bin
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# The locations of the zlib header and library files. These variables
|
||||||
|
# (ZLIBINCDIR, ZLIBLIBDIR, and ZLIBLIB) may be overridden via the environment
|
||||||
|
# prior to running nmake in order to match the actual installed (or source
|
||||||
|
# code) location on this machine.
|
||||||
|
#
|
||||||
|
!IFNDEF ZLIBDIR
|
||||||
|
ZLIBDIR = $(TOP)\compat\zlib
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IFNDEF ZLIBINCDIR
|
||||||
|
ZLIBINCDIR = $(ZLIBDIR)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IFNDEF ZLIBLIBDIR
|
||||||
|
ZLIBLIBDIR = $(ZLIBDIR)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
!IFNDEF ZLIBLIB
|
||||||
|
!IF $(DYNAMIC_SHELL)!=0
|
||||||
|
ZLIBLIB = zdll.lib
|
||||||
|
!ELSE
|
||||||
|
ZLIBLIB = zlib.lib
|
||||||
|
!ENDIF
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# The locations of the ICU header and library files. These variables
|
# The locations of the ICU header and library files. These variables
|
||||||
@@ -827,12 +888,16 @@ LIBTCLPATH = c:\tcl\bin
|
|||||||
# prior to running nmake in order to match the actual installed location on
|
# prior to running nmake in order to match the actual installed location on
|
||||||
# this machine.
|
# this machine.
|
||||||
#
|
#
|
||||||
|
!IFNDEF ICUDIR
|
||||||
|
ICUDIR = $(TOP)\compat\icu
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF ICUINCDIR
|
!IFNDEF ICUINCDIR
|
||||||
ICUINCDIR = c:\icu\include
|
ICUINCDIR = $(ICUDIR)\include
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF ICULIBDIR
|
!IFNDEF ICULIBDIR
|
||||||
ICULIBDIR = c:\icu\lib
|
ICULIBDIR = $(ICUDIR)\lib
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFNDEF LIBICU
|
!IFNDEF LIBICU
|
||||||
@@ -845,7 +910,11 @@ LIBICU = icuuc.lib icuin.lib
|
|||||||
# specific Tcl shell to use.
|
# specific Tcl shell to use.
|
||||||
#
|
#
|
||||||
!IFNDEF TCLSH_CMD
|
!IFNDEF TCLSH_CMD
|
||||||
|
!IF $(USE_TCLSH_IN_PATH)!=0 || !EXIST("$(TCLDIR)\bin\tclsh.exe")
|
||||||
TCLSH_CMD = tclsh
|
TCLSH_CMD = tclsh
|
||||||
|
!ELSE
|
||||||
|
TCLSH_CMD = $(TCLDIR)\bin\tclsh.exe
|
||||||
|
!ENDIF
|
||||||
!ENDIF
|
!ENDIF
|
||||||
# <</mark>>
|
# <</mark>>
|
||||||
|
|
||||||
@@ -951,6 +1020,15 @@ BCC = $(BCC) -Zi
|
|||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# <<mark>>
|
# <<mark>>
|
||||||
|
# If zlib support is enabled, add the compiler options for it.
|
||||||
|
#
|
||||||
|
!IF $(USE_ZLIB)!=0
|
||||||
|
TCC = $(TCC) -DSQLITE_HAVE_ZLIB=1
|
||||||
|
RCC = $(RCC) -DSQLITE_HAVE_ZLIB=1
|
||||||
|
TCC = $(TCC) -I$(ZLIBINCDIR)
|
||||||
|
RCC = $(RCC) -I$(ZLIBINCDIR)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
# If ICU support is enabled, add the compiler options for it.
|
# If ICU support is enabled, add the compiler options for it.
|
||||||
#
|
#
|
||||||
!IF $(USE_ICU)!=0
|
!IF $(USE_ICU)!=0
|
||||||
@@ -1071,8 +1149,15 @@ LDFLAGS = $(LDOPTS)
|
|||||||
# Start with the Tcl related linker options.
|
# Start with the Tcl related linker options.
|
||||||
#
|
#
|
||||||
!IF $(NO_TCL)==0
|
!IF $(NO_TCL)==0
|
||||||
LTLIBPATHS = /LIBPATH:$(TCLLIBDIR)
|
TCLLIBPATHS = $(TCLLIBPATHS) /LIBPATH:$(TCLLIBDIR)
|
||||||
LTLIBS = $(LTLIBS) $(LIBTCL)
|
TCLLIBS = $(TCLLIBS) $(LIBTCL)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# If zlib support is enabled, add the linker options for it.
|
||||||
|
#
|
||||||
|
!IF $(USE_ZLIB)!=0
|
||||||
|
LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ZLIBLIBDIR)
|
||||||
|
LTLIBS = $(LTLIBS) $(ZLIBLIB)
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# If ICU support is enabled, add the linker options for it.
|
# If ICU support is enabled, add the linker options for it.
|
||||||
@@ -1425,6 +1510,12 @@ TESTEXT = \
|
|||||||
$(TOP)\ext\misc\unionvtab.c \
|
$(TOP)\ext\misc\unionvtab.c \
|
||||||
$(TOP)\ext\misc\wholenumber.c
|
$(TOP)\ext\misc\wholenumber.c
|
||||||
|
|
||||||
|
# If use of zlib is enabled, add the "zipfile.c" source file.
|
||||||
|
#
|
||||||
|
!IF $(USE_ZLIB)!=0
|
||||||
|
TESTEXT = $(TESTEXT) $(TOP)\ext\misc\zipfile.c
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
# Source code to the library files needed by the test fixture
|
# Source code to the library files needed by the test fixture
|
||||||
# (non-amalgamation)
|
# (non-amalgamation)
|
||||||
#
|
#
|
||||||
@@ -1496,7 +1587,8 @@ TESTPROGS = \
|
|||||||
sqlite3_analyzer.exe \
|
sqlite3_analyzer.exe \
|
||||||
sqlite3_checker.exe \
|
sqlite3_checker.exe \
|
||||||
sqldiff.exe \
|
sqldiff.exe \
|
||||||
dbhash.exe
|
dbhash.exe \
|
||||||
|
sqltclsh.exe
|
||||||
|
|
||||||
# Databases containing fuzzer test cases
|
# Databases containing fuzzer test cases
|
||||||
#
|
#
|
||||||
@@ -1515,6 +1607,7 @@ FUZZDATA = \
|
|||||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB
|
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB
|
||||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB
|
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_INTROSPECTION_PRAGMAS
|
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_INTROSPECTION_PRAGMAS
|
||||||
|
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_RTREE
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# <<mark>>
|
# <<mark>>
|
||||||
@@ -1546,7 +1639,15 @@ ALL_TCL_TARGETS =
|
|||||||
# This is the default Makefile target. The objects listed here
|
# This is the default Makefile target. The objects listed here
|
||||||
# are what get build when you type just "make" with no arguments.
|
# are what get build when you type just "make" with no arguments.
|
||||||
#
|
#
|
||||||
all: dll libsqlite3.lib shell $(ALL_TCL_TARGETS)
|
core: dll libsqlite3.lib shell
|
||||||
|
|
||||||
|
# Targets that require the Tcl library.
|
||||||
|
#
|
||||||
|
tcl: $(ALL_TCL_TARGETS)
|
||||||
|
|
||||||
|
# This Makefile target builds all of the standard binaries.
|
||||||
|
#
|
||||||
|
all: core tcl
|
||||||
|
|
||||||
# Dynamic link library section.
|
# Dynamic link library section.
|
||||||
#
|
#
|
||||||
@@ -1944,7 +2045,7 @@ tclsqlite-shell.lo: $(TOP)\src\tclsqlite.c $(HDR) $(SQLITE_TCL_DEP)
|
|||||||
$(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
|
$(LTCOMPILE) $(NO_WARN) -DTCLSH -DBUILD_sqlite -I$(TCLINCDIR) -c $(TOP)\src\tclsqlite.c
|
||||||
|
|
||||||
tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
|
tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(SQLITE3H) $(LIBRESOBJS)
|
||||||
$(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
|
$(LTLINK) $(SQLITE3C) /link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite-shell.lo $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
|
||||||
|
|
||||||
# Rules to build opcodes.c and opcodes.h
|
# Rules to build opcodes.c and opcodes.h
|
||||||
#
|
#
|
||||||
@@ -1987,13 +2088,26 @@ keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
|
|||||||
# Source files that go into making shell.c
|
# Source files that go into making shell.c
|
||||||
SHELL_SRC = \
|
SHELL_SRC = \
|
||||||
$(TOP)\src\shell.c.in \
|
$(TOP)\src\shell.c.in \
|
||||||
|
$(TOP)\ext\misc\appendvfs.c \
|
||||||
$(TOP)\ext\misc\shathree.c \
|
$(TOP)\ext\misc\shathree.c \
|
||||||
$(TOP)\ext\misc\fileio.c \
|
$(TOP)\ext\misc\fileio.c \
|
||||||
$(TOP)\ext\misc\completion.c
|
$(TOP)\ext\misc\completion.c \
|
||||||
|
$(TOP)\ext\expert\sqlite3expert.c \
|
||||||
|
$(TOP)\ext\expert\sqlite3expert.h \
|
||||||
|
$(TOP)\src\test_windirent.c
|
||||||
|
|
||||||
|
# If use of zlib is enabled, add the "zipfile.c" source file.
|
||||||
|
#
|
||||||
|
!IF $(USE_ZLIB)!=0
|
||||||
|
SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\sqlar.c
|
||||||
|
SHELL_SRC = $(SHELL_SRC) $(TOP)\ext\misc\zipfile.c
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
shell.c: $(SHELL_SRC) $(TOP)\tool\mkshellc.tcl
|
shell.c: $(SHELL_SRC) $(TOP)\tool\mkshellc.tcl
|
||||||
$(TCLSH_CMD) $(TOP)\tool\mkshellc.tcl > shell.c
|
$(TCLSH_CMD) $(TOP)\tool\mkshellc.tcl > shell.c
|
||||||
|
|
||||||
|
zlib:
|
||||||
|
pushd $(ZLIBDIR) && $(MAKE) /f win32\Makefile.msc clean $(ZLIBLIB) && popd
|
||||||
|
|
||||||
# Rules to build the extension objects.
|
# Rules to build the extension objects.
|
||||||
#
|
#
|
||||||
@@ -2171,11 +2285,11 @@ sqlite_tcl.h:
|
|||||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
|
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact "Tcl_HashEntry *(*createProc)" "Tcl_HashEntry *(SQLITE_TCLAPI *createProc)" >> $(SQLITETCLH)
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
testfixture.exe: $(TESTFIXTURE_SRC) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
|
testfixture.exe: $(TESTFIXTURE_SRC) $(TESTFIXTURE_DEP) $(SQLITE3H) $(LIBRESOBJS) $(HDR) $(SQLITE_TCL_DEP)
|
||||||
$(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
|
$(LTLINK) -DSQLITE_NO_SYNC=1 $(TESTFIXTURE_FLAGS) \
|
||||||
-DBUILD_sqlite -I$(TCLINCDIR) \
|
-DBUILD_sqlite -I$(TCLINCDIR) \
|
||||||
$(TESTFIXTURE_SRC) \
|
$(TESTFIXTURE_SRC) \
|
||||||
/link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
|
/link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
|
||||||
|
|
||||||
extensiontest: testfixture.exe testloadext.dll
|
extensiontest: testfixture.exe testloadext.dll
|
||||||
@set PATH=$(LIBTCLPATH);$(PATH)
|
@set PATH=$(LIBTCLPATH);$(PATH)
|
||||||
@@ -2225,7 +2339,14 @@ sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\s
|
|||||||
|
|
||||||
sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
|
sqlite3_analyzer.exe: sqlite3_analyzer.c $(LIBRESOBJS)
|
||||||
$(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
|
$(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
|
||||||
/link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
|
/link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
|
||||||
|
|
||||||
|
sqltclsh.c: sqlite3.c $(TOP)\src\tclsqlite.c $(TOP)\tool\sqltclsh.tcl $(TOP)\ext\misc\appendvfs.c $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in
|
||||||
|
$(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqltclsh.c.in >sqltclsh.c
|
||||||
|
|
||||||
|
sqltclsh.exe: sqltclsh.c $(SHELL_CORE_DEP) $(LIBRESOBJS)
|
||||||
|
$(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqltclsh.c \
|
||||||
|
/link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
|
||||||
|
|
||||||
sqlite3_expert.exe: $(SQLITE3C) $(TOP)\ext\expert\sqlite3expert.h $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c
|
sqlite3_expert.exe: $(SQLITE3C) $(TOP)\ext\expert\sqlite3expert.h $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c
|
||||||
$(LTLINK) $(NO_WARN) $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c $(SQLITE3C) $(TLIBS)
|
$(LTLINK) $(NO_WARN) $(TOP)\ext\expert\sqlite3expert.c $(TOP)\ext\expert\expert.c $(SQLITE3C) $(TLIBS)
|
||||||
@@ -2245,7 +2366,7 @@ sqlite3_checker.c: $(CHECKER_DEPS)
|
|||||||
|
|
||||||
sqlite3_checker.exe: sqlite3_checker.c $(LIBRESOBJS)
|
sqlite3_checker.exe: sqlite3_checker.c $(LIBRESOBJS)
|
||||||
$(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_checker.c \
|
$(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_checker.c \
|
||||||
/link $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
|
/link $(LDFLAGS) $(LTLINKOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) $(LIBRESOBJS) $(TCLLIBS) $(LTLIBS) $(TLIBS)
|
||||||
|
|
||||||
dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H)
|
dbdump.exe: $(TOP)\ext\misc\dbdump.c $(SQLITE3C) $(SQLITE3H)
|
||||||
$(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
|
$(LTLINK) $(NO_WARN) -DDBDUMP_STANDALONE $(TOP)\ext\misc\dbdump.c $(SQLITE3C) \
|
||||||
@@ -2346,6 +2467,7 @@ clean:
|
|||||||
del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
|
del /Q sqlite3_analyzer.exe sqlite3_analyzer.c 2>NUL
|
||||||
del /Q sqlite-*-output.vsix 2>NUL
|
del /Q sqlite-*-output.vsix 2>NUL
|
||||||
del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
|
del /Q fuzzershell.exe fuzzcheck.exe sqldiff.exe dbhash.exe 2>NUL
|
||||||
|
del /Q sqltclsh.exe 2>NUL
|
||||||
del /Q fts5.* fts5parse.* 2>NUL
|
del /Q fts5.* fts5parse.* 2>NUL
|
||||||
del /Q lsm.h lsm1.c 2>NUL
|
del /Q lsm.h lsm1.c 2>NUL
|
||||||
# <</mark>>
|
# <</mark>>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<h1 align="center">SQLite Source Repository</h1>
|
<h1 align="center">SQLite Source Repository</h1>
|
||||||
|
|
||||||
This repository contains the complete source code for the SQLite database
|
This repository contains the complete source code for the SQLite database
|
||||||
engine. Some test scripts are also include. However, many other test scripts
|
engine. Some test scripts are also included. However, many other test scripts
|
||||||
and most of the documentation are managed separately.
|
and most of the documentation are managed separately.
|
||||||
|
|
||||||
If you are reading this on a Git mirror someplace, you are doing it wrong.
|
If you are reading this on a Git mirror someplace, you are doing it wrong.
|
||||||
@@ -104,7 +104,6 @@ recommended.
|
|||||||
SQLite does not require [Tcl](http://www.tcl.tk/) to run, but a Tcl installation
|
SQLite does not require [Tcl](http://www.tcl.tk/) to run, but a Tcl installation
|
||||||
is required by the makefiles (including those for MSVC). SQLite contains
|
is required by the makefiles (including those for MSVC). SQLite contains
|
||||||
a lot of generated code and Tcl is used to do much of that code generation.
|
a lot of generated code and Tcl is used to do much of that code generation.
|
||||||
The makefiles also require AWK.
|
|
||||||
|
|
||||||
## Source Code Tour
|
## Source Code Tour
|
||||||
|
|
||||||
@@ -116,7 +115,7 @@ The **src/** also contains the "shell.c" file
|
|||||||
which is the main program for the "sqlite3.exe"
|
which is the main program for the "sqlite3.exe"
|
||||||
[command-line shell](https://sqlite.org/cli.html) and
|
[command-line shell](https://sqlite.org/cli.html) and
|
||||||
the "tclsqlite.c" file which implements the
|
the "tclsqlite.c" file which implements the
|
||||||
[TCL bindings](https://sqlite.org/tclsqlite.html) for SQLite.
|
[Tcl bindings](https://sqlite.org/tclsqlite.html) for SQLite.
|
||||||
(Historical note: SQLite began as a Tcl
|
(Historical note: SQLite began as a Tcl
|
||||||
extension and only later escaped to the wild as an independent library.)
|
extension and only later escaped to the wild as an independent library.)
|
||||||
|
|
||||||
@@ -163,14 +162,14 @@ template for generating its parser.
|
|||||||
|
|
||||||
Lemon also generates the **parse.h** header file, at the same time it
|
Lemon also generates the **parse.h** header file, at the same time it
|
||||||
generates parse.c. But the parse.h header file is
|
generates parse.c. But the parse.h header file is
|
||||||
modified further (to add additional symbols) using the ./addopcodes.awk
|
modified further (to add additional symbols) using the ./addopcodes.tcl
|
||||||
AWK script.
|
Tcl script.
|
||||||
|
|
||||||
The **opcodes.h** header file contains macros that define the numbers
|
The **opcodes.h** header file contains macros that define the numbers
|
||||||
corresponding to opcodes in the "VDBE" virtual machine. The opcodes.h
|
corresponding to opcodes in the "VDBE" virtual machine. The opcodes.h
|
||||||
file is generated by the scanning the src/vdbe.c source file. The
|
file is generated by the scanning the src/vdbe.c source file. The
|
||||||
AWK script at ./mkopcodeh.awk does this scan and generates opcodes.h.
|
Tcl script at ./mkopcodeh.tcl does this scan and generates opcodes.h.
|
||||||
A second AWK script, ./mkopcodec.awk, then scans opcodes.h to generate
|
A second Tcl script, ./mkopcodec.tcl, then scans opcodes.h to generate
|
||||||
the **opcodes.c** source file, which contains a reverse mapping from
|
the **opcodes.c** source file, which contains a reverse mapping from
|
||||||
opcode-number to opcode-name that is used for EXPLAIN output.
|
opcode-number to opcode-name that is used for EXPLAIN output.
|
||||||
|
|
||||||
@@ -280,7 +279,7 @@ Key files:
|
|||||||
|
|
||||||
* **test*.c** - Files in the src/ folder that begin with "test" go into
|
* **test*.c** - Files in the src/ folder that begin with "test" go into
|
||||||
building the "testfixture.exe" program. The testfixture.exe program is
|
building the "testfixture.exe" program. The testfixture.exe program is
|
||||||
an enhanced TCL shell. The testfixture.exe program runs scripts in the
|
an enhanced Tcl shell. The testfixture.exe program runs scripts in the
|
||||||
test/ folder to validate the core SQLite code. The testfixture program
|
test/ folder to validate the core SQLite code. The testfixture program
|
||||||
(and some other test programs too) is build and run when you type
|
(and some other test programs too) is build and run when you type
|
||||||
"make test".
|
"make test".
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ @SESSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
|
AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ @ZLIB_FLAGS@ @SESSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
|
||||||
|
|
||||||
lib_LTLIBRARIES = libsqlite3.la
|
lib_LTLIBRARIES = libsqlite3.la
|
||||||
libsqlite3_la_SOURCES = sqlite3.c
|
libsqlite3_la_SOURCES = sqlite3.c
|
||||||
|
|||||||
+11
-1
@@ -561,6 +561,7 @@ SHELL_CORE_DEP =
|
|||||||
!ENDIF
|
!ENDIF
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
# This is the core library that the shell executable should link with.
|
# This is the core library that the shell executable should link with.
|
||||||
#
|
#
|
||||||
!IFNDEF SHELL_CORE_LIB
|
!IFNDEF SHELL_CORE_LIB
|
||||||
@@ -929,13 +930,22 @@ LIBRESOBJS =
|
|||||||
!IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
|
!IF $(DYNAMIC_SHELL)==0 && $(FOR_WIN10)==0
|
||||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB
|
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_STMTVTAB
|
||||||
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB
|
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DBSTAT_VTAB
|
||||||
|
SHELL_COMPILE_OPTS = $(SHELL_COMPILE_OPTS) -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_INTROSPECTION_PRAGMAS
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
|
||||||
# This is the default Makefile target. The objects listed here
|
# This is the default Makefile target. The objects listed here
|
||||||
# are what get build when you type just "make" with no arguments.
|
# are what get build when you type just "make" with no arguments.
|
||||||
#
|
#
|
||||||
all: dll shell
|
core: dll shell
|
||||||
|
|
||||||
|
# Targets that require the Tcl library.
|
||||||
|
#
|
||||||
|
tcl: $(ALL_TCL_TARGETS)
|
||||||
|
|
||||||
|
# This Makefile target builds all of the standard binaries.
|
||||||
|
#
|
||||||
|
all: core tcl
|
||||||
|
|
||||||
# Dynamic link library section.
|
# Dynamic link library section.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -164,6 +164,10 @@ AC_SUBST(EXTRA_SHELL_OBJ)
|
|||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
|
|
||||||
AC_CHECK_FUNCS(posix_fallocate)
|
AC_CHECK_FUNCS(posix_fallocate)
|
||||||
|
AC_CHECK_HEADERS(zlib.h,[
|
||||||
|
AC_SEARCH_LIBS(deflate,z,[ZLIB_FLAGS="-DSQLITE_HAVE_ZLIB"])
|
||||||
|
])
|
||||||
|
AC_SUBST(ZLIB_FLAGS)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
# UPDATE: Maybe it's better if users just set CFLAGS before invoking
|
# UPDATE: Maybe it's better if users just set CFLAGS before invoking
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.69 for sqlite 3.22.0.
|
# Generated by GNU Autoconf 2.69 for sqlite 3.23.0.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||||
@@ -726,8 +726,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='sqlite'
|
PACKAGE_NAME='sqlite'
|
||||||
PACKAGE_TARNAME='sqlite'
|
PACKAGE_TARNAME='sqlite'
|
||||||
PACKAGE_VERSION='3.22.0'
|
PACKAGE_VERSION='3.23.0'
|
||||||
PACKAGE_STRING='sqlite 3.22.0'
|
PACKAGE_STRING='sqlite 3.23.0'
|
||||||
PACKAGE_BUGREPORT=''
|
PACKAGE_BUGREPORT=''
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
@@ -1465,7 +1465,7 @@ if test "$ac_init_help" = "long"; then
|
|||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures sqlite 3.22.0 to adapt to many kinds of systems.
|
\`configure' configures sqlite 3.23.0 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1530,7 +1530,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of sqlite 3.22.0:";;
|
short | recursive ) echo "Configuration of sqlite 3.23.0:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1655,7 +1655,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
sqlite configure 3.22.0
|
sqlite configure 3.23.0
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
@@ -2074,7 +2074,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by sqlite $as_me 3.22.0, which was
|
It was created by sqlite $as_me 3.23.0, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
@@ -12242,7 +12242,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
|||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by sqlite $as_me 3.22.0, which was
|
This file was extended by sqlite $as_me 3.23.0, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
@@ -12308,7 +12308,7 @@ _ACEOF
|
|||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
sqlite config.status 3.22.0
|
sqlite config.status 3.23.0
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,11 @@ if {![info exists testdir]} {
|
|||||||
source $testdir/tester.tcl
|
source $testdir/tester.tcl
|
||||||
set testprefix expert1
|
set testprefix expert1
|
||||||
|
|
||||||
|
if {[info commands sqlite3_expert_new]==""} {
|
||||||
|
finish_test
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
set CLI [test_binary_name sqlite3]
|
set CLI [test_binary_name sqlite3]
|
||||||
set CMD [test_binary_name sqlite3_expert]
|
set CMD [test_binary_name sqlite3_expert]
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||||
|
|
||||||
typedef sqlite3_int64 i64;
|
typedef sqlite3_int64 i64;
|
||||||
typedef sqlite3_uint64 u64;
|
typedef sqlite3_uint64 u64;
|
||||||
|
|
||||||
@@ -495,7 +497,7 @@ static int expertBestIndex(sqlite3_vtab *pVtab, sqlite3_index_info *pIdxInfo){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pIdxInfo->estimatedCost = 1000000.0 / n;
|
pIdxInfo->estimatedCost = 1000000.0 / (n+1);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -505,6 +507,10 @@ static int expertUpdate(
|
|||||||
sqlite3_value **azData,
|
sqlite3_value **azData,
|
||||||
sqlite_int64 *pRowid
|
sqlite_int64 *pRowid
|
||||||
){
|
){
|
||||||
|
(void)pVtab;
|
||||||
|
(void)nData;
|
||||||
|
(void)azData;
|
||||||
|
(void)pRowid;
|
||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -514,6 +520,7 @@ static int expertUpdate(
|
|||||||
static int expertOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
|
static int expertOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
ExpertCsr *pCsr;
|
ExpertCsr *pCsr;
|
||||||
|
(void)pVTab;
|
||||||
pCsr = idxMalloc(&rc, sizeof(ExpertCsr));
|
pCsr = idxMalloc(&rc, sizeof(ExpertCsr));
|
||||||
*ppCursor = (sqlite3_vtab_cursor*)pCsr;
|
*ppCursor = (sqlite3_vtab_cursor*)pCsr;
|
||||||
return rc;
|
return rc;
|
||||||
@@ -563,6 +570,7 @@ static int expertNext(sqlite3_vtab_cursor *cur){
|
|||||||
** Virtual table module xRowid method.
|
** Virtual table module xRowid method.
|
||||||
*/
|
*/
|
||||||
static int expertRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
|
static int expertRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
|
||||||
|
(void)cur;
|
||||||
*pRowid = 0;
|
*pRowid = 0;
|
||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
@@ -593,6 +601,10 @@ static int expertFilter(
|
|||||||
sqlite3expert *pExpert = pVtab->pExpert;
|
sqlite3expert *pExpert = pVtab->pExpert;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
(void)idxNum;
|
||||||
|
(void)idxStr;
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
rc = sqlite3_finalize(pCsr->pData);
|
rc = sqlite3_finalize(pCsr->pData);
|
||||||
pCsr->pData = 0;
|
pCsr->pData = 0;
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
@@ -754,7 +766,7 @@ static char *idxAppendText(int *pRc, char *zIn, const char *zFmt, ...){
|
|||||||
zRet = (char*)sqlite3_malloc(nIn + nAppend + 1);
|
zRet = (char*)sqlite3_malloc(nIn + nAppend + 1);
|
||||||
}
|
}
|
||||||
if( zAppend && zRet ){
|
if( zAppend && zRet ){
|
||||||
memcpy(zRet, zIn, nIn);
|
if( nIn ) memcpy(zRet, zIn, nIn);
|
||||||
memcpy(&zRet[nIn], zAppend, nAppend+1);
|
memcpy(&zRet[nIn], zAppend, nAppend+1);
|
||||||
}else{
|
}else{
|
||||||
sqlite3_free(zRet);
|
sqlite3_free(zRet);
|
||||||
@@ -908,7 +920,7 @@ static int idxCreateFromCons(
|
|||||||
char *zCols = 0;
|
char *zCols = 0;
|
||||||
char *zIdx = 0;
|
char *zIdx = 0;
|
||||||
IdxConstraint *pCons;
|
IdxConstraint *pCons;
|
||||||
int h = 0;
|
unsigned int h = 0;
|
||||||
const char *zFmt;
|
const char *zFmt;
|
||||||
|
|
||||||
for(pCons=pEq; pCons; pCons=pCons->pLink){
|
for(pCons=pEq; pCons; pCons=pCons->pLink){
|
||||||
@@ -1003,7 +1015,7 @@ static int idxCreateFromWhere(
|
|||||||
** Create candidate indexes in database [dbm] based on the data in
|
** Create candidate indexes in database [dbm] based on the data in
|
||||||
** linked-list pScan.
|
** linked-list pScan.
|
||||||
*/
|
*/
|
||||||
static int idxCreateCandidates(sqlite3expert *p, char **pzErr){
|
static int idxCreateCandidates(sqlite3expert *p){
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
IdxScan *pIter;
|
IdxScan *pIter;
|
||||||
|
|
||||||
@@ -1166,6 +1178,8 @@ static int idxAuthCallback(
|
|||||||
const char *zTrigger
|
const char *zTrigger
|
||||||
){
|
){
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
|
(void)z4;
|
||||||
|
(void)zTrigger;
|
||||||
if( eOp==SQLITE_INSERT || eOp==SQLITE_UPDATE || eOp==SQLITE_DELETE ){
|
if( eOp==SQLITE_INSERT || eOp==SQLITE_UPDATE || eOp==SQLITE_DELETE ){
|
||||||
if( sqlite3_stricmp(zDb, "main")==0 ){
|
if( sqlite3_stricmp(zDb, "main")==0 ){
|
||||||
sqlite3expert *p = (sqlite3expert*)pCtx;
|
sqlite3expert *p = (sqlite3expert*)pCtx;
|
||||||
@@ -1368,6 +1382,7 @@ static void idxSampleFunc(
|
|||||||
struct IdxSampleCtx *p = (struct IdxSampleCtx*)sqlite3_user_data(pCtx);
|
struct IdxSampleCtx *p = (struct IdxSampleCtx*)sqlite3_user_data(pCtx);
|
||||||
int bRet;
|
int bRet;
|
||||||
|
|
||||||
|
(void)argv;
|
||||||
assert( argc==0 );
|
assert( argc==0 );
|
||||||
if( p->nRow==0.0 ){
|
if( p->nRow==0.0 ){
|
||||||
bRet = 1;
|
bRet = 1;
|
||||||
@@ -1523,6 +1538,7 @@ static int idxPopulateOneStat1(
|
|||||||
);
|
);
|
||||||
zOrder = idxAppendText(&rc, zOrder, "%s%d", zComma, ++nCol);
|
zOrder = idxAppendText(&rc, zOrder, "%s%d", zComma, ++nCol);
|
||||||
}
|
}
|
||||||
|
sqlite3_reset(pIndexXInfo);
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
if( p->iSample==100 ){
|
if( p->iSample==100 ){
|
||||||
zQuery = sqlite3_mprintf(
|
zQuery = sqlite3_mprintf(
|
||||||
@@ -1852,7 +1868,7 @@ int sqlite3_expert_analyze(sqlite3expert *p, char **pzErr){
|
|||||||
|
|
||||||
/* Create candidate indexes within the in-memory database file */
|
/* Create candidate indexes within the in-memory database file */
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
rc = idxCreateCandidates(p, pzErr);
|
rc = idxCreateCandidates(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate the stat1 data */
|
/* Generate the stat1 data */
|
||||||
@@ -1932,3 +1948,5 @@ void sqlite3_expert_destroy(sqlite3expert *p){
|
|||||||
sqlite3_free(p);
|
sqlite3_free(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* ifndef SQLITE_OMIT_VIRTUAL_TABLE */
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Extract an sqlite3* db handle from the object passed as the second
|
** Extract an sqlite3* db handle from the object passed as the second
|
||||||
** argument. If successful, set *pDb to point to the db handle and return
|
** argument. If successful, set *pDb to point to the db handle and return
|
||||||
@@ -195,7 +197,10 @@ static int SQLITE_TCLAPI test_sqlite3_expert_new(
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */
|
||||||
|
|
||||||
int TestExpert_Init(Tcl_Interp *interp){
|
int TestExpert_Init(Tcl_Interp *interp){
|
||||||
|
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||||
struct Cmd {
|
struct Cmd {
|
||||||
const char *zCmd;
|
const char *zCmd;
|
||||||
Tcl_ObjCmdProc *xProc;
|
Tcl_ObjCmdProc *xProc;
|
||||||
@@ -208,7 +213,7 @@ int TestExpert_Init(Tcl_Interp *interp){
|
|||||||
struct Cmd *p = &aCmd[i];
|
struct Cmd *p = &aCmd[i];
|
||||||
Tcl_CreateObjCommand(interp, p->zCmd, p->xProc, 0, 0);
|
Tcl_CreateObjCommand(interp, p->zCmd, p->xProc, 0, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -433,7 +433,7 @@ static int SQLITE_TCLAPI xF5tApi(
|
|||||||
int iVal;
|
int iVal;
|
||||||
int bClear;
|
int bClear;
|
||||||
if( Tcl_GetBooleanFromObj(interp, objv[2], &bClear) ) return TCL_ERROR;
|
if( Tcl_GetBooleanFromObj(interp, objv[2], &bClear) ) return TCL_ERROR;
|
||||||
iVal = ((char*)p->pApi->xGetAuxdata(p->pFts, bClear) - (char*)0);
|
iVal = (int)((char*)p->pApi->xGetAuxdata(p->pFts, bClear) - (char*)0);
|
||||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(iVal));
|
Tcl_SetObjResult(interp, Tcl_NewIntObj(iVal));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -482,7 +482,7 @@ static int SQLITE_TCLAPI xF5tApi(
|
|||||||
|
|
||||||
rc = p->pApi->xPhraseFirstColumn(p->pFts, iPhrase, &iter, &iCol);
|
rc = p->pApi->xPhraseFirstColumn(p->pFts, iPhrase, &iter, &iCol);
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK ){
|
||||||
Tcl_AppendResult(interp, sqlite3ErrName(rc), 0);
|
Tcl_SetResult(interp, (char*)sqlite3ErrName(rc), TCL_VOLATILE);
|
||||||
return TCL_ERROR;
|
return TCL_ERROR;
|
||||||
}
|
}
|
||||||
for( ; iCol>=0; p->pApi->xPhraseNextColumn(p->pFts, &iter, &iCol)){
|
for( ; iCol>=0; p->pApi->xPhraseNextColumn(p->pFts, &iter, &iCol)){
|
||||||
@@ -924,7 +924,7 @@ static int SQLITE_TCLAPI f5tTokenizerReturn(
|
|||||||
|
|
||||||
rc = p->xToken(p->pCtx, tflags, zToken, nToken, iStart, iEnd);
|
rc = p->xToken(p->pCtx, tflags, zToken, nToken, iStart, iEnd);
|
||||||
Tcl_SetResult(interp, (char*)sqlite3ErrName(rc), TCL_VOLATILE);
|
Tcl_SetResult(interp, (char*)sqlite3ErrName(rc), TCL_VOLATILE);
|
||||||
return TCL_OK;
|
return rc==SQLITE_OK ? TCL_OK : TCL_ERROR;
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
Tcl_WrongNumArgs(interp, 1, objv, "?-colocated? TEXT START END");
|
Tcl_WrongNumArgs(interp, 1, objv, "?-colocated? TEXT START END");
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ do_faultsim_test 5.2 -faults oom* -prep {
|
|||||||
SELECT rowid, mit(matchinfo(t1, 'x')) FROM t1 WHERE t1 MATCH 'a AND c'
|
SELECT rowid, mit(matchinfo(t1, 'x')) FROM t1 WHERE t1 MATCH 'a AND c'
|
||||||
}
|
}
|
||||||
} -test {
|
} -test {
|
||||||
faultsim_test_result [list 0 $::res]
|
faultsim_test_result [list 0 $::res] {1 {SQL logic error}}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_faultsim_test 5.3 -faults oom* -prep {
|
do_faultsim_test 5.3 -faults oom* -prep {
|
||||||
@@ -264,7 +264,7 @@ do_faultsim_test 5.3 -faults oom* -prep {
|
|||||||
SELECT count(*) FROM t1 WHERE t1 MATCH 'd AND e AND f'
|
SELECT count(*) FROM t1 WHERE t1 MATCH 'd AND e AND f'
|
||||||
}
|
}
|
||||||
} -test {
|
} -test {
|
||||||
faultsim_test_result {0 29}
|
faultsim_test_result {0 29} {1 {SQL logic error}}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_faultsim_test 5.4 -faults oom* -prep {
|
do_faultsim_test 5.4 -faults oom* -prep {
|
||||||
@@ -275,7 +275,7 @@ do_faultsim_test 5.4 -faults oom* -prep {
|
|||||||
SELECT count(*) FROM t1 WHERE t1 MATCH 'x + e'
|
SELECT count(*) FROM t1 WHERE t1 MATCH 'x + e'
|
||||||
}
|
}
|
||||||
} -test {
|
} -test {
|
||||||
faultsim_test_result {0 1}
|
faultsim_test_result {0 1} {1 {SQL logic error}}
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ ifcapable !fts5 {
|
|||||||
|
|
||||||
foreach_detail_mode $testprefix {
|
foreach_detail_mode $testprefix {
|
||||||
|
|
||||||
|
if {"%DETAIL%" != "none"} continue
|
||||||
|
|
||||||
fts5_aux_test_functions db
|
fts5_aux_test_functions db
|
||||||
|
|
||||||
do_execsql_test 1.0 {
|
do_execsql_test 1.0 {
|
||||||
@@ -98,14 +100,16 @@ do_faultsim_test 4.1 -faults oom-t* -body {
|
|||||||
execsql { SELECT rowid, fts5_test_collist(t4) FROM t4('2') }
|
execsql { SELECT rowid, fts5_test_collist(t4) FROM t4('2') }
|
||||||
} -test {
|
} -test {
|
||||||
faultsim_test_result \
|
faultsim_test_result \
|
||||||
{0 {1 {0.0 0.1 0.2} 2 {0.0 0.1 0.2} 3 {0.0 0.1 0.2}}} {1 SQLITE_NOMEM}
|
{0 {1 {0.0 0.1 0.2} 2 {0.0 0.1 0.2} 3 {0.0 0.1 0.2}}} \
|
||||||
|
{1 SQLITE_NOMEM} {1 SQLITE_ERROR} {1 {SQL logic error}}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_faultsim_test 4.2 -faults oom-t* -body {
|
do_faultsim_test 4.2 -faults oom-t* -body {
|
||||||
execsql { SELECT rowid, fts5_test_collist(t4) FROM t4('a5 OR b5 OR c5') }
|
execsql { SELECT rowid, fts5_test_collist(t4) FROM t4('a5 OR b5 OR c5') }
|
||||||
} -test {
|
} -test {
|
||||||
faultsim_test_result \
|
faultsim_test_result \
|
||||||
{0 {4 {0.0 0.1 0.2} 5 {1.0 1.1 1.2} 6 {2.0 2.1 2.2}}} {1 SQLITE_NOMEM}
|
{0 {4 {0.0 0.1 0.2} 5 {1.0 1.1 1.2} 6 {2.0 2.1 2.2}}} \
|
||||||
|
{1 SQLITE_NOMEM} {1 SQLITE_ERROR} {1 {SQL logic error}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ int test_mdb_scan(TestDb *, void *, int, void *, int, void *, int,
|
|||||||
*/
|
*/
|
||||||
int test_lsm_open(const char*, const char *zFile, int bClear, TestDb **ppDb);
|
int test_lsm_open(const char*, const char *zFile, int bClear, TestDb **ppDb);
|
||||||
int test_lsm_lomem_open(const char*, const char*, int bClear, TestDb **ppDb);
|
int test_lsm_lomem_open(const char*, const char*, int bClear, TestDb **ppDb);
|
||||||
|
int test_lsm_lomem2_open(const char*, const char*, int bClear, TestDb **ppDb);
|
||||||
int test_lsm_zip_open(const char*, const char*, int bClear, TestDb **ppDb);
|
int test_lsm_zip_open(const char*, const char*, int bClear, TestDb **ppDb);
|
||||||
int test_lsm_small_open(const char*, const char*, int bClear, TestDb **ppDb);
|
int test_lsm_small_open(const char*, const char*, int bClear, TestDb **ppDb);
|
||||||
int test_lsm_mt2(const char*, const char *zFile, int bClear, TestDb **ppDb);
|
int test_lsm_mt2(const char*, const char *zFile, int bClear, TestDb **ppDb);
|
||||||
|
|||||||
@@ -721,6 +721,7 @@ static struct Lib {
|
|||||||
{ "sqlite3", "testdb.sqlite", sql_open },
|
{ "sqlite3", "testdb.sqlite", sql_open },
|
||||||
{ "lsm_small", "testdb.lsm_small", test_lsm_small_open },
|
{ "lsm_small", "testdb.lsm_small", test_lsm_small_open },
|
||||||
{ "lsm_lomem", "testdb.lsm_lomem", test_lsm_lomem_open },
|
{ "lsm_lomem", "testdb.lsm_lomem", test_lsm_lomem_open },
|
||||||
|
{ "lsm_lomem2", "testdb.lsm_lomem2", test_lsm_lomem2_open },
|
||||||
#ifdef HAVE_ZLIB
|
#ifdef HAVE_ZLIB
|
||||||
{ "lsm_zip", "testdb.lsm_zip", test_lsm_zip_open },
|
{ "lsm_zip", "testdb.lsm_zip", test_lsm_zip_open },
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1033,6 +1033,19 @@ int test_lsm_lomem_open(
|
|||||||
return testLsmOpen(zCfg, zFilename, bClear, ppDb);
|
return testLsmOpen(zCfg, zFilename, bClear, ppDb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int test_lsm_lomem2_open(
|
||||||
|
const char *zSpec,
|
||||||
|
const char *zFilename,
|
||||||
|
int bClear,
|
||||||
|
TestDb **ppDb
|
||||||
|
){
|
||||||
|
/* "max_freelist=4 autocheckpoint=32" */
|
||||||
|
const char *zCfg =
|
||||||
|
"page_size=512 block_size=64 autoflush=0 mmap=0 "
|
||||||
|
;
|
||||||
|
return testLsmOpen(zCfg, zFilename, bClear, ppDb);
|
||||||
|
}
|
||||||
|
|
||||||
int test_lsm_zip_open(
|
int test_lsm_zip_open(
|
||||||
const char *zSpec,
|
const char *zSpec,
|
||||||
const char *zFilename,
|
const char *zFilename,
|
||||||
|
|||||||
+1
-1
@@ -683,7 +683,7 @@ static int doWriteOp(
|
|||||||
int nDiff;
|
int nDiff;
|
||||||
|
|
||||||
if( nQuant>pDb->nTreeLimit ){
|
if( nQuant>pDb->nTreeLimit ){
|
||||||
nQuant = pDb->nTreeLimit;
|
nQuant = LSM_MAX(pDb->nTreeLimit, pgsz);
|
||||||
}
|
}
|
||||||
|
|
||||||
nBefore = lsmTreeSize(pDb);
|
nBefore = lsmTreeSize(pDb);
|
||||||
|
|||||||
@@ -5252,16 +5252,15 @@ static int doLsmSingleWork(
|
|||||||
/* If the in-memory part of the free-list is too large, write a new
|
/* If the in-memory part of the free-list is too large, write a new
|
||||||
** top-level containing just the in-memory free-list entries to disk. */
|
** top-level containing just the in-memory free-list entries to disk. */
|
||||||
if( rc==LSM_OK && pDb->pWorker->freelist.nEntry > pDb->nMaxFreelist ){
|
if( rc==LSM_OK && pDb->pWorker->freelist.nEntry > pDb->nMaxFreelist ){
|
||||||
int nPg = 0;
|
|
||||||
while( rc==LSM_OK && lsmDatabaseFull(pDb) ){
|
while( rc==LSM_OK && lsmDatabaseFull(pDb) ){
|
||||||
|
int nPg = 0;
|
||||||
rc = sortedWork(pDb, 16, nMerge, 1, &nPg);
|
rc = sortedWork(pDb, 16, nMerge, 1, &nPg);
|
||||||
nRem -= nPg;
|
nRem -= nPg;
|
||||||
}
|
}
|
||||||
if( rc==LSM_OK ){
|
if( rc==LSM_OK ){
|
||||||
rc = sortedNewFreelistOnly(pDb);
|
rc = sortedNewFreelistOnly(pDb);
|
||||||
}
|
}
|
||||||
nRem -= nPg;
|
bDirty = 1;
|
||||||
if( nPg ) bDirty = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( rc==LSM_OK ){
|
if( rc==LSM_OK ){
|
||||||
|
|||||||
@@ -14,11 +14,20 @@ as follows:
|
|||||||
It is a good example of how to go about implementing a custom
|
It is a good example of how to go about implementing a custom
|
||||||
[table-valued function](https://www.sqlite.org/vtab.html#tabfunc2).
|
[table-valued function](https://www.sqlite.org/vtab.html#tabfunc2).
|
||||||
|
|
||||||
|
* **csv.c** — A [virtual table](https://sqlite.org/vtab.html)
|
||||||
|
for reading
|
||||||
|
[Comma-Separated-Value (CSV) files](https://en.wikipedia.org/wiki/Comma-separated_values).
|
||||||
|
|
||||||
* **dbdump.c** — This is not actually a loadable extension, but
|
* **dbdump.c** — This is not actually a loadable extension, but
|
||||||
rather a library that implements an approximate equivalent to the
|
rather a library that implements an approximate equivalent to the
|
||||||
".dump" command of the
|
".dump" command of the
|
||||||
[command-line shell](https://www.sqlite.org/cli.html).
|
[command-line shell](https://www.sqlite.org/cli.html).
|
||||||
|
|
||||||
|
* **json1.c** — Various SQL functions and table-valued functions
|
||||||
|
for processing JSON. This extension is already built into the
|
||||||
|
[SQLite amalgamation](https://sqlite.org/amalgamation.html). See
|
||||||
|
<https://sqlite.org/json1.html> for additional information.
|
||||||
|
|
||||||
* **memvfs.c** — This file implements a custom
|
* **memvfs.c** — This file implements a custom
|
||||||
[VFS](https://www.sqlite.org/vfs.html) that stores an entire database
|
[VFS](https://www.sqlite.org/vfs.html) that stores an entire database
|
||||||
file in a single block of RAM. It serves as a good example of how
|
file in a single block of RAM. It serves as a good example of how
|
||||||
@@ -38,3 +47,14 @@ as follows:
|
|||||||
on the source filename with digits removed, so if we used the name
|
on the source filename with digits removed, so if we used the name
|
||||||
"sha3.c" then the entry point would conflict with the prior "sha1.c"
|
"sha3.c" then the entry point would conflict with the prior "sha1.c"
|
||||||
extension.
|
extension.
|
||||||
|
|
||||||
|
* **unionvtab.c** — Implementation of the unionvtab and
|
||||||
|
[swarmvtab](https://sqlite.org/swarmvtab.html) virtual tables.
|
||||||
|
These virtual tables allow a single
|
||||||
|
large table to be spread out across multiple database files. In the
|
||||||
|
case of swarmvtab, the individual database files can be attached on
|
||||||
|
demand.
|
||||||
|
|
||||||
|
* **zipfile.c** — A [virtual table](https://sqlite.org/vtab.html)
|
||||||
|
that can read and write a
|
||||||
|
[ZIP archive](https://en.wikipedia.org/wiki/Zip_%28file_format%29).
|
||||||
|
|||||||
@@ -0,0 +1,565 @@
|
|||||||
|
/*
|
||||||
|
** 2017-10-20
|
||||||
|
**
|
||||||
|
** The author disclaims copyright to this source code. In place of
|
||||||
|
** a legal notice, here is a blessing:
|
||||||
|
**
|
||||||
|
** May you do good and not evil.
|
||||||
|
** May you find forgiveness for yourself and forgive others.
|
||||||
|
** May you share freely, never taking more than you give.
|
||||||
|
**
|
||||||
|
******************************************************************************
|
||||||
|
**
|
||||||
|
** This file implements a VFS shim that allows an SQLite database to be
|
||||||
|
** appended onto the end of some other file, such as an executable.
|
||||||
|
**
|
||||||
|
** A special record must appear at the end of the file that identifies the
|
||||||
|
** file as an appended database and provides an offset to page 1. For
|
||||||
|
** best performance page 1 should be located at a disk page boundary, though
|
||||||
|
** that is not required.
|
||||||
|
**
|
||||||
|
** When opening a database using this VFS, the connection might treat
|
||||||
|
** the file as an ordinary SQLite database, or it might treat is as a
|
||||||
|
** database appended onto some other file. Here are the rules:
|
||||||
|
**
|
||||||
|
** (1) When opening a new empty file, that file is treated as an ordinary
|
||||||
|
** database.
|
||||||
|
**
|
||||||
|
** (2) When opening a file that begins with the standard SQLite prefix
|
||||||
|
** string "SQLite format 3", that file is treated as an ordinary
|
||||||
|
** database.
|
||||||
|
**
|
||||||
|
** (3) When opening a file that ends with the appendvfs trailer string
|
||||||
|
** "Start-Of-SQLite3-NNNNNNNN" that file is treated as an appended
|
||||||
|
** database.
|
||||||
|
**
|
||||||
|
** (4) If none of the above apply and the SQLITE_OPEN_CREATE flag is
|
||||||
|
** set, then a new database is appended to the already existing file.
|
||||||
|
**
|
||||||
|
** (5) Otherwise, SQLITE_CANTOPEN is returned.
|
||||||
|
**
|
||||||
|
** To avoid unnecessary complications with the PENDING_BYTE, the size of
|
||||||
|
** the file containing the database is limited to 1GB. This VFS will refuse
|
||||||
|
** to read or write past the 1GB mark. This restriction might be lifted in
|
||||||
|
** future versions. For now, if you need a large database, then keep the
|
||||||
|
** database in a separate file.
|
||||||
|
**
|
||||||
|
** If the file being opened is not an appended database, then this shim is
|
||||||
|
** a pass-through into the default underlying VFS.
|
||||||
|
**/
|
||||||
|
#include "sqlite3ext.h"
|
||||||
|
SQLITE_EXTENSION_INIT1
|
||||||
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
/* The append mark at the end of the database is:
|
||||||
|
**
|
||||||
|
** Start-Of-SQLite3-NNNNNNNN
|
||||||
|
** 123456789 123456789 12345
|
||||||
|
**
|
||||||
|
** The NNNNNNNN represents a 64-bit big-endian unsigned integer which is
|
||||||
|
** the offset to page 1.
|
||||||
|
*/
|
||||||
|
#define APND_MARK_PREFIX "Start-Of-SQLite3-"
|
||||||
|
#define APND_MARK_PREFIX_SZ 17
|
||||||
|
#define APND_MARK_SIZE 25
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Maximum size of the combined prefix + database + append-mark. This
|
||||||
|
** must be less than 0x40000000 to avoid locking issues on Windows.
|
||||||
|
*/
|
||||||
|
#define APND_MAX_SIZE (65536*15259)
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Forward declaration of objects used by this utility
|
||||||
|
*/
|
||||||
|
typedef struct sqlite3_vfs ApndVfs;
|
||||||
|
typedef struct ApndFile ApndFile;
|
||||||
|
|
||||||
|
/* Access to a lower-level VFS that (might) implement dynamic loading,
|
||||||
|
** access to randomness, etc.
|
||||||
|
*/
|
||||||
|
#define ORIGVFS(p) ((sqlite3_vfs*)((p)->pAppData))
|
||||||
|
#define ORIGFILE(p) ((sqlite3_file*)(((ApndFile*)(p))+1))
|
||||||
|
|
||||||
|
/* An open file */
|
||||||
|
struct ApndFile {
|
||||||
|
sqlite3_file base; /* IO methods */
|
||||||
|
sqlite3_int64 iPgOne; /* File offset to page 1 */
|
||||||
|
sqlite3_int64 iMark; /* Start of the append-mark */
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Methods for ApndFile
|
||||||
|
*/
|
||||||
|
static int apndClose(sqlite3_file*);
|
||||||
|
static int apndRead(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
|
||||||
|
static int apndWrite(sqlite3_file*,const void*,int iAmt, sqlite3_int64 iOfst);
|
||||||
|
static int apndTruncate(sqlite3_file*, sqlite3_int64 size);
|
||||||
|
static int apndSync(sqlite3_file*, int flags);
|
||||||
|
static int apndFileSize(sqlite3_file*, sqlite3_int64 *pSize);
|
||||||
|
static int apndLock(sqlite3_file*, int);
|
||||||
|
static int apndUnlock(sqlite3_file*, int);
|
||||||
|
static int apndCheckReservedLock(sqlite3_file*, int *pResOut);
|
||||||
|
static int apndFileControl(sqlite3_file*, int op, void *pArg);
|
||||||
|
static int apndSectorSize(sqlite3_file*);
|
||||||
|
static int apndDeviceCharacteristics(sqlite3_file*);
|
||||||
|
static int apndShmMap(sqlite3_file*, int iPg, int pgsz, int, void volatile**);
|
||||||
|
static int apndShmLock(sqlite3_file*, int offset, int n, int flags);
|
||||||
|
static void apndShmBarrier(sqlite3_file*);
|
||||||
|
static int apndShmUnmap(sqlite3_file*, int deleteFlag);
|
||||||
|
static int apndFetch(sqlite3_file*, sqlite3_int64 iOfst, int iAmt, void **pp);
|
||||||
|
static int apndUnfetch(sqlite3_file*, sqlite3_int64 iOfst, void *p);
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Methods for ApndVfs
|
||||||
|
*/
|
||||||
|
static int apndOpen(sqlite3_vfs*, const char *, sqlite3_file*, int , int *);
|
||||||
|
static int apndDelete(sqlite3_vfs*, const char *zName, int syncDir);
|
||||||
|
static int apndAccess(sqlite3_vfs*, const char *zName, int flags, int *);
|
||||||
|
static int apndFullPathname(sqlite3_vfs*, const char *zName, int, char *zOut);
|
||||||
|
static void *apndDlOpen(sqlite3_vfs*, const char *zFilename);
|
||||||
|
static void apndDlError(sqlite3_vfs*, int nByte, char *zErrMsg);
|
||||||
|
static void (*apndDlSym(sqlite3_vfs *pVfs, void *p, const char*zSym))(void);
|
||||||
|
static void apndDlClose(sqlite3_vfs*, void*);
|
||||||
|
static int apndRandomness(sqlite3_vfs*, int nByte, char *zOut);
|
||||||
|
static int apndSleep(sqlite3_vfs*, int microseconds);
|
||||||
|
static int apndCurrentTime(sqlite3_vfs*, double*);
|
||||||
|
static int apndGetLastError(sqlite3_vfs*, int, char *);
|
||||||
|
static int apndCurrentTimeInt64(sqlite3_vfs*, sqlite3_int64*);
|
||||||
|
static int apndSetSystemCall(sqlite3_vfs*, const char*,sqlite3_syscall_ptr);
|
||||||
|
static sqlite3_syscall_ptr apndGetSystemCall(sqlite3_vfs*, const char *z);
|
||||||
|
static const char *apndNextSystemCall(sqlite3_vfs*, const char *zName);
|
||||||
|
|
||||||
|
static sqlite3_vfs apnd_vfs = {
|
||||||
|
3, /* iVersion (set when registered) */
|
||||||
|
0, /* szOsFile (set when registered) */
|
||||||
|
1024, /* mxPathname */
|
||||||
|
0, /* pNext */
|
||||||
|
"apndvfs", /* zName */
|
||||||
|
0, /* pAppData (set when registered) */
|
||||||
|
apndOpen, /* xOpen */
|
||||||
|
apndDelete, /* xDelete */
|
||||||
|
apndAccess, /* xAccess */
|
||||||
|
apndFullPathname, /* xFullPathname */
|
||||||
|
apndDlOpen, /* xDlOpen */
|
||||||
|
apndDlError, /* xDlError */
|
||||||
|
apndDlSym, /* xDlSym */
|
||||||
|
apndDlClose, /* xDlClose */
|
||||||
|
apndRandomness, /* xRandomness */
|
||||||
|
apndSleep, /* xSleep */
|
||||||
|
apndCurrentTime, /* xCurrentTime */
|
||||||
|
apndGetLastError, /* xGetLastError */
|
||||||
|
apndCurrentTimeInt64, /* xCurrentTimeInt64 */
|
||||||
|
apndSetSystemCall, /* xSetSystemCall */
|
||||||
|
apndGetSystemCall, /* xGetSystemCall */
|
||||||
|
apndNextSystemCall /* xNextSystemCall */
|
||||||
|
};
|
||||||
|
|
||||||
|
static const sqlite3_io_methods apnd_io_methods = {
|
||||||
|
3, /* iVersion */
|
||||||
|
apndClose, /* xClose */
|
||||||
|
apndRead, /* xRead */
|
||||||
|
apndWrite, /* xWrite */
|
||||||
|
apndTruncate, /* xTruncate */
|
||||||
|
apndSync, /* xSync */
|
||||||
|
apndFileSize, /* xFileSize */
|
||||||
|
apndLock, /* xLock */
|
||||||
|
apndUnlock, /* xUnlock */
|
||||||
|
apndCheckReservedLock, /* xCheckReservedLock */
|
||||||
|
apndFileControl, /* xFileControl */
|
||||||
|
apndSectorSize, /* xSectorSize */
|
||||||
|
apndDeviceCharacteristics, /* xDeviceCharacteristics */
|
||||||
|
apndShmMap, /* xShmMap */
|
||||||
|
apndShmLock, /* xShmLock */
|
||||||
|
apndShmBarrier, /* xShmBarrier */
|
||||||
|
apndShmUnmap, /* xShmUnmap */
|
||||||
|
apndFetch, /* xFetch */
|
||||||
|
apndUnfetch /* xUnfetch */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Close an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndClose(sqlite3_file *pFile){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xClose(pFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Read data from an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndRead(
|
||||||
|
sqlite3_file *pFile,
|
||||||
|
void *zBuf,
|
||||||
|
int iAmt,
|
||||||
|
sqlite_int64 iOfst
|
||||||
|
){
|
||||||
|
ApndFile *p = (ApndFile *)pFile;
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xRead(pFile, zBuf, iAmt, iOfst+p->iPgOne);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Add the append-mark onto the end of the file.
|
||||||
|
*/
|
||||||
|
static int apndWriteMark(ApndFile *p, sqlite3_file *pFile){
|
||||||
|
int i;
|
||||||
|
unsigned char a[APND_MARK_SIZE];
|
||||||
|
memcpy(a, APND_MARK_PREFIX, APND_MARK_PREFIX_SZ);
|
||||||
|
for(i=0; i<8; i++){
|
||||||
|
a[APND_MARK_PREFIX_SZ+i] = (p->iPgOne >> (56 - i*8)) & 0xff;
|
||||||
|
}
|
||||||
|
return pFile->pMethods->xWrite(pFile, a, APND_MARK_SIZE, p->iMark);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Write data to an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndWrite(
|
||||||
|
sqlite3_file *pFile,
|
||||||
|
const void *zBuf,
|
||||||
|
int iAmt,
|
||||||
|
sqlite_int64 iOfst
|
||||||
|
){
|
||||||
|
int rc;
|
||||||
|
ApndFile *p = (ApndFile *)pFile;
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
if( iOfst+iAmt>=APND_MAX_SIZE ) return SQLITE_FULL;
|
||||||
|
rc = pFile->pMethods->xWrite(pFile, zBuf, iAmt, iOfst+p->iPgOne);
|
||||||
|
if( rc==SQLITE_OK && iOfst + iAmt + p->iPgOne > p->iMark ){
|
||||||
|
sqlite3_int64 sz = 0;
|
||||||
|
rc = pFile->pMethods->xFileSize(pFile, &sz);
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
p->iMark = sz - APND_MARK_SIZE;
|
||||||
|
if( iOfst + iAmt + p->iPgOne > p->iMark ){
|
||||||
|
p->iMark = p->iPgOne + iOfst + iAmt;
|
||||||
|
rc = apndWriteMark(p, pFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Truncate an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndTruncate(sqlite3_file *pFile, sqlite_int64 size){
|
||||||
|
int rc;
|
||||||
|
ApndFile *p = (ApndFile *)pFile;
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
rc = pFile->pMethods->xTruncate(pFile, size+p->iPgOne+APND_MARK_SIZE);
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
p->iMark = p->iPgOne+size;
|
||||||
|
rc = apndWriteMark(p, pFile);
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Sync an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndSync(sqlite3_file *pFile, int flags){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xSync(pFile, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Return the current file-size of an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndFileSize(sqlite3_file *pFile, sqlite_int64 *pSize){
|
||||||
|
ApndFile *p = (ApndFile *)pFile;
|
||||||
|
int rc;
|
||||||
|
pFile = ORIGFILE(p);
|
||||||
|
rc = pFile->pMethods->xFileSize(pFile, pSize);
|
||||||
|
if( rc==SQLITE_OK && p->iPgOne ){
|
||||||
|
*pSize -= p->iPgOne + APND_MARK_SIZE;
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Lock an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndLock(sqlite3_file *pFile, int eLock){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xLock(pFile, eLock);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Unlock an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndUnlock(sqlite3_file *pFile, int eLock){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xUnlock(pFile, eLock);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Check if another file-handle holds a RESERVED lock on an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndCheckReservedLock(sqlite3_file *pFile, int *pResOut){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xCheckReservedLock(pFile, pResOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** File control method. For custom operations on an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndFileControl(sqlite3_file *pFile, int op, void *pArg){
|
||||||
|
ApndFile *p = (ApndFile *)pFile;
|
||||||
|
int rc;
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
rc = pFile->pMethods->xFileControl(pFile, op, pArg);
|
||||||
|
if( rc==SQLITE_OK && op==SQLITE_FCNTL_VFSNAME ){
|
||||||
|
*(char**)pArg = sqlite3_mprintf("apnd(%lld)/%z", p->iPgOne, *(char**)pArg);
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Return the sector-size in bytes for an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndSectorSize(sqlite3_file *pFile){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xSectorSize(pFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Return the device characteristic flags supported by an apnd-file.
|
||||||
|
*/
|
||||||
|
static int apndDeviceCharacteristics(sqlite3_file *pFile){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xDeviceCharacteristics(pFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create a shared memory file mapping */
|
||||||
|
static int apndShmMap(
|
||||||
|
sqlite3_file *pFile,
|
||||||
|
int iPg,
|
||||||
|
int pgsz,
|
||||||
|
int bExtend,
|
||||||
|
void volatile **pp
|
||||||
|
){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xShmMap(pFile,iPg,pgsz,bExtend,pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform locking on a shared-memory segment */
|
||||||
|
static int apndShmLock(sqlite3_file *pFile, int offset, int n, int flags){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xShmLock(pFile,offset,n,flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Memory barrier operation on shared memory */
|
||||||
|
static void apndShmBarrier(sqlite3_file *pFile){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
pFile->pMethods->xShmBarrier(pFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Unmap a shared memory segment */
|
||||||
|
static int apndShmUnmap(sqlite3_file *pFile, int deleteFlag){
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xShmUnmap(pFile,deleteFlag);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fetch a page of a memory-mapped file */
|
||||||
|
static int apndFetch(
|
||||||
|
sqlite3_file *pFile,
|
||||||
|
sqlite3_int64 iOfst,
|
||||||
|
int iAmt,
|
||||||
|
void **pp
|
||||||
|
){
|
||||||
|
ApndFile *p = (ApndFile *)pFile;
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xFetch(pFile, iOfst+p->iPgOne, iAmt, pp);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Release a memory-mapped page */
|
||||||
|
static int apndUnfetch(sqlite3_file *pFile, sqlite3_int64 iOfst, void *pPage){
|
||||||
|
ApndFile *p = (ApndFile *)pFile;
|
||||||
|
pFile = ORIGFILE(pFile);
|
||||||
|
return pFile->pMethods->xUnfetch(pFile, iOfst+p->iPgOne, pPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Check to see if the file is an ordinary SQLite database file.
|
||||||
|
*/
|
||||||
|
static int apndIsOrdinaryDatabaseFile(sqlite3_int64 sz, sqlite3_file *pFile){
|
||||||
|
int rc;
|
||||||
|
char zHdr[16];
|
||||||
|
static const char aSqliteHdr[] = "SQLite format 3";
|
||||||
|
if( sz<512 ) return 0;
|
||||||
|
rc = pFile->pMethods->xRead(pFile, zHdr, sizeof(zHdr), 0);
|
||||||
|
if( rc ) return 0;
|
||||||
|
return memcmp(zHdr, aSqliteHdr, sizeof(zHdr))==0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Try to read the append-mark off the end of a file. Return the
|
||||||
|
** start of the appended database if the append-mark is present. If
|
||||||
|
** there is no append-mark, return -1;
|
||||||
|
*/
|
||||||
|
static sqlite3_int64 apndReadMark(sqlite3_int64 sz, sqlite3_file *pFile){
|
||||||
|
int rc, i;
|
||||||
|
sqlite3_int64 iMark;
|
||||||
|
unsigned char a[APND_MARK_SIZE];
|
||||||
|
|
||||||
|
if( sz<=APND_MARK_SIZE ) return -1;
|
||||||
|
rc = pFile->pMethods->xRead(pFile, a, APND_MARK_SIZE, sz-APND_MARK_SIZE);
|
||||||
|
if( rc ) return -1;
|
||||||
|
if( memcmp(a, APND_MARK_PREFIX, APND_MARK_PREFIX_SZ)!=0 ) return -1;
|
||||||
|
iMark = ((sqlite3_int64)(a[APND_MARK_PREFIX_SZ]&0x7f))<<56;
|
||||||
|
for(i=1; i<8; i++){
|
||||||
|
iMark += (sqlite3_int64)a[APND_MARK_PREFIX_SZ+i]<<(56-8*i);
|
||||||
|
}
|
||||||
|
return iMark;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Open an apnd file handle.
|
||||||
|
*/
|
||||||
|
static int apndOpen(
|
||||||
|
sqlite3_vfs *pVfs,
|
||||||
|
const char *zName,
|
||||||
|
sqlite3_file *pFile,
|
||||||
|
int flags,
|
||||||
|
int *pOutFlags
|
||||||
|
){
|
||||||
|
ApndFile *p;
|
||||||
|
sqlite3_file *pSubFile;
|
||||||
|
sqlite3_vfs *pSubVfs;
|
||||||
|
int rc;
|
||||||
|
sqlite3_int64 sz;
|
||||||
|
pSubVfs = ORIGVFS(pVfs);
|
||||||
|
if( (flags & SQLITE_OPEN_MAIN_DB)==0 ){
|
||||||
|
return pSubVfs->xOpen(pSubVfs, zName, pFile, flags, pOutFlags);
|
||||||
|
}
|
||||||
|
p = (ApndFile*)pFile;
|
||||||
|
memset(p, 0, sizeof(*p));
|
||||||
|
pSubFile = ORIGFILE(pFile);
|
||||||
|
p->base.pMethods = &apnd_io_methods;
|
||||||
|
rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
|
||||||
|
if( rc ) goto apnd_open_done;
|
||||||
|
rc = pSubFile->pMethods->xFileSize(pSubFile, &sz);
|
||||||
|
if( rc ){
|
||||||
|
pSubFile->pMethods->xClose(pSubFile);
|
||||||
|
goto apnd_open_done;
|
||||||
|
}
|
||||||
|
if( apndIsOrdinaryDatabaseFile(sz, pSubFile) ){
|
||||||
|
memmove(pFile, pSubFile, pSubVfs->szOsFile);
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
p->iMark = 0;
|
||||||
|
p->iPgOne = apndReadMark(sz, pFile);
|
||||||
|
if( p->iPgOne>0 ){
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
if( (flags & SQLITE_OPEN_CREATE)==0 ){
|
||||||
|
pSubFile->pMethods->xClose(pSubFile);
|
||||||
|
rc = SQLITE_CANTOPEN;
|
||||||
|
}
|
||||||
|
p->iPgOne = (sz+0xfff) & ~(sqlite3_int64)0xfff;
|
||||||
|
apnd_open_done:
|
||||||
|
if( rc ) pFile->pMethods = 0;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** All other VFS methods are pass-thrus.
|
||||||
|
*/
|
||||||
|
static int apndDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){
|
||||||
|
return ORIGVFS(pVfs)->xDelete(ORIGVFS(pVfs), zPath, dirSync);
|
||||||
|
}
|
||||||
|
static int apndAccess(
|
||||||
|
sqlite3_vfs *pVfs,
|
||||||
|
const char *zPath,
|
||||||
|
int flags,
|
||||||
|
int *pResOut
|
||||||
|
){
|
||||||
|
return ORIGVFS(pVfs)->xAccess(ORIGVFS(pVfs), zPath, flags, pResOut);
|
||||||
|
}
|
||||||
|
static int apndFullPathname(
|
||||||
|
sqlite3_vfs *pVfs,
|
||||||
|
const char *zPath,
|
||||||
|
int nOut,
|
||||||
|
char *zOut
|
||||||
|
){
|
||||||
|
return ORIGVFS(pVfs)->xFullPathname(ORIGVFS(pVfs),zPath,nOut,zOut);
|
||||||
|
}
|
||||||
|
static void *apndDlOpen(sqlite3_vfs *pVfs, const char *zPath){
|
||||||
|
return ORIGVFS(pVfs)->xDlOpen(ORIGVFS(pVfs), zPath);
|
||||||
|
}
|
||||||
|
static void apndDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){
|
||||||
|
ORIGVFS(pVfs)->xDlError(ORIGVFS(pVfs), nByte, zErrMsg);
|
||||||
|
}
|
||||||
|
static void (*apndDlSym(sqlite3_vfs *pVfs, void *p, const char *zSym))(void){
|
||||||
|
return ORIGVFS(pVfs)->xDlSym(ORIGVFS(pVfs), p, zSym);
|
||||||
|
}
|
||||||
|
static void apndDlClose(sqlite3_vfs *pVfs, void *pHandle){
|
||||||
|
ORIGVFS(pVfs)->xDlClose(ORIGVFS(pVfs), pHandle);
|
||||||
|
}
|
||||||
|
static int apndRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
|
||||||
|
return ORIGVFS(pVfs)->xRandomness(ORIGVFS(pVfs), nByte, zBufOut);
|
||||||
|
}
|
||||||
|
static int apndSleep(sqlite3_vfs *pVfs, int nMicro){
|
||||||
|
return ORIGVFS(pVfs)->xSleep(ORIGVFS(pVfs), nMicro);
|
||||||
|
}
|
||||||
|
static int apndCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){
|
||||||
|
return ORIGVFS(pVfs)->xCurrentTime(ORIGVFS(pVfs), pTimeOut);
|
||||||
|
}
|
||||||
|
static int apndGetLastError(sqlite3_vfs *pVfs, int a, char *b){
|
||||||
|
return ORIGVFS(pVfs)->xGetLastError(ORIGVFS(pVfs), a, b);
|
||||||
|
}
|
||||||
|
static int apndCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *p){
|
||||||
|
return ORIGVFS(pVfs)->xCurrentTimeInt64(ORIGVFS(pVfs), p);
|
||||||
|
}
|
||||||
|
static int apndSetSystemCall(
|
||||||
|
sqlite3_vfs *pVfs,
|
||||||
|
const char *zName,
|
||||||
|
sqlite3_syscall_ptr pCall
|
||||||
|
){
|
||||||
|
return ORIGVFS(pVfs)->xSetSystemCall(ORIGVFS(pVfs),zName,pCall);
|
||||||
|
}
|
||||||
|
static sqlite3_syscall_ptr apndGetSystemCall(
|
||||||
|
sqlite3_vfs *pVfs,
|
||||||
|
const char *zName
|
||||||
|
){
|
||||||
|
return ORIGVFS(pVfs)->xGetSystemCall(ORIGVFS(pVfs),zName);
|
||||||
|
}
|
||||||
|
static const char *apndNextSystemCall(sqlite3_vfs *pVfs, const char *zName){
|
||||||
|
return ORIGVFS(pVfs)->xNextSystemCall(ORIGVFS(pVfs), zName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
__declspec(dllexport)
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
** This routine is called when the extension is loaded.
|
||||||
|
** Register the new VFS.
|
||||||
|
*/
|
||||||
|
int sqlite3_appendvfs_init(
|
||||||
|
sqlite3 *db,
|
||||||
|
char **pzErrMsg,
|
||||||
|
const sqlite3_api_routines *pApi
|
||||||
|
){
|
||||||
|
int rc = SQLITE_OK;
|
||||||
|
sqlite3_vfs *pOrig;
|
||||||
|
SQLITE_EXTENSION_INIT2(pApi);
|
||||||
|
(void)pzErrMsg;
|
||||||
|
(void)db;
|
||||||
|
pOrig = sqlite3_vfs_find(0);
|
||||||
|
apnd_vfs.iVersion = pOrig->iVersion;
|
||||||
|
apnd_vfs.pAppData = pOrig;
|
||||||
|
apnd_vfs.szOsFile = pOrig->szOsFile + sizeof(ApndFile);
|
||||||
|
rc = sqlite3_vfs_register(&apnd_vfs, 0);
|
||||||
|
#ifdef APPENDVFS_TEST
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = sqlite3_auto_extension((void(*)(void))apndvfsRegister);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if( rc==SQLITE_OK ) rc = SQLITE_OK_LOAD_PERMANENTLY;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
@@ -339,7 +339,8 @@ static int binfoColumn(
|
|||||||
sqlite3 *db = sqlite3_context_db_handle(ctx);
|
sqlite3 *db = sqlite3_context_db_handle(ctx);
|
||||||
int rc = binfoCompute(db, pgno, pCsr);
|
int rc = binfoCompute(db, pgno, pCsr);
|
||||||
if( rc ){
|
if( rc ){
|
||||||
return rc;
|
pCursor->pVtab->zErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(db));
|
||||||
|
return SQLITE_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch( i ){
|
switch( i ){
|
||||||
|
|||||||
@@ -27,6 +27,21 @@ SQLITE_EXTENSION_INIT1
|
|||||||
** seven bits per integer stored in the lower seven bits of each byte.
|
** seven bits per integer stored in the lower seven bits of each byte.
|
||||||
** More significant bits occur first. The most significant bit (0x80)
|
** More significant bits occur first. The most significant bit (0x80)
|
||||||
** is a flag to indicate the end of the integer.
|
** is a flag to indicate the end of the integer.
|
||||||
|
**
|
||||||
|
** This function, SQLAR, and ZIP all use the same "deflate" compression
|
||||||
|
** algorithm, but each is subtly different:
|
||||||
|
**
|
||||||
|
** * ZIP uses raw deflate.
|
||||||
|
**
|
||||||
|
** * SQLAR uses the "zlib format" which is raw deflate with a two-byte
|
||||||
|
** algorithm-identification header and a four-byte checksum at the end.
|
||||||
|
**
|
||||||
|
** * This utility uses the "zlib format" like SQLAR, but adds the variable-
|
||||||
|
** length integer uncompressed size value at the beginning.
|
||||||
|
**
|
||||||
|
** This function might be extended in the future to support compression
|
||||||
|
** formats other than deflate, by providing a different algorithm-id
|
||||||
|
** mark following the variable-length integer size parameter.
|
||||||
*/
|
*/
|
||||||
static void compressFunc(
|
static void compressFunc(
|
||||||
sqlite3_context *context,
|
sqlite3_context *context,
|
||||||
|
|||||||
+761
-35
@@ -11,11 +11,122 @@
|
|||||||
******************************************************************************
|
******************************************************************************
|
||||||
**
|
**
|
||||||
** This SQLite extension implements SQL functions readfile() and
|
** This SQLite extension implements SQL functions readfile() and
|
||||||
** writefile().
|
** writefile(), and eponymous virtual type "fsdir".
|
||||||
|
**
|
||||||
|
** WRITEFILE(FILE, DATA [, MODE [, MTIME]]):
|
||||||
|
**
|
||||||
|
** If neither of the optional arguments is present, then this UDF
|
||||||
|
** function writes blob DATA to file FILE. If successful, the number
|
||||||
|
** of bytes written is returned. If an error occurs, NULL is returned.
|
||||||
|
**
|
||||||
|
** If the first option argument - MODE - is present, then it must
|
||||||
|
** be passed an integer value that corresponds to a POSIX mode
|
||||||
|
** value (file type + permissions, as returned in the stat.st_mode
|
||||||
|
** field by the stat() system call). Three types of files may
|
||||||
|
** be written/created:
|
||||||
|
**
|
||||||
|
** regular files: (mode & 0170000)==0100000
|
||||||
|
** symbolic links: (mode & 0170000)==0120000
|
||||||
|
** directories: (mode & 0170000)==0040000
|
||||||
|
**
|
||||||
|
** For a directory, the DATA is ignored. For a symbolic link, it is
|
||||||
|
** interpreted as text and used as the target of the link. For a
|
||||||
|
** regular file, it is interpreted as a blob and written into the
|
||||||
|
** named file. Regardless of the type of file, its permissions are
|
||||||
|
** set to (mode & 0777) before returning.
|
||||||
|
**
|
||||||
|
** If the optional MTIME argument is present, then it is interpreted
|
||||||
|
** as an integer - the number of seconds since the unix epoch. The
|
||||||
|
** modification-time of the target file is set to this value before
|
||||||
|
** returning.
|
||||||
|
**
|
||||||
|
** If three or more arguments are passed to this function and an
|
||||||
|
** error is encountered, an exception is raised.
|
||||||
|
**
|
||||||
|
** READFILE(FILE):
|
||||||
|
**
|
||||||
|
** Read and return the contents of file FILE (type blob) from disk.
|
||||||
|
**
|
||||||
|
** FSDIR:
|
||||||
|
**
|
||||||
|
** Used as follows:
|
||||||
|
**
|
||||||
|
** SELECT * FROM fsdir($path [, $dir]);
|
||||||
|
**
|
||||||
|
** Parameter $path is an absolute or relative pathname. If the file that it
|
||||||
|
** refers to does not exist, it is an error. If the path refers to a regular
|
||||||
|
** file or symbolic link, it returns a single row. Or, if the path refers
|
||||||
|
** to a directory, it returns one row for the directory, and one row for each
|
||||||
|
** file within the hierarchy rooted at $path.
|
||||||
|
**
|
||||||
|
** Each row has the following columns:
|
||||||
|
**
|
||||||
|
** name: Path to file or directory (text value).
|
||||||
|
** mode: Value of stat.st_mode for directory entry (an integer).
|
||||||
|
** mtime: Value of stat.st_mtime for directory entry (an integer).
|
||||||
|
** data: For a regular file, a blob containing the file data. For a
|
||||||
|
** symlink, a text value containing the text of the link. For a
|
||||||
|
** directory, NULL.
|
||||||
|
**
|
||||||
|
** If a non-NULL value is specified for the optional $dir parameter and
|
||||||
|
** $path is a relative path, then $path is interpreted relative to $dir.
|
||||||
|
** And the paths returned in the "name" column of the table are also
|
||||||
|
** relative to directory $dir.
|
||||||
*/
|
*/
|
||||||
#include "sqlite3ext.h"
|
#include "sqlite3ext.h"
|
||||||
SQLITE_EXTENSION_INIT1
|
SQLITE_EXTENSION_INIT1
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#if !defined(_WIN32) && !defined(WIN32)
|
||||||
|
# include <unistd.h>
|
||||||
|
# include <dirent.h>
|
||||||
|
# include <utime.h>
|
||||||
|
# include <sys/time.h>
|
||||||
|
#else
|
||||||
|
# include "windows.h"
|
||||||
|
# include <io.h>
|
||||||
|
# include <direct.h>
|
||||||
|
# include "test_windirent.h"
|
||||||
|
# define dirent DIRENT
|
||||||
|
# ifndef stat
|
||||||
|
# define stat _stat
|
||||||
|
# endif
|
||||||
|
# define mkdir(path,mode) _mkdir(path)
|
||||||
|
# define lstat(path,buf) stat(path,buf)
|
||||||
|
#endif
|
||||||
|
#include <time.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
||||||
|
#define FSDIR_SCHEMA "(name,mode,mtime,data,path HIDDEN,dir HIDDEN)"
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Set the result stored by context ctx to a blob containing the
|
||||||
|
** contents of file zName.
|
||||||
|
*/
|
||||||
|
static void readFileContents(sqlite3_context *ctx, const char *zName){
|
||||||
|
FILE *in;
|
||||||
|
long nIn;
|
||||||
|
void *pBuf;
|
||||||
|
|
||||||
|
in = fopen(zName, "rb");
|
||||||
|
if( in==0 ) return;
|
||||||
|
fseek(in, 0, SEEK_END);
|
||||||
|
nIn = ftell(in);
|
||||||
|
rewind(in);
|
||||||
|
pBuf = sqlite3_malloc( nIn );
|
||||||
|
if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
|
||||||
|
sqlite3_result_blob(ctx, pBuf, nIn, sqlite3_free);
|
||||||
|
}else{
|
||||||
|
sqlite3_free(pBuf);
|
||||||
|
}
|
||||||
|
fclose(in);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Implementation of the "readfile(X)" SQL function. The entire content
|
** Implementation of the "readfile(X)" SQL function. The entire content
|
||||||
@@ -28,58 +139,666 @@ static void readfileFunc(
|
|||||||
sqlite3_value **argv
|
sqlite3_value **argv
|
||||||
){
|
){
|
||||||
const char *zName;
|
const char *zName;
|
||||||
FILE *in;
|
|
||||||
long nIn;
|
|
||||||
void *pBuf;
|
|
||||||
|
|
||||||
(void)(argc); /* Unused parameter */
|
(void)(argc); /* Unused parameter */
|
||||||
zName = (const char*)sqlite3_value_text(argv[0]);
|
zName = (const char*)sqlite3_value_text(argv[0]);
|
||||||
if( zName==0 ) return;
|
if( zName==0 ) return;
|
||||||
in = fopen(zName, "rb");
|
readFileContents(context, zName);
|
||||||
if( in==0 ) return;
|
|
||||||
fseek(in, 0, SEEK_END);
|
|
||||||
nIn = ftell(in);
|
|
||||||
rewind(in);
|
|
||||||
pBuf = sqlite3_malloc( nIn );
|
|
||||||
if( pBuf && 1==fread(pBuf, nIn, 1, in) ){
|
|
||||||
sqlite3_result_blob(context, pBuf, nIn, sqlite3_free);
|
|
||||||
}else{
|
|
||||||
sqlite3_free(pBuf);
|
|
||||||
}
|
|
||||||
fclose(in);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Implementation of the "writefile(X,Y)" SQL function. The argument Y
|
** Set the error message contained in context ctx to the results of
|
||||||
** is written into file X. The number of bytes written is returned. Or
|
** vprintf(zFmt, ...).
|
||||||
** NULL is returned if something goes wrong, such as being unable to open
|
*/
|
||||||
** file X for writing.
|
static void ctxErrorMsg(sqlite3_context *ctx, const char *zFmt, ...){
|
||||||
|
char *zMsg = 0;
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, zFmt);
|
||||||
|
zMsg = sqlite3_vmprintf(zFmt, ap);
|
||||||
|
sqlite3_result_error(ctx, zMsg, -1);
|
||||||
|
sqlite3_free(zMsg);
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Argument zFile is the name of a file that will be created and/or written
|
||||||
|
** by SQL function writefile(). This function ensures that the directory
|
||||||
|
** zFile will be written to exists, creating it if required. The permissions
|
||||||
|
** for any path components created by this function are set to (mode&0777).
|
||||||
|
**
|
||||||
|
** If an OOM condition is encountered, SQLITE_NOMEM is returned. Otherwise,
|
||||||
|
** SQLITE_OK is returned if the directory is successfully created, or
|
||||||
|
** SQLITE_ERROR otherwise.
|
||||||
|
*/
|
||||||
|
static int makeDirectory(
|
||||||
|
const char *zFile,
|
||||||
|
mode_t mode
|
||||||
|
){
|
||||||
|
char *zCopy = sqlite3_mprintf("%s", zFile);
|
||||||
|
int rc = SQLITE_OK;
|
||||||
|
|
||||||
|
if( zCopy==0 ){
|
||||||
|
rc = SQLITE_NOMEM;
|
||||||
|
}else{
|
||||||
|
int nCopy = (int)strlen(zCopy);
|
||||||
|
int i = 1;
|
||||||
|
|
||||||
|
while( rc==SQLITE_OK ){
|
||||||
|
struct stat sStat;
|
||||||
|
int rc2;
|
||||||
|
|
||||||
|
for(; zCopy[i]!='/' && i<nCopy; i++);
|
||||||
|
if( i==nCopy ) break;
|
||||||
|
zCopy[i] = '\0';
|
||||||
|
|
||||||
|
rc2 = stat(zCopy, &sStat);
|
||||||
|
if( rc2!=0 ){
|
||||||
|
if( mkdir(zCopy, mode & 0777) ) rc = SQLITE_ERROR;
|
||||||
|
}else{
|
||||||
|
if( !S_ISDIR(sStat.st_mode) ) rc = SQLITE_ERROR;
|
||||||
|
}
|
||||||
|
zCopy[i] = '/';
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlite3_free(zCopy);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** This function does the work for the writefile() UDF. Refer to
|
||||||
|
** header comments at the top of this file for details.
|
||||||
|
*/
|
||||||
|
static int writeFile(
|
||||||
|
sqlite3_context *pCtx, /* Context to return bytes written in */
|
||||||
|
const char *zFile, /* File to write */
|
||||||
|
sqlite3_value *pData, /* Data to write */
|
||||||
|
mode_t mode, /* MODE parameter passed to writefile() */
|
||||||
|
sqlite3_int64 mtime /* MTIME parameter (or -1 to not set time) */
|
||||||
|
){
|
||||||
|
#if !defined(_WIN32) && !defined(WIN32)
|
||||||
|
if( S_ISLNK(mode) ){
|
||||||
|
const char *zTo = (const char*)sqlite3_value_text(pData);
|
||||||
|
if( symlink(zTo, zFile)<0 ) return 1;
|
||||||
|
}else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
if( S_ISDIR(mode) ){
|
||||||
|
if( mkdir(zFile, mode) ){
|
||||||
|
/* The mkdir() call to create the directory failed. This might not
|
||||||
|
** be an error though - if there is already a directory at the same
|
||||||
|
** path and either the permissions already match or can be changed
|
||||||
|
** to do so using chmod(), it is not an error. */
|
||||||
|
struct stat sStat;
|
||||||
|
if( errno!=EEXIST
|
||||||
|
|| 0!=stat(zFile, &sStat)
|
||||||
|
|| !S_ISDIR(sStat.st_mode)
|
||||||
|
|| ((sStat.st_mode&0777)!=(mode&0777) && 0!=chmod(zFile, mode&0777))
|
||||||
|
){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
sqlite3_int64 nWrite = 0;
|
||||||
|
const char *z;
|
||||||
|
int rc = 0;
|
||||||
|
FILE *out = fopen(zFile, "wb");
|
||||||
|
if( out==0 ) return 1;
|
||||||
|
z = (const char*)sqlite3_value_blob(pData);
|
||||||
|
if( z ){
|
||||||
|
sqlite3_int64 n = fwrite(z, 1, sqlite3_value_bytes(pData), out);
|
||||||
|
nWrite = sqlite3_value_bytes(pData);
|
||||||
|
if( nWrite!=n ){
|
||||||
|
rc = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(out);
|
||||||
|
if( rc==0 && mode && chmod(zFile, mode & 0777) ){
|
||||||
|
rc = 1;
|
||||||
|
}
|
||||||
|
if( rc ) return 2;
|
||||||
|
sqlite3_result_int64(pCtx, nWrite);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( mtime>=0 ){
|
||||||
|
#if defined(_WIN32)
|
||||||
|
/* Windows */
|
||||||
|
FILETIME lastAccess;
|
||||||
|
FILETIME lastWrite;
|
||||||
|
SYSTEMTIME currentTime;
|
||||||
|
LONGLONG intervals;
|
||||||
|
HANDLE hFile;
|
||||||
|
LPWSTR zUnicodeName;
|
||||||
|
extern LPWSTR sqlite3_win32_utf8_to_unicode(const char*);
|
||||||
|
|
||||||
|
GetSystemTime(¤tTime);
|
||||||
|
SystemTimeToFileTime(¤tTime, &lastAccess);
|
||||||
|
intervals = Int32x32To64(mtime, 10000000) + 116444736000000000;
|
||||||
|
lastWrite.dwLowDateTime = (DWORD)intervals;
|
||||||
|
lastWrite.dwHighDateTime = intervals >> 32;
|
||||||
|
zUnicodeName = sqlite3_win32_utf8_to_unicode(zFile);
|
||||||
|
hFile = CreateFileW(
|
||||||
|
zUnicodeName, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING,
|
||||||
|
FILE_FLAG_BACKUP_SEMANTICS, NULL
|
||||||
|
);
|
||||||
|
sqlite3_free(zUnicodeName);
|
||||||
|
if( hFile!=INVALID_HANDLE_VALUE ){
|
||||||
|
BOOL bResult = SetFileTime(hFile, NULL, &lastAccess, &lastWrite);
|
||||||
|
CloseHandle(hFile);
|
||||||
|
return !bResult;
|
||||||
|
}else{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#elif defined(AT_FDCWD) && 0 /* utimensat() is not univerally available */
|
||||||
|
/* Recent unix */
|
||||||
|
struct timespec times[2];
|
||||||
|
times[0].tv_nsec = times[1].tv_nsec = 0;
|
||||||
|
times[0].tv_sec = time(0);
|
||||||
|
times[1].tv_sec = mtime;
|
||||||
|
if( utimensat(AT_FDCWD, zFile, times, AT_SYMLINK_NOFOLLOW) ){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* Legacy unix */
|
||||||
|
struct timeval times[2];
|
||||||
|
times[0].tv_usec = times[1].tv_usec = 0;
|
||||||
|
times[0].tv_sec = time(0);
|
||||||
|
times[1].tv_sec = mtime;
|
||||||
|
if( utimes(zFile, times) ){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Implementation of the "writefile(W,X[,Y[,Z]]])" SQL function.
|
||||||
|
** Refer to header comments at the top of this file for details.
|
||||||
*/
|
*/
|
||||||
static void writefileFunc(
|
static void writefileFunc(
|
||||||
sqlite3_context *context,
|
sqlite3_context *context,
|
||||||
int argc,
|
int argc,
|
||||||
sqlite3_value **argv
|
sqlite3_value **argv
|
||||||
){
|
){
|
||||||
FILE *out;
|
|
||||||
const char *z;
|
|
||||||
sqlite3_int64 rc;
|
|
||||||
const char *zFile;
|
const char *zFile;
|
||||||
|
mode_t mode = 0;
|
||||||
|
int res;
|
||||||
|
sqlite3_int64 mtime = -1;
|
||||||
|
|
||||||
|
if( argc<2 || argc>4 ){
|
||||||
|
sqlite3_result_error(context,
|
||||||
|
"wrong number of arguments to function writefile()", -1
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
(void)(argc); /* Unused parameter */
|
|
||||||
zFile = (const char*)sqlite3_value_text(argv[0]);
|
zFile = (const char*)sqlite3_value_text(argv[0]);
|
||||||
if( zFile==0 ) return;
|
if( zFile==0 ) return;
|
||||||
out = fopen(zFile, "wb");
|
if( argc>=3 ){
|
||||||
if( out==0 ) return;
|
mode = (mode_t)sqlite3_value_int(argv[2]);
|
||||||
z = (const char*)sqlite3_value_blob(argv[1]);
|
}
|
||||||
if( z==0 ){
|
if( argc==4 ){
|
||||||
rc = 0;
|
mtime = sqlite3_value_int64(argv[3]);
|
||||||
}else{
|
}
|
||||||
rc = fwrite(z, 1, sqlite3_value_bytes(argv[1]), out);
|
|
||||||
|
res = writeFile(context, zFile, argv[1], mode, mtime);
|
||||||
|
if( res==1 && errno==ENOENT ){
|
||||||
|
if( makeDirectory(zFile, mode)==SQLITE_OK ){
|
||||||
|
res = writeFile(context, zFile, argv[1], mode, mtime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( argc>2 && res!=0 ){
|
||||||
|
if( S_ISLNK(mode) ){
|
||||||
|
ctxErrorMsg(context, "failed to create symlink: %s", zFile);
|
||||||
|
}else if( S_ISDIR(mode) ){
|
||||||
|
ctxErrorMsg(context, "failed to create directory: %s", zFile);
|
||||||
|
}else{
|
||||||
|
ctxErrorMsg(context, "failed to write file: %s", zFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fclose(out);
|
|
||||||
sqlite3_result_int64(context, rc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** SQL function: lsmode(MODE)
|
||||||
|
**
|
||||||
|
** Given a numberic st_mode from stat(), convert it into a human-readable
|
||||||
|
** text string in the style of "ls -l".
|
||||||
|
*/
|
||||||
|
static void lsModeFunc(
|
||||||
|
sqlite3_context *context,
|
||||||
|
int argc,
|
||||||
|
sqlite3_value **argv
|
||||||
|
){
|
||||||
|
int i;
|
||||||
|
int iMode = sqlite3_value_int(argv[0]);
|
||||||
|
char z[16];
|
||||||
|
(void)argc;
|
||||||
|
if( S_ISLNK(iMode) ){
|
||||||
|
z[0] = 'l';
|
||||||
|
}else if( S_ISREG(iMode) ){
|
||||||
|
z[0] = '-';
|
||||||
|
}else if( S_ISDIR(iMode) ){
|
||||||
|
z[0] = 'd';
|
||||||
|
}else{
|
||||||
|
z[0] = '?';
|
||||||
|
}
|
||||||
|
for(i=0; i<3; i++){
|
||||||
|
int m = (iMode >> ((2-i)*3));
|
||||||
|
char *a = &z[1 + i*3];
|
||||||
|
a[0] = (m & 0x4) ? 'r' : '-';
|
||||||
|
a[1] = (m & 0x2) ? 'w' : '-';
|
||||||
|
a[2] = (m & 0x1) ? 'x' : '-';
|
||||||
|
}
|
||||||
|
z[10] = '\0';
|
||||||
|
sqlite3_result_text(context, z, -1, SQLITE_TRANSIENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Cursor type for recursively iterating through a directory structure.
|
||||||
|
*/
|
||||||
|
typedef struct fsdir_cursor fsdir_cursor;
|
||||||
|
typedef struct FsdirLevel FsdirLevel;
|
||||||
|
|
||||||
|
struct FsdirLevel {
|
||||||
|
DIR *pDir; /* From opendir() */
|
||||||
|
char *zDir; /* Name of directory (nul-terminated) */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct fsdir_cursor {
|
||||||
|
sqlite3_vtab_cursor base; /* Base class - must be first */
|
||||||
|
|
||||||
|
int nLvl; /* Number of entries in aLvl[] array */
|
||||||
|
int iLvl; /* Index of current entry */
|
||||||
|
FsdirLevel *aLvl; /* Hierarchy of directories being traversed */
|
||||||
|
|
||||||
|
const char *zBase;
|
||||||
|
int nBase;
|
||||||
|
|
||||||
|
struct stat sStat; /* Current lstat() results */
|
||||||
|
char *zPath; /* Path to current entry */
|
||||||
|
sqlite3_int64 iRowid; /* Current rowid */
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct fsdir_tab fsdir_tab;
|
||||||
|
struct fsdir_tab {
|
||||||
|
sqlite3_vtab base; /* Base class - must be first */
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Construct a new fsdir virtual table object.
|
||||||
|
*/
|
||||||
|
static int fsdirConnect(
|
||||||
|
sqlite3 *db,
|
||||||
|
void *pAux,
|
||||||
|
int argc, const char *const*argv,
|
||||||
|
sqlite3_vtab **ppVtab,
|
||||||
|
char **pzErr
|
||||||
|
){
|
||||||
|
fsdir_tab *pNew = 0;
|
||||||
|
int rc;
|
||||||
|
(void)pAux;
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
(void)pzErr;
|
||||||
|
rc = sqlite3_declare_vtab(db, "CREATE TABLE x" FSDIR_SCHEMA);
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
pNew = (fsdir_tab*)sqlite3_malloc( sizeof(*pNew) );
|
||||||
|
if( pNew==0 ) return SQLITE_NOMEM;
|
||||||
|
memset(pNew, 0, sizeof(*pNew));
|
||||||
|
}
|
||||||
|
*ppVtab = (sqlite3_vtab*)pNew;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** This method is the destructor for fsdir vtab objects.
|
||||||
|
*/
|
||||||
|
static int fsdirDisconnect(sqlite3_vtab *pVtab){
|
||||||
|
sqlite3_free(pVtab);
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Constructor for a new fsdir_cursor object.
|
||||||
|
*/
|
||||||
|
static int fsdirOpen(sqlite3_vtab *p, sqlite3_vtab_cursor **ppCursor){
|
||||||
|
fsdir_cursor *pCur;
|
||||||
|
(void)p;
|
||||||
|
pCur = sqlite3_malloc( sizeof(*pCur) );
|
||||||
|
if( pCur==0 ) return SQLITE_NOMEM;
|
||||||
|
memset(pCur, 0, sizeof(*pCur));
|
||||||
|
pCur->iLvl = -1;
|
||||||
|
*ppCursor = &pCur->base;
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Reset a cursor back to the state it was in when first returned
|
||||||
|
** by fsdirOpen().
|
||||||
|
*/
|
||||||
|
static void fsdirResetCursor(fsdir_cursor *pCur){
|
||||||
|
int i;
|
||||||
|
for(i=0; i<=pCur->iLvl; i++){
|
||||||
|
FsdirLevel *pLvl = &pCur->aLvl[i];
|
||||||
|
if( pLvl->pDir ) closedir(pLvl->pDir);
|
||||||
|
sqlite3_free(pLvl->zDir);
|
||||||
|
}
|
||||||
|
sqlite3_free(pCur->zPath);
|
||||||
|
pCur->aLvl = 0;
|
||||||
|
pCur->zPath = 0;
|
||||||
|
pCur->zBase = 0;
|
||||||
|
pCur->nBase = 0;
|
||||||
|
pCur->iLvl = -1;
|
||||||
|
pCur->iRowid = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Destructor for an fsdir_cursor.
|
||||||
|
*/
|
||||||
|
static int fsdirClose(sqlite3_vtab_cursor *cur){
|
||||||
|
fsdir_cursor *pCur = (fsdir_cursor*)cur;
|
||||||
|
|
||||||
|
fsdirResetCursor(pCur);
|
||||||
|
sqlite3_free(pCur->aLvl);
|
||||||
|
sqlite3_free(pCur);
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Set the error message for the virtual table associated with cursor
|
||||||
|
** pCur to the results of vprintf(zFmt, ...).
|
||||||
|
*/
|
||||||
|
static void fsdirSetErrmsg(fsdir_cursor *pCur, const char *zFmt, ...){
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, zFmt);
|
||||||
|
pCur->base.pVtab->zErrMsg = sqlite3_vmprintf(zFmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Advance an fsdir_cursor to its next row of output.
|
||||||
|
*/
|
||||||
|
static int fsdirNext(sqlite3_vtab_cursor *cur){
|
||||||
|
fsdir_cursor *pCur = (fsdir_cursor*)cur;
|
||||||
|
mode_t m = pCur->sStat.st_mode;
|
||||||
|
|
||||||
|
pCur->iRowid++;
|
||||||
|
if( S_ISDIR(m) ){
|
||||||
|
/* Descend into this directory */
|
||||||
|
int iNew = pCur->iLvl + 1;
|
||||||
|
FsdirLevel *pLvl;
|
||||||
|
if( iNew>=pCur->nLvl ){
|
||||||
|
int nNew = iNew+1;
|
||||||
|
int nByte = nNew*sizeof(FsdirLevel);
|
||||||
|
FsdirLevel *aNew = (FsdirLevel*)sqlite3_realloc(pCur->aLvl, nByte);
|
||||||
|
if( aNew==0 ) return SQLITE_NOMEM;
|
||||||
|
memset(&aNew[pCur->nLvl], 0, sizeof(FsdirLevel)*(nNew-pCur->nLvl));
|
||||||
|
pCur->aLvl = aNew;
|
||||||
|
pCur->nLvl = nNew;
|
||||||
|
}
|
||||||
|
pCur->iLvl = iNew;
|
||||||
|
pLvl = &pCur->aLvl[iNew];
|
||||||
|
|
||||||
|
pLvl->zDir = pCur->zPath;
|
||||||
|
pCur->zPath = 0;
|
||||||
|
pLvl->pDir = opendir(pLvl->zDir);
|
||||||
|
if( pLvl->pDir==0 ){
|
||||||
|
fsdirSetErrmsg(pCur, "cannot read directory: %s", pCur->zPath);
|
||||||
|
return SQLITE_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while( pCur->iLvl>=0 ){
|
||||||
|
FsdirLevel *pLvl = &pCur->aLvl[pCur->iLvl];
|
||||||
|
struct dirent *pEntry = readdir(pLvl->pDir);
|
||||||
|
if( pEntry ){
|
||||||
|
if( pEntry->d_name[0]=='.' ){
|
||||||
|
if( pEntry->d_name[1]=='.' && pEntry->d_name[2]=='\0' ) continue;
|
||||||
|
if( pEntry->d_name[1]=='\0' ) continue;
|
||||||
|
}
|
||||||
|
sqlite3_free(pCur->zPath);
|
||||||
|
pCur->zPath = sqlite3_mprintf("%s/%s", pLvl->zDir, pEntry->d_name);
|
||||||
|
if( pCur->zPath==0 ) return SQLITE_NOMEM;
|
||||||
|
if( lstat(pCur->zPath, &pCur->sStat) ){
|
||||||
|
fsdirSetErrmsg(pCur, "cannot stat file: %s", pCur->zPath);
|
||||||
|
return SQLITE_ERROR;
|
||||||
|
}
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
closedir(pLvl->pDir);
|
||||||
|
sqlite3_free(pLvl->zDir);
|
||||||
|
pLvl->pDir = 0;
|
||||||
|
pLvl->zDir = 0;
|
||||||
|
pCur->iLvl--;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* EOF */
|
||||||
|
sqlite3_free(pCur->zPath);
|
||||||
|
pCur->zPath = 0;
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Return values of columns for the row at which the series_cursor
|
||||||
|
** is currently pointing.
|
||||||
|
*/
|
||||||
|
static int fsdirColumn(
|
||||||
|
sqlite3_vtab_cursor *cur, /* The cursor */
|
||||||
|
sqlite3_context *ctx, /* First argument to sqlite3_result_...() */
|
||||||
|
int i /* Which column to return */
|
||||||
|
){
|
||||||
|
fsdir_cursor *pCur = (fsdir_cursor*)cur;
|
||||||
|
switch( i ){
|
||||||
|
case 0: { /* name */
|
||||||
|
sqlite3_result_text(ctx, &pCur->zPath[pCur->nBase], -1, SQLITE_TRANSIENT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 1: /* mode */
|
||||||
|
sqlite3_result_int64(ctx, pCur->sStat.st_mode);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2: /* mtime */
|
||||||
|
sqlite3_result_int64(ctx, pCur->sStat.st_mtime);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: { /* data */
|
||||||
|
mode_t m = pCur->sStat.st_mode;
|
||||||
|
if( S_ISDIR(m) ){
|
||||||
|
sqlite3_result_null(ctx);
|
||||||
|
#if !defined(_WIN32) && !defined(WIN32)
|
||||||
|
}else if( S_ISLNK(m) ){
|
||||||
|
char aStatic[64];
|
||||||
|
char *aBuf = aStatic;
|
||||||
|
int nBuf = 64;
|
||||||
|
int n;
|
||||||
|
|
||||||
|
while( 1 ){
|
||||||
|
n = readlink(pCur->zPath, aBuf, nBuf);
|
||||||
|
if( n<nBuf ) break;
|
||||||
|
if( aBuf!=aStatic ) sqlite3_free(aBuf);
|
||||||
|
nBuf = nBuf*2;
|
||||||
|
aBuf = sqlite3_malloc(nBuf);
|
||||||
|
if( aBuf==0 ){
|
||||||
|
sqlite3_result_error_nomem(ctx);
|
||||||
|
return SQLITE_NOMEM;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sqlite3_result_text(ctx, aBuf, n, SQLITE_TRANSIENT);
|
||||||
|
if( aBuf!=aStatic ) sqlite3_free(aBuf);
|
||||||
|
#endif
|
||||||
|
}else{
|
||||||
|
readFileContents(ctx, pCur->zPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Return the rowid for the current row. In this implementation, the
|
||||||
|
** first row returned is assigned rowid value 1, and each subsequent
|
||||||
|
** row a value 1 more than that of the previous.
|
||||||
|
*/
|
||||||
|
static int fsdirRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){
|
||||||
|
fsdir_cursor *pCur = (fsdir_cursor*)cur;
|
||||||
|
*pRowid = pCur->iRowid;
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Return TRUE if the cursor has been moved off of the last
|
||||||
|
** row of output.
|
||||||
|
*/
|
||||||
|
static int fsdirEof(sqlite3_vtab_cursor *cur){
|
||||||
|
fsdir_cursor *pCur = (fsdir_cursor*)cur;
|
||||||
|
return (pCur->zPath==0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** xFilter callback.
|
||||||
|
*/
|
||||||
|
static int fsdirFilter(
|
||||||
|
sqlite3_vtab_cursor *cur,
|
||||||
|
int idxNum, const char *idxStr,
|
||||||
|
int argc, sqlite3_value **argv
|
||||||
|
){
|
||||||
|
const char *zDir = 0;
|
||||||
|
fsdir_cursor *pCur = (fsdir_cursor*)cur;
|
||||||
|
(void)idxStr;
|
||||||
|
fsdirResetCursor(pCur);
|
||||||
|
|
||||||
|
if( idxNum==0 ){
|
||||||
|
fsdirSetErrmsg(pCur, "table function fsdir requires an argument");
|
||||||
|
return SQLITE_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert( argc==idxNum && (argc==1 || argc==2) );
|
||||||
|
zDir = (const char*)sqlite3_value_text(argv[0]);
|
||||||
|
if( zDir==0 ){
|
||||||
|
fsdirSetErrmsg(pCur, "table function fsdir requires a non-NULL argument");
|
||||||
|
return SQLITE_ERROR;
|
||||||
|
}
|
||||||
|
if( argc==2 ){
|
||||||
|
pCur->zBase = (const char*)sqlite3_value_text(argv[1]);
|
||||||
|
}
|
||||||
|
if( pCur->zBase ){
|
||||||
|
pCur->nBase = (int)strlen(pCur->zBase)+1;
|
||||||
|
pCur->zPath = sqlite3_mprintf("%s/%s", pCur->zBase, zDir);
|
||||||
|
}else{
|
||||||
|
pCur->zPath = sqlite3_mprintf("%s", zDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
if( pCur->zPath==0 ){
|
||||||
|
return SQLITE_NOMEM;
|
||||||
|
}
|
||||||
|
if( lstat(pCur->zPath, &pCur->sStat) ){
|
||||||
|
fsdirSetErrmsg(pCur, "cannot stat file: %s", pCur->zPath);
|
||||||
|
return SQLITE_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** SQLite will invoke this method one or more times while planning a query
|
||||||
|
** that uses the generate_series virtual table. This routine needs to create
|
||||||
|
** a query plan for each invocation and compute an estimated cost for that
|
||||||
|
** plan.
|
||||||
|
**
|
||||||
|
** In this implementation idxNum is used to represent the
|
||||||
|
** query plan. idxStr is unused.
|
||||||
|
**
|
||||||
|
** The query plan is represented by bits in idxNum:
|
||||||
|
**
|
||||||
|
** (1) start = $value -- constraint exists
|
||||||
|
** (2) stop = $value -- constraint exists
|
||||||
|
** (4) step = $value -- constraint exists
|
||||||
|
** (8) output in descending order
|
||||||
|
*/
|
||||||
|
static int fsdirBestIndex(
|
||||||
|
sqlite3_vtab *tab,
|
||||||
|
sqlite3_index_info *pIdxInfo
|
||||||
|
){
|
||||||
|
int i; /* Loop over constraints */
|
||||||
|
int idx4 = -1;
|
||||||
|
int idx5 = -1;
|
||||||
|
const struct sqlite3_index_constraint *pConstraint;
|
||||||
|
|
||||||
|
(void)tab;
|
||||||
|
pConstraint = pIdxInfo->aConstraint;
|
||||||
|
for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
|
||||||
|
if( pConstraint->usable==0 ) continue;
|
||||||
|
if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
|
||||||
|
if( pConstraint->iColumn==4 ) idx4 = i;
|
||||||
|
if( pConstraint->iColumn==5 ) idx5 = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( idx4<0 ){
|
||||||
|
pIdxInfo->idxNum = 0;
|
||||||
|
pIdxInfo->estimatedCost = (double)(((sqlite3_int64)1) << 50);
|
||||||
|
}else{
|
||||||
|
pIdxInfo->aConstraintUsage[idx4].omit = 1;
|
||||||
|
pIdxInfo->aConstraintUsage[idx4].argvIndex = 1;
|
||||||
|
if( idx5>=0 ){
|
||||||
|
pIdxInfo->aConstraintUsage[idx5].omit = 1;
|
||||||
|
pIdxInfo->aConstraintUsage[idx5].argvIndex = 2;
|
||||||
|
pIdxInfo->idxNum = 2;
|
||||||
|
pIdxInfo->estimatedCost = 10.0;
|
||||||
|
}else{
|
||||||
|
pIdxInfo->idxNum = 1;
|
||||||
|
pIdxInfo->estimatedCost = 100.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return SQLITE_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Register the "fsdir" virtual table.
|
||||||
|
*/
|
||||||
|
static int fsdirRegister(sqlite3 *db){
|
||||||
|
static sqlite3_module fsdirModule = {
|
||||||
|
0, /* iVersion */
|
||||||
|
0, /* xCreate */
|
||||||
|
fsdirConnect, /* xConnect */
|
||||||
|
fsdirBestIndex, /* xBestIndex */
|
||||||
|
fsdirDisconnect, /* xDisconnect */
|
||||||
|
0, /* xDestroy */
|
||||||
|
fsdirOpen, /* xOpen - open a cursor */
|
||||||
|
fsdirClose, /* xClose - close a cursor */
|
||||||
|
fsdirFilter, /* xFilter - configure scan constraints */
|
||||||
|
fsdirNext, /* xNext - advance a cursor */
|
||||||
|
fsdirEof, /* xEof - check for end of scan */
|
||||||
|
fsdirColumn, /* xColumn - read data */
|
||||||
|
fsdirRowid, /* xRowid - read data */
|
||||||
|
0, /* xUpdate */
|
||||||
|
0, /* xBegin */
|
||||||
|
0, /* xSync */
|
||||||
|
0, /* xCommit */
|
||||||
|
0, /* xRollback */
|
||||||
|
0, /* xFindMethod */
|
||||||
|
0, /* xRename */
|
||||||
|
0, /* xSavepoint */
|
||||||
|
0, /* xRelease */
|
||||||
|
0 /* xRollbackTo */
|
||||||
|
};
|
||||||
|
|
||||||
|
int rc = sqlite3_create_module(db, "fsdir", &fsdirModule, 0);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
#else /* SQLITE_OMIT_VIRTUALTABLE */
|
||||||
|
# define fsdirRegister(x) SQLITE_OK
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
__declspec(dllexport)
|
__declspec(dllexport)
|
||||||
@@ -95,8 +814,15 @@ int sqlite3_fileio_init(
|
|||||||
rc = sqlite3_create_function(db, "readfile", 1, SQLITE_UTF8, 0,
|
rc = sqlite3_create_function(db, "readfile", 1, SQLITE_UTF8, 0,
|
||||||
readfileFunc, 0, 0);
|
readfileFunc, 0, 0);
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
rc = sqlite3_create_function(db, "writefile", 2, SQLITE_UTF8, 0,
|
rc = sqlite3_create_function(db, "writefile", -1, SQLITE_UTF8, 0,
|
||||||
writefileFunc, 0, 0);
|
writefileFunc, 0, 0);
|
||||||
}
|
}
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = sqlite3_create_function(db, "lsmode", 1, SQLITE_UTF8, 0,
|
||||||
|
lsModeFunc, 0, 0);
|
||||||
|
}
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = fsdirRegister(db);
|
||||||
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
/*
|
||||||
|
** 2017-12-17
|
||||||
|
**
|
||||||
|
** The author disclaims copyright to this source code. In place of
|
||||||
|
** a legal notice, here is a blessing:
|
||||||
|
**
|
||||||
|
** May you do good and not evil.
|
||||||
|
** May you find forgiveness for yourself and forgive others.
|
||||||
|
** May you share freely, never taking more than you give.
|
||||||
|
**
|
||||||
|
******************************************************************************
|
||||||
|
**
|
||||||
|
** Utility functions sqlar_compress() and sqlar_uncompress(). Useful
|
||||||
|
** for working with sqlar archives and used by the shell tool's built-in
|
||||||
|
** sqlar support.
|
||||||
|
*/
|
||||||
|
#include "sqlite3ext.h"
|
||||||
|
SQLITE_EXTENSION_INIT1
|
||||||
|
#include <zlib.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Implementation of the "sqlar_compress(X)" SQL function.
|
||||||
|
**
|
||||||
|
** If the type of X is SQLITE_BLOB, and compressing that blob using
|
||||||
|
** zlib utility function compress() yields a smaller blob, return the
|
||||||
|
** compressed blob. Otherwise, return a copy of X.
|
||||||
|
**
|
||||||
|
** SQLar uses the "zlib format" for compressed content. The zlib format
|
||||||
|
** contains a two-byte identification header and a four-byte checksum at
|
||||||
|
** the end. This is different from ZIP which uses the raw deflate format.
|
||||||
|
**
|
||||||
|
** Future enhancements to SQLar might add support for new compression formats.
|
||||||
|
** If so, those new formats will be identified by alternative headers in the
|
||||||
|
** compressed data.
|
||||||
|
*/
|
||||||
|
static void sqlarCompressFunc(
|
||||||
|
sqlite3_context *context,
|
||||||
|
int argc,
|
||||||
|
sqlite3_value **argv
|
||||||
|
){
|
||||||
|
assert( argc==1 );
|
||||||
|
if( sqlite3_value_type(argv[0])==SQLITE_BLOB ){
|
||||||
|
const Bytef *pData = sqlite3_value_blob(argv[0]);
|
||||||
|
uLong nData = sqlite3_value_bytes(argv[0]);
|
||||||
|
uLongf nOut = compressBound(nData);
|
||||||
|
Bytef *pOut;
|
||||||
|
|
||||||
|
pOut = (Bytef*)sqlite3_malloc(nOut);
|
||||||
|
if( pOut==0 ){
|
||||||
|
sqlite3_result_error_nomem(context);
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
if( Z_OK!=compress(pOut, &nOut, pData, nData) ){
|
||||||
|
sqlite3_result_error(context, "error in compress()", -1);
|
||||||
|
}else if( nOut<nData ){
|
||||||
|
sqlite3_result_blob(context, pOut, nOut, SQLITE_TRANSIENT);
|
||||||
|
}else{
|
||||||
|
sqlite3_result_value(context, argv[0]);
|
||||||
|
}
|
||||||
|
sqlite3_free(pOut);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
sqlite3_result_value(context, argv[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
|
||||||
|
**
|
||||||
|
** Parameter SZ is interpreted as an integer. If it is less than or
|
||||||
|
** equal to zero, then this function returns a copy of X. Or, if
|
||||||
|
** SZ is equal to the size of X when interpreted as a blob, also
|
||||||
|
** return a copy of X. Otherwise, decompress blob X using zlib
|
||||||
|
** utility function uncompress() and return the results (another
|
||||||
|
** blob).
|
||||||
|
*/
|
||||||
|
static void sqlarUncompressFunc(
|
||||||
|
sqlite3_context *context,
|
||||||
|
int argc,
|
||||||
|
sqlite3_value **argv
|
||||||
|
){
|
||||||
|
uLong nData;
|
||||||
|
uLongf sz;
|
||||||
|
|
||||||
|
assert( argc==2 );
|
||||||
|
sz = sqlite3_value_int(argv[1]);
|
||||||
|
|
||||||
|
if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
|
||||||
|
sqlite3_result_value(context, argv[0]);
|
||||||
|
}else{
|
||||||
|
const Bytef *pData= sqlite3_value_blob(argv[0]);
|
||||||
|
Bytef *pOut = sqlite3_malloc(sz);
|
||||||
|
if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
|
||||||
|
sqlite3_result_error(context, "error in uncompress()", -1);
|
||||||
|
}else{
|
||||||
|
sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
|
||||||
|
}
|
||||||
|
sqlite3_free(pOut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
__declspec(dllexport)
|
||||||
|
#endif
|
||||||
|
int sqlite3_sqlar_init(
|
||||||
|
sqlite3 *db,
|
||||||
|
char **pzErrMsg,
|
||||||
|
const sqlite3_api_routines *pApi
|
||||||
|
){
|
||||||
|
int rc = SQLITE_OK;
|
||||||
|
SQLITE_EXTENSION_INIT2(pApi);
|
||||||
|
(void)pzErrMsg; /* Unused parameter */
|
||||||
|
rc = sqlite3_create_function(db, "sqlar_compress", 1, SQLITE_UTF8, 0,
|
||||||
|
sqlarCompressFunc, 0, 0);
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = sqlite3_create_function(db, "sqlar_uncompress", 2, SQLITE_UTF8, 0,
|
||||||
|
sqlarUncompressFunc, 0, 0);
|
||||||
|
}
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
@@ -484,14 +484,15 @@ static int unionDisconnect(sqlite3_vtab *pVtab){
|
|||||||
int i;
|
int i;
|
||||||
for(i=0; i<pTab->nSrc; i++){
|
for(i=0; i<pTab->nSrc; i++){
|
||||||
UnionSrc *pSrc = &pTab->aSrc[i];
|
UnionSrc *pSrc = &pTab->aSrc[i];
|
||||||
if( pSrc->db ){
|
int bHaveSrcDb = (pSrc->db!=0);
|
||||||
|
sqlite3_close(pSrc->db);
|
||||||
|
if( bHaveSrcDb ){
|
||||||
unionInvokeOpenClose(pTab, pSrc, 1, 0);
|
unionInvokeOpenClose(pTab, pSrc, 1, 0);
|
||||||
}
|
}
|
||||||
sqlite3_free(pSrc->zDb);
|
sqlite3_free(pSrc->zDb);
|
||||||
sqlite3_free(pSrc->zTab);
|
sqlite3_free(pSrc->zTab);
|
||||||
sqlite3_free(pSrc->zFile);
|
sqlite3_free(pSrc->zFile);
|
||||||
sqlite3_free(pSrc->zContext);
|
sqlite3_free(pSrc->zContext);
|
||||||
sqlite3_close(pSrc->db);
|
|
||||||
}
|
}
|
||||||
sqlite3_finalize(pTab->pNotFound);
|
sqlite3_finalize(pTab->pNotFound);
|
||||||
sqlite3_finalize(pTab->pOpenClose);
|
sqlite3_finalize(pTab->pOpenClose);
|
||||||
|
|||||||
+1667
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,175 @@
|
|||||||
|
# 2018 January 11
|
||||||
|
#
|
||||||
|
# The author disclaims copyright to this source code. In place of
|
||||||
|
# a legal notice, here is a blessing:
|
||||||
|
#
|
||||||
|
# May you do good and not evil.
|
||||||
|
# May you find forgiveness for yourself and forgive others.
|
||||||
|
# May you share freely, never taking more than you give.
|
||||||
|
#
|
||||||
|
#***********************************************************************
|
||||||
|
#
|
||||||
|
# This file contains tests of multiple RBU operations running
|
||||||
|
# concurrently within the same process.
|
||||||
|
#
|
||||||
|
|
||||||
|
source [file join [file dirname [info script]] rbu_common.tcl]
|
||||||
|
set ::testprefix rbumulti
|
||||||
|
|
||||||
|
db close
|
||||||
|
sqlite3_shutdown
|
||||||
|
sqlite3_config_uri 1
|
||||||
|
|
||||||
|
autoinstall_test_functions
|
||||||
|
|
||||||
|
proc build_db {db} {
|
||||||
|
$db eval {
|
||||||
|
CREATE TABLE t1(a PRIMARY KEY, b, c);
|
||||||
|
CREATE INDEX i1 ON t1(b);
|
||||||
|
CREATE INDEX i2 ON t1(c);
|
||||||
|
|
||||||
|
WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<500 )
|
||||||
|
INSERT INTO t1
|
||||||
|
SELECT randomblob(10), randomblob(100), randomblob(100) FROM s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
proc build_rbu {db} {
|
||||||
|
$db eval {
|
||||||
|
CREATE TABLE data_t1(a, b, c, rbu_control);
|
||||||
|
WITH s(i) AS ( SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<100 )
|
||||||
|
INSERT INTO data_t1
|
||||||
|
SELECT randomblob(10), randomblob(100), randomblob(100), 0 FROM s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
proc step_rbu2 {bOpenClose openr1 openr2} {
|
||||||
|
|
||||||
|
forcedelete teststate.db1
|
||||||
|
forcedelete teststate.db2
|
||||||
|
|
||||||
|
if {$bOpenClose!=0 && $bOpenClose!=1} { error $bOpenClose }
|
||||||
|
if {$bOpenClose==0} {
|
||||||
|
eval $openr1
|
||||||
|
eval $openr2
|
||||||
|
}
|
||||||
|
|
||||||
|
set b1 0
|
||||||
|
set b2 0
|
||||||
|
|
||||||
|
while {$b1==0 || $b2==0} {
|
||||||
|
if {$bOpenClose==1} {
|
||||||
|
if {$b1==0} { eval $openr1 teststate.db1 }
|
||||||
|
if {$b2==0} { eval $openr2 teststate.db2 }
|
||||||
|
}
|
||||||
|
if {$b1==0} {
|
||||||
|
set rc1 [r1 step]
|
||||||
|
if {$rc1 != "SQLITE_OK"} { set b1 1 }
|
||||||
|
}
|
||||||
|
if {$b2==0} {
|
||||||
|
set rc2 [r2 step]
|
||||||
|
if {$rc2 != "SQLITE_OK"} { set b2 1 }
|
||||||
|
}
|
||||||
|
if {$bOpenClose==1} {
|
||||||
|
if {$b1==0} { r1 close }
|
||||||
|
if {$b2==0} { r2 close }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set rc1 [r1 close]
|
||||||
|
set rc2 [r2 close]
|
||||||
|
|
||||||
|
list $rc1 $rc2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for {set i 0} {$i<=3} {incr i} {
|
||||||
|
|
||||||
|
if {$i & 0x01} {
|
||||||
|
sqlite3rbu_create_vfs -default myrbu ""
|
||||||
|
}
|
||||||
|
set bOpenClose [expr $i>>1]
|
||||||
|
|
||||||
|
forcedelete test.db
|
||||||
|
forcedelete test.db2
|
||||||
|
forcedelete rbu.db
|
||||||
|
forcedelete rbu.db2
|
||||||
|
|
||||||
|
do_test 1.$i.0 {
|
||||||
|
sqlite3 db test.db
|
||||||
|
sqlite3 db2 test.db2
|
||||||
|
build_db db
|
||||||
|
build_db db2
|
||||||
|
|
||||||
|
sqlite3 rbu1 rbu.db
|
||||||
|
sqlite3 rbu2 rbu.db2
|
||||||
|
|
||||||
|
build_rbu rbu1
|
||||||
|
build_rbu rbu2
|
||||||
|
|
||||||
|
rbu1 close
|
||||||
|
rbu2 close
|
||||||
|
} {}
|
||||||
|
|
||||||
|
set m1 [db eval {SELECT md5sum(a, b, c) FROM t1}]
|
||||||
|
set m2 [db2 eval {SELECT md5sum(a, b, c) FROM t1}]
|
||||||
|
|
||||||
|
do_test 1.$i.1 {
|
||||||
|
step_rbu2 $bOpenClose {
|
||||||
|
sqlite3rbu r1 test.db rbu.db
|
||||||
|
} {
|
||||||
|
sqlite3rbu r2 test.db2 rbu.db2
|
||||||
|
}
|
||||||
|
} {SQLITE_DONE SQLITE_DONE}
|
||||||
|
|
||||||
|
do_execsql_test -db db 1.$i.2.1 { PRAGMA integrity_check } ok
|
||||||
|
do_execsql_test -db db2 1.$i.2.2 { PRAGMA integrity_check } ok
|
||||||
|
|
||||||
|
do_execsql_test -db db 1.$i.3.1 { SELECT md5sum(a, b, c)==$m1 FROM t1 } 0
|
||||||
|
do_execsql_test -db db2 1.$i.3.2 { SELECT md5sum(a, b, c)==$m2 FROM t1 } 0
|
||||||
|
|
||||||
|
catch { db close }
|
||||||
|
catch { db2 close }
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
forcedelete test.db2
|
||||||
|
forcedelete test.db
|
||||||
|
forcedelete rbu.db2
|
||||||
|
|
||||||
|
do_test 1.$i.4 {
|
||||||
|
sqlite3 db test.db
|
||||||
|
sqlite3 db2 test.db2
|
||||||
|
build_db db
|
||||||
|
build_db db2
|
||||||
|
sqlite3 rbu2 rbu.db2
|
||||||
|
build_rbu rbu2
|
||||||
|
rbu2 close
|
||||||
|
} {}
|
||||||
|
|
||||||
|
set m1 [db eval {SELECT md5sum(a, b, c) FROM t1}]
|
||||||
|
set m2 [db2 eval {SELECT md5sum(a, b, c) FROM t1}]
|
||||||
|
|
||||||
|
do_test 1.$i.5 {
|
||||||
|
step_rbu2 $bOpenClose {
|
||||||
|
sqlite3rbu_vacuum r1 test.db
|
||||||
|
} {
|
||||||
|
sqlite3rbu r2 test.db2 rbu.db2
|
||||||
|
}
|
||||||
|
} {SQLITE_DONE SQLITE_DONE}
|
||||||
|
|
||||||
|
do_execsql_test -db db 1.$i.6.1 { SELECT md5sum(a, b, c)==$m1 FROM t1 } 1
|
||||||
|
do_execsql_test -db db2 1.$i.6.2 { SELECT md5sum(a, b, c)==$m2 FROM t1 } 0
|
||||||
|
|
||||||
|
do_execsql_test -db db 1.$i.7.1 { PRAGMA integrity_check } ok
|
||||||
|
do_execsql_test -db db2 1.$i.7.2 { PRAGMA integrity_check } ok
|
||||||
|
|
||||||
|
catch { db close }
|
||||||
|
catch { db2 close }
|
||||||
|
if {$i & 0x01} {
|
||||||
|
sqlite3rbu_destroy_vfs myrbu
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
finish_test
|
||||||
|
|
||||||
+2
-1
@@ -52,7 +52,8 @@
|
|||||||
** child page.
|
** child page.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RTREE)
|
#if !defined(SQLITE_CORE) \
|
||||||
|
|| (defined(SQLITE_ENABLE_RTREE) && !defined(SQLITE_OMIT_VIRTUALTABLE))
|
||||||
|
|
||||||
#ifndef SQLITE_CORE
|
#ifndef SQLITE_CORE
|
||||||
#include "sqlite3ext.h"
|
#include "sqlite3ext.h"
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
|
|
||||||
|
#ifdef SQLITE_OMIT_VIRTUALTABLE
|
||||||
|
# undef SQLITE_ENABLE_RTREE
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
@@ -221,5 +221,38 @@ do_test 4.2.2 {
|
|||||||
} {1 {SQLITE_SCHEMA - table schemas do not match}}
|
} {1 {SQLITE_SCHEMA - table schemas do not match}}
|
||||||
S delete
|
S delete
|
||||||
|
|
||||||
|
do_test 4.3.1 {
|
||||||
|
sqlite3session S db main
|
||||||
|
S attach t4
|
||||||
|
execsql { CREATE TABLE t4(i PRIMARY KEY, b) }
|
||||||
|
list [catch { S diff ixua t4 } msg] $msg
|
||||||
|
} {1 {SQLITE_SCHEMA - table schemas do not match}}
|
||||||
|
S delete
|
||||||
|
do_catchsql_test 4.3.2 {
|
||||||
|
SELECT * FROM ixua.t4;
|
||||||
|
} {1 {no such table: ixua.t4}}
|
||||||
|
|
||||||
|
do_test 4.4.1 {
|
||||||
|
sqlite3session S db main
|
||||||
|
S attach sqlite_stat1
|
||||||
|
execsql { ANALYZE }
|
||||||
|
execsql { DROP TABLE ixua.sqlite_stat1 }
|
||||||
|
list [catch { S diff ixua sqlite_stat1 } msg] $msg
|
||||||
|
} {1 {SQLITE_SCHEMA - table schemas do not match}}
|
||||||
|
S delete
|
||||||
|
do_catchsql_test 4.4.2 {
|
||||||
|
SELECT * FROM ixua.sqlite_stat1;
|
||||||
|
} {1 {no such table: ixua.sqlite_stat1}}
|
||||||
|
|
||||||
|
do_test 4.5.1 {
|
||||||
|
sqlite3session S db main
|
||||||
|
S attach t8
|
||||||
|
list [catch { S diff ixua t8 } msg] $msg
|
||||||
|
} {0 {}}
|
||||||
|
S delete
|
||||||
|
do_catchsql_test 4.5.2 {
|
||||||
|
SELECT * FROM ixua.i8;
|
||||||
|
} {1 {no such table: ixua.i8}}
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|
||||||
|
|||||||
@@ -173,5 +173,39 @@ do_test 4.3 {
|
|||||||
compare_db db db2
|
compare_db db db2
|
||||||
} {}
|
} {}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
reset_db
|
||||||
|
catch { db2 close }
|
||||||
|
forcedelete test.db2
|
||||||
|
sqlite3 db2 test.db2
|
||||||
|
|
||||||
|
do_execsql_test 5.0.1 {
|
||||||
|
CREATE TABLE t1(a PRIMARY KEY, b, c);
|
||||||
|
CREATE TABLE t2(a, b, c PRIMARY KEY);
|
||||||
|
CREATE TABLE t3(a, b PRIMARY KEY, c);
|
||||||
|
}
|
||||||
|
do_execsql_test -db db2 5.0.2 {
|
||||||
|
CREATE TABLE t1(a PRIMARY KEY, b, c);
|
||||||
|
CREATE TABLE t2(a, b, c);
|
||||||
|
CREATE TABLE t3(a, b PRIMARY KEY, c);
|
||||||
|
}
|
||||||
|
|
||||||
|
do_test 5.1 {
|
||||||
|
do_then_apply_sql {
|
||||||
|
INSERT INTO t1 VALUES(1, 2, 3);
|
||||||
|
INSERT INTO t2 VALUES(4, 5, 6);
|
||||||
|
INSERT INTO t3 VALUES(7, 8, 9);
|
||||||
|
}
|
||||||
|
|
||||||
|
db2 eval {
|
||||||
|
SELECT * FROM t1;
|
||||||
|
SELECT * FROM t2;
|
||||||
|
SELECT * FROM t3;
|
||||||
|
}
|
||||||
|
} {1 2 3 7 8 9}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
# 2018 January 18
|
||||||
|
#
|
||||||
|
# The author disclaims copyright to this source code. In place of
|
||||||
|
# a legal notice, here is a blessing:
|
||||||
|
#
|
||||||
|
# May you do good and not evil.
|
||||||
|
# May you find forgiveness for yourself and forgive others.
|
||||||
|
# May you share freely, never taking more than you give.
|
||||||
|
#
|
||||||
|
#***********************************************************************
|
||||||
|
#
|
||||||
|
|
||||||
|
if {![info exists testdir]} {
|
||||||
|
set testdir [file join [file dirname [info script]] .. .. test]
|
||||||
|
}
|
||||||
|
source [file join [file dirname [info script]] session_common.tcl]
|
||||||
|
source $testdir/tester.tcl
|
||||||
|
ifcapable !session {finish_test; return}
|
||||||
|
set testprefix sessionH
|
||||||
|
|
||||||
|
forcedelete test.db2
|
||||||
|
sqlite3 db2 test.db2
|
||||||
|
|
||||||
|
do_test 1.0 {
|
||||||
|
do_common_sql {
|
||||||
|
CREATE TABLE t1(a, b, c, PRIMARY KEY(a, b));
|
||||||
|
}
|
||||||
|
do_then_apply_sql {
|
||||||
|
WITH s(i) AS (
|
||||||
|
VALUES(1) UNION ALL SELECT i+1 FROM s WHERe i<10000
|
||||||
|
)
|
||||||
|
INSERT INTO t1 SELECT 'abcde', randomblob(16), i FROM s;
|
||||||
|
}
|
||||||
|
compare_db db db2
|
||||||
|
} {}
|
||||||
|
|
||||||
|
|
||||||
|
finish_test
|
||||||
|
|
||||||
@@ -241,5 +241,9 @@ eval [string map [list %WR% $trailing] {
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
catch { db close }
|
||||||
|
catch { db2 close }
|
||||||
|
sqlite3_shutdown
|
||||||
|
test_sqlite3_log
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|||||||
@@ -0,0 +1,311 @@
|
|||||||
|
# 2018 January 12
|
||||||
|
#
|
||||||
|
# The author disclaims copyright to this source code. In place of
|
||||||
|
# a legal notice, here is a blessing:
|
||||||
|
#
|
||||||
|
# May you do good and not evil.
|
||||||
|
# May you find forgiveness for yourself and forgive others.
|
||||||
|
# May you share freely, never taking more than you give.
|
||||||
|
#
|
||||||
|
#***********************************************************************
|
||||||
|
#
|
||||||
|
|
||||||
|
if {![info exists testdir]} {
|
||||||
|
set testdir [file join [file dirname [info script]] .. .. test]
|
||||||
|
}
|
||||||
|
source [file join [file dirname [info script]] session_common.tcl]
|
||||||
|
source $testdir/tester.tcl
|
||||||
|
ifcapable !session {finish_test; return}
|
||||||
|
|
||||||
|
set testprefix sessionstat1
|
||||||
|
|
||||||
|
do_execsql_test 1.0 {
|
||||||
|
CREATE TABLE t1(a PRIMARY KEY, b, c);
|
||||||
|
CREATE INDEX t1b ON t1(b);
|
||||||
|
CREATE INDEX t1c ON t1(c);
|
||||||
|
|
||||||
|
WITH s(i) AS (
|
||||||
|
SELECT 0 UNION ALL SELECT i+1 FROM s WHERE (i+1)<32
|
||||||
|
)
|
||||||
|
INSERT INTO t1 SELECT i, i%8, i%2 FROM s;
|
||||||
|
}
|
||||||
|
|
||||||
|
do_iterator_test 1.1 {} {
|
||||||
|
ANALYZE
|
||||||
|
} {
|
||||||
|
{INSERT sqlite_stat1 0 XX. {} {t t1 t sqlite_autoindex_t1_1 t {32 1}}}
|
||||||
|
{INSERT sqlite_stat1 0 XX. {} {t t1 t t1b t {32 4}}}
|
||||||
|
{INSERT sqlite_stat1 0 XX. {} {t t1 t t1c t {32 16}}}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_execsql_test 1.2 {
|
||||||
|
WITH s(i) AS (
|
||||||
|
SELECT 32 UNION ALL SELECT i+1 FROM s WHERE (i+1)<64
|
||||||
|
)
|
||||||
|
INSERT INTO t1 SELECT i, i%8, i%2 FROM s;
|
||||||
|
}
|
||||||
|
|
||||||
|
do_iterator_test 1.3 {} {
|
||||||
|
ANALYZE
|
||||||
|
} {
|
||||||
|
{UPDATE sqlite_stat1 0 XX. {t t1 t sqlite_autoindex_t1_1 t {32 1}} {{} {} {} {} t {64 1}}}
|
||||||
|
{UPDATE sqlite_stat1 0 XX. {t t1 t t1b t {32 4}} {{} {} {} {} t {64 8}}}
|
||||||
|
{UPDATE sqlite_stat1 0 XX. {t t1 t t1c t {32 16}} {{} {} {} {} t {64 32}}}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_iterator_test 1.5 {} {
|
||||||
|
DROP INDEX t1b;
|
||||||
|
} {
|
||||||
|
{DELETE sqlite_stat1 0 XX. {t t1 t t1b t {64 8}} {}}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_iterator_test 1.6 {} {
|
||||||
|
DROP TABLE t1;
|
||||||
|
} {
|
||||||
|
{DELETE sqlite_stat1 0 XX. {t t1 t sqlite_autoindex_t1_1 t {64 1}} {}}
|
||||||
|
{DELETE sqlite_stat1 0 XX. {t t1 t t1c t {64 32}} {}}
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
catch { db2 close }
|
||||||
|
forcedelete test.db2
|
||||||
|
sqlite3 db2 test.db2
|
||||||
|
|
||||||
|
do_test 2.0 {
|
||||||
|
do_common_sql {
|
||||||
|
CREATE TABLE t1(a PRIMARY KEY, b, c);
|
||||||
|
CREATE INDEX t1b ON t1(b);
|
||||||
|
CREATE INDEX t1c ON t1(c);
|
||||||
|
ANALYZE;
|
||||||
|
}
|
||||||
|
} {}
|
||||||
|
|
||||||
|
do_test 2.1 {
|
||||||
|
do_then_apply_sql {
|
||||||
|
WITH s(i) AS (
|
||||||
|
SELECT 0 UNION ALL SELECT i+1 FROM s WHERE (i+1)<32
|
||||||
|
)
|
||||||
|
INSERT INTO t1 SELECT i, i%8, i%2 FROM s;
|
||||||
|
ANALYZE;
|
||||||
|
}
|
||||||
|
} {}
|
||||||
|
|
||||||
|
do_execsql_test -db db2 2.2 {
|
||||||
|
SELECT * FROM sqlite_stat1
|
||||||
|
} {
|
||||||
|
t1 sqlite_autoindex_t1_1 {32 1}
|
||||||
|
t1 t1b {32 4}
|
||||||
|
t1 t1c {32 16}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_test 2.3 {
|
||||||
|
do_then_apply_sql { DROP INDEX t1c }
|
||||||
|
} {}
|
||||||
|
|
||||||
|
do_execsql_test -db db2 2.4 {
|
||||||
|
SELECT * FROM sqlite_stat1
|
||||||
|
} {
|
||||||
|
t1 sqlite_autoindex_t1_1 {32 1}
|
||||||
|
t1 t1b {32 4}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_test 2.3 {
|
||||||
|
do_then_apply_sql { DROP TABLE t1 }
|
||||||
|
} {}
|
||||||
|
|
||||||
|
do_execsql_test -db db2 2.4 {
|
||||||
|
SELECT * FROM sqlite_stat1
|
||||||
|
} {
|
||||||
|
}
|
||||||
|
|
||||||
|
do_execsql_test -db db2 2.5 { SELECT count(*) FROM t1 } 32
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
db2 close
|
||||||
|
forcedelete test.db2
|
||||||
|
reset_db
|
||||||
|
sqlite3 db2 test.db2
|
||||||
|
|
||||||
|
do_test 3.0 {
|
||||||
|
do_common_sql {
|
||||||
|
CREATE TABLE t1(a, b, c);
|
||||||
|
ANALYZE;
|
||||||
|
DELETE FROM sqlite_stat1;
|
||||||
|
}
|
||||||
|
execsql {
|
||||||
|
INSERT INTO t1 VALUES(1, 1, 1);
|
||||||
|
INSERT INTO t1 VALUES(2, 2, 2);
|
||||||
|
INSERT INTO t1 VALUES(3, 3, 3);
|
||||||
|
INSERT INTO t1 VALUES(4, 4, 4);
|
||||||
|
}
|
||||||
|
} {}
|
||||||
|
|
||||||
|
do_iterator_test 3.1 {} {
|
||||||
|
ANALYZE
|
||||||
|
} {
|
||||||
|
{INSERT sqlite_stat1 0 XX. {} {t t1 b {} t 4}}
|
||||||
|
}
|
||||||
|
db null null
|
||||||
|
db2 null null
|
||||||
|
do_execsql_test 3.2 {
|
||||||
|
SELECT * FROM sqlite_stat1;
|
||||||
|
} {t1 null 4}
|
||||||
|
do_test 3.3 {
|
||||||
|
execsql { DELETE FROM sqlite_stat1 }
|
||||||
|
do_then_apply_sql { ANALYZE }
|
||||||
|
execsql { SELECT * FROM sqlite_stat1 } db2
|
||||||
|
} {t1 null 4}
|
||||||
|
do_test 3.4 {
|
||||||
|
execsql { INSERT INTO t1 VALUES(5,5,5) }
|
||||||
|
do_then_apply_sql { ANALYZE }
|
||||||
|
execsql { SELECT * FROM sqlite_stat1 } db2
|
||||||
|
} {t1 null 5}
|
||||||
|
do_test 3.5 {
|
||||||
|
do_then_apply_sql { DROP TABLE t1 }
|
||||||
|
execsql { SELECT * FROM sqlite_stat1 } db2
|
||||||
|
} {}
|
||||||
|
|
||||||
|
do_test 3.6.1 {
|
||||||
|
execsql {
|
||||||
|
CREATE TABLE t1(a, b, c);
|
||||||
|
CREATE TABLE t2(x, y, z);
|
||||||
|
INSERT INTO t1 VALUES(1,1,1), (2,2,2), (3,3,3), (4,4,4), (5,5,5);
|
||||||
|
INSERT INTO t2 SELECT * FROM t1;
|
||||||
|
DELETE FROM sqlite_stat1;
|
||||||
|
}
|
||||||
|
sqlite3session S db main
|
||||||
|
S attach sqlite_stat1
|
||||||
|
execsql { ANALYZE }
|
||||||
|
} {}
|
||||||
|
do_changeset_test 3.6.2 S {
|
||||||
|
{INSERT sqlite_stat1 0 XX. {} {t t2 b {} t 5}}
|
||||||
|
{INSERT sqlite_stat1 0 XX. {} {t t1 b {} t 5}}
|
||||||
|
}
|
||||||
|
do_changeset_invert_test 3.6.3 S {
|
||||||
|
{DELETE sqlite_stat1 0 XX. {t t2 b {} t 5} {}}
|
||||||
|
{DELETE sqlite_stat1 0 XX. {t t1 b {} t 5} {}}
|
||||||
|
}
|
||||||
|
do_test 3.6.4 { S delete } {}
|
||||||
|
|
||||||
|
proc sql_changeset_concat {args} {
|
||||||
|
foreach sql $args {
|
||||||
|
sqlite3session S db main
|
||||||
|
S attach sqlite_stat1
|
||||||
|
execsql $sql
|
||||||
|
set change [S changeset]
|
||||||
|
S delete
|
||||||
|
|
||||||
|
if {[info vars ret]!=""} {
|
||||||
|
set ret [sqlite3changeset_concat $ret $change]
|
||||||
|
} else {
|
||||||
|
set ret $change
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
changeset_to_list $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
proc do_scc_test {tn args} {
|
||||||
|
uplevel [list \
|
||||||
|
do_test $tn [concat sql_changeset_concat [lrange $args 0 end-1]] \
|
||||||
|
[list {*}[ lindex $args end ]]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
do_execsql_test 3.7.0 {
|
||||||
|
DELETE FROM sqlite_stat1;
|
||||||
|
}
|
||||||
|
do_scc_test 3.7.1 {
|
||||||
|
ANALYZE;
|
||||||
|
} {
|
||||||
|
INSERT INTO t2 VALUES(6,6,6);
|
||||||
|
ANALYZE;
|
||||||
|
} {
|
||||||
|
{INSERT sqlite_stat1 0 XX. {} {t t1 b {} t 5}}
|
||||||
|
{INSERT sqlite_stat1 0 XX. {} {t t2 b {} t 6}}
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
catch { db2 close }
|
||||||
|
reset_db
|
||||||
|
forcedelete test.db2
|
||||||
|
sqlite3 db2 test.db2
|
||||||
|
|
||||||
|
do_test 4.1.0 {
|
||||||
|
do_common_sql {
|
||||||
|
CREATE TABLE t1(a, b);
|
||||||
|
CREATE INDEX i1 ON t1(a);
|
||||||
|
CREATE INDEX i2 ON t1(b);
|
||||||
|
INSERT INTO t1 VALUES(1,1), (2,2);
|
||||||
|
ANALYZE;
|
||||||
|
}
|
||||||
|
execsql { DELETE FROM sqlite_stat1 }
|
||||||
|
} {}
|
||||||
|
|
||||||
|
do_test 4.1.1 {
|
||||||
|
execsql { INSERT INTO t1 VALUES(3,3); }
|
||||||
|
set C [changeset_from_sql {ANALYZE}]
|
||||||
|
set ::c [list]
|
||||||
|
proc xConflict {args} {
|
||||||
|
lappend ::c $args
|
||||||
|
return "OMIT"
|
||||||
|
}
|
||||||
|
sqlite3changeset_apply db2 $C xConflict
|
||||||
|
set ::c
|
||||||
|
} [list {*}{
|
||||||
|
{INSERT sqlite_stat1 CONFLICT {t t1 t i1 t {3 1}} {t t1 t i1 t {2 1}}}
|
||||||
|
{INSERT sqlite_stat1 CONFLICT {t t1 t i2 t {3 1}} {t t1 t i2 t {2 1}}}
|
||||||
|
}]
|
||||||
|
|
||||||
|
do_execsql_test -db db2 4.1.2 {
|
||||||
|
SELECT * FROM sqlite_stat1 ORDER BY 1,2;
|
||||||
|
} {t1 i1 {2 1} t1 i2 {2 1}}
|
||||||
|
|
||||||
|
do_test 4.1.3 {
|
||||||
|
proc xConflict {args} {
|
||||||
|
return "REPLACE"
|
||||||
|
}
|
||||||
|
sqlite3changeset_apply db2 $C xConflict
|
||||||
|
execsql { SELECT * FROM sqlite_stat1 ORDER BY 1,2 } db2
|
||||||
|
} {t1 i1 {3 1} t1 i2 {3 1}}
|
||||||
|
|
||||||
|
do_test 4.2.0 {
|
||||||
|
do_common_sql {
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t3(x,y);
|
||||||
|
INSERT INTO t3 VALUES('a','a');
|
||||||
|
INSERT INTO t3 VALUES('b','b');
|
||||||
|
ANALYZE;
|
||||||
|
}
|
||||||
|
execsql { DELETE FROM sqlite_stat1 }
|
||||||
|
} {}
|
||||||
|
do_test 4.2.1 {
|
||||||
|
execsql { INSERT INTO t3 VALUES('c','c'); }
|
||||||
|
set C [changeset_from_sql {ANALYZE}]
|
||||||
|
set ::c [list]
|
||||||
|
proc xConflict {args} {
|
||||||
|
lappend ::c $args
|
||||||
|
return "OMIT"
|
||||||
|
}
|
||||||
|
sqlite3changeset_apply db2 $C xConflict
|
||||||
|
set ::c
|
||||||
|
} [list {*}{
|
||||||
|
{INSERT sqlite_stat1 CONFLICT {t t3 b {} t 3} {t t3 b {} t 2}}
|
||||||
|
}]
|
||||||
|
|
||||||
|
db2 null null
|
||||||
|
do_execsql_test -db db2 4.2.2 {
|
||||||
|
SELECT * FROM sqlite_stat1 ORDER BY 1,2;
|
||||||
|
} {t3 null 2}
|
||||||
|
|
||||||
|
do_test 4.2.3 {
|
||||||
|
proc xConflict {args} {
|
||||||
|
return "REPLACE"
|
||||||
|
}
|
||||||
|
sqlite3changeset_apply db2 $C xConflict
|
||||||
|
execsql { SELECT * FROM sqlite_stat1 ORDER BY 1,2 } db2
|
||||||
|
} {t3 null 3}
|
||||||
|
|
||||||
|
finish_test
|
||||||
|
|
||||||
+171
-13
@@ -46,6 +46,7 @@ struct sqlite3_session {
|
|||||||
int rc; /* Non-zero if an error has occurred */
|
int rc; /* Non-zero if an error has occurred */
|
||||||
void *pFilterCtx; /* First argument to pass to xTableFilter */
|
void *pFilterCtx; /* First argument to pass to xTableFilter */
|
||||||
int (*xTableFilter)(void *pCtx, const char *zTab);
|
int (*xTableFilter)(void *pCtx, const char *zTab);
|
||||||
|
sqlite3_value *pZeroBlob; /* Value containing X'' */
|
||||||
sqlite3_session *pNext; /* Next session object on same db. */
|
sqlite3_session *pNext; /* Next session object on same db. */
|
||||||
SessionTable *pTable; /* List of attached tables */
|
SessionTable *pTable; /* List of attached tables */
|
||||||
SessionHook hook; /* APIs to grab new and old data with */
|
SessionHook hook; /* APIs to grab new and old data with */
|
||||||
@@ -113,6 +114,7 @@ struct SessionTable {
|
|||||||
SessionTable *pNext;
|
SessionTable *pNext;
|
||||||
char *zName; /* Local name of table */
|
char *zName; /* Local name of table */
|
||||||
int nCol; /* Number of columns in table zName */
|
int nCol; /* Number of columns in table zName */
|
||||||
|
int bStat1; /* True if this is sqlite_stat1 */
|
||||||
const char **azCol; /* Column names */
|
const char **azCol; /* Column names */
|
||||||
u8 *abPK; /* Array of primary key flags */
|
u8 *abPK; /* Array of primary key flags */
|
||||||
int nEntry; /* Total number of entries in hash table */
|
int nEntry; /* Total number of entries in hash table */
|
||||||
@@ -496,6 +498,7 @@ static int sessionPreupdateHash(
|
|||||||
h = sessionHashAppendBlob(h, n, z);
|
h = sessionHashAppendBlob(h, n, z);
|
||||||
}else{
|
}else{
|
||||||
assert( eType==SQLITE_NULL );
|
assert( eType==SQLITE_NULL );
|
||||||
|
assert( pTab->bStat1==0 || i!=1 );
|
||||||
*pbNullPK = 1;
|
*pbNullPK = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -838,7 +841,6 @@ static int sessionPreupdateEqual(
|
|||||||
}
|
}
|
||||||
if( memcmp(a, z, n) ) return 0;
|
if( memcmp(a, z, n) ) return 0;
|
||||||
a += n;
|
a += n;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -894,9 +896,7 @@ static int sessionGrowHash(int bPatchset, SessionTable *pTab){
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
** This function queries the database for the names of the columns of table
|
** This function queries the database for the names of the columns of table
|
||||||
** zThis, in schema zDb. It is expected that the table has nCol columns. If
|
** zThis, in schema zDb.
|
||||||
** not, SQLITE_SCHEMA is returned and none of the output variables are
|
|
||||||
** populated.
|
|
||||||
**
|
**
|
||||||
** Otherwise, if they are not NULL, variable *pnCol is set to the number
|
** Otherwise, if they are not NULL, variable *pnCol is set to the number
|
||||||
** of columns in the database table and variable *pzTab is set to point to a
|
** of columns in the database table and variable *pzTab is set to point to a
|
||||||
@@ -917,9 +917,7 @@ static int sessionGrowHash(int bPatchset, SessionTable *pTab){
|
|||||||
** *pabPK = {1, 0, 0, 1}
|
** *pabPK = {1, 0, 0, 1}
|
||||||
**
|
**
|
||||||
** All returned buffers are part of the same single allocation, which must
|
** All returned buffers are part of the same single allocation, which must
|
||||||
** be freed using sqlite3_free() by the caller. If pazCol was not NULL, then
|
** be freed using sqlite3_free() by the caller
|
||||||
** pointer *pazCol should be freed to release all memory. Otherwise, pointer
|
|
||||||
** *pabPK. It is illegal for both pazCol and pabPK to be NULL.
|
|
||||||
*/
|
*/
|
||||||
static int sessionTableInfo(
|
static int sessionTableInfo(
|
||||||
sqlite3 *db, /* Database connection */
|
sqlite3 *db, /* Database connection */
|
||||||
@@ -944,7 +942,23 @@ static int sessionTableInfo(
|
|||||||
assert( pazCol && pabPK );
|
assert( pazCol && pabPK );
|
||||||
|
|
||||||
nThis = sqlite3Strlen30(zThis);
|
nThis = sqlite3Strlen30(zThis);
|
||||||
|
if( nThis==12 && 0==sqlite3_stricmp("sqlite_stat1", zThis) ){
|
||||||
|
rc = sqlite3_table_column_metadata(db, zDb, zThis, 0, 0, 0, 0, 0, 0);
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
/* For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. */
|
||||||
|
zPragma = sqlite3_mprintf(
|
||||||
|
"SELECT 0, 'tbl', '', 0, '', 1 UNION ALL "
|
||||||
|
"SELECT 1, 'idx', '', 0, '', 2 UNION ALL "
|
||||||
|
"SELECT 2, 'stat', '', 0, '', 0"
|
||||||
|
);
|
||||||
|
}else if( rc==SQLITE_ERROR ){
|
||||||
|
zPragma = sqlite3_mprintf("");
|
||||||
|
}else{
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
zPragma = sqlite3_mprintf("PRAGMA '%q'.table_info('%q')", zDb, zThis);
|
zPragma = sqlite3_mprintf("PRAGMA '%q'.table_info('%q')", zDb, zThis);
|
||||||
|
}
|
||||||
if( !zPragma ) return SQLITE_NOMEM;
|
if( !zPragma ) return SQLITE_NOMEM;
|
||||||
|
|
||||||
rc = sqlite3_prepare_v2(db, zPragma, -1, &pStmt, 0);
|
rc = sqlite3_prepare_v2(db, zPragma, -1, &pStmt, 0);
|
||||||
@@ -1036,11 +1050,55 @@ static int sessionInitTable(sqlite3_session *pSession, SessionTable *pTab){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if( 0==sqlite3_stricmp("sqlite_stat1", pTab->zName) ){
|
||||||
|
pTab->bStat1 = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (pSession->rc || pTab->abPK==0);
|
return (pSession->rc || pTab->abPK==0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Versions of the four methods in object SessionHook for use with the
|
||||||
|
** sqlite_stat1 table. The purpose of this is to substitute a zero-length
|
||||||
|
** blob each time a NULL value is read from the "idx" column of the
|
||||||
|
** sqlite_stat1 table.
|
||||||
|
*/
|
||||||
|
typedef struct SessionStat1Ctx SessionStat1Ctx;
|
||||||
|
struct SessionStat1Ctx {
|
||||||
|
SessionHook hook;
|
||||||
|
sqlite3_session *pSession;
|
||||||
|
};
|
||||||
|
static int sessionStat1Old(void *pCtx, int iCol, sqlite3_value **ppVal){
|
||||||
|
SessionStat1Ctx *p = (SessionStat1Ctx*)pCtx;
|
||||||
|
sqlite3_value *pVal = 0;
|
||||||
|
int rc = p->hook.xOld(p->hook.pCtx, iCol, &pVal);
|
||||||
|
if( rc==SQLITE_OK && iCol==1 && sqlite3_value_type(pVal)==SQLITE_NULL ){
|
||||||
|
pVal = p->pSession->pZeroBlob;
|
||||||
|
}
|
||||||
|
*ppVal = pVal;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
static int sessionStat1New(void *pCtx, int iCol, sqlite3_value **ppVal){
|
||||||
|
SessionStat1Ctx *p = (SessionStat1Ctx*)pCtx;
|
||||||
|
sqlite3_value *pVal = 0;
|
||||||
|
int rc = p->hook.xNew(p->hook.pCtx, iCol, &pVal);
|
||||||
|
if( rc==SQLITE_OK && iCol==1 && sqlite3_value_type(pVal)==SQLITE_NULL ){
|
||||||
|
pVal = p->pSession->pZeroBlob;
|
||||||
|
}
|
||||||
|
*ppVal = pVal;
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
static int sessionStat1Count(void *pCtx){
|
||||||
|
SessionStat1Ctx *p = (SessionStat1Ctx*)pCtx;
|
||||||
|
return p->hook.xCount(p->hook.pCtx);
|
||||||
|
}
|
||||||
|
static int sessionStat1Depth(void *pCtx){
|
||||||
|
SessionStat1Ctx *p = (SessionStat1Ctx*)pCtx;
|
||||||
|
return p->hook.xDepth(p->hook.pCtx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** This function is only called from with a pre-update-hook reporting a
|
** This function is only called from with a pre-update-hook reporting a
|
||||||
** change on table pTab (attached to session pSession). The type of change
|
** change on table pTab (attached to session pSession). The type of change
|
||||||
@@ -1057,6 +1115,7 @@ static void sessionPreupdateOneChange(
|
|||||||
int iHash;
|
int iHash;
|
||||||
int bNull = 0;
|
int bNull = 0;
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
|
SessionStat1Ctx stat1 = {0};
|
||||||
|
|
||||||
if( pSession->rc ) return;
|
if( pSession->rc ) return;
|
||||||
|
|
||||||
@@ -1076,6 +1135,25 @@ static void sessionPreupdateOneChange(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( pTab->bStat1 ){
|
||||||
|
stat1.hook = pSession->hook;
|
||||||
|
stat1.pSession = pSession;
|
||||||
|
pSession->hook.pCtx = (void*)&stat1;
|
||||||
|
pSession->hook.xNew = sessionStat1New;
|
||||||
|
pSession->hook.xOld = sessionStat1Old;
|
||||||
|
pSession->hook.xCount = sessionStat1Count;
|
||||||
|
pSession->hook.xDepth = sessionStat1Depth;
|
||||||
|
if( pSession->pZeroBlob==0 ){
|
||||||
|
sqlite3_value *p = sqlite3ValueNew(0);
|
||||||
|
if( p==0 ){
|
||||||
|
rc = SQLITE_NOMEM;
|
||||||
|
goto error_out;
|
||||||
|
}
|
||||||
|
sqlite3ValueSetStr(p, 0, "", 0, SQLITE_STATIC);
|
||||||
|
pSession->pZeroBlob = p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Calculate the hash-key for this change. If the primary key of the row
|
/* Calculate the hash-key for this change. If the primary key of the row
|
||||||
** includes a NULL value, exit early. Such changes are ignored by the
|
** includes a NULL value, exit early. Such changes are ignored by the
|
||||||
** session module. */
|
** session module. */
|
||||||
@@ -1165,6 +1243,9 @@ static void sessionPreupdateOneChange(
|
|||||||
|
|
||||||
/* If an error has occurred, mark the session object as failed. */
|
/* If an error has occurred, mark the session object as failed. */
|
||||||
error_out:
|
error_out:
|
||||||
|
if( pTab->bStat1 ){
|
||||||
|
pSession->hook = stat1.hook;
|
||||||
|
}
|
||||||
if( rc!=SQLITE_OK ){
|
if( rc!=SQLITE_OK ){
|
||||||
pSession->rc = rc;
|
pSession->rc = rc;
|
||||||
}
|
}
|
||||||
@@ -1501,7 +1582,6 @@ int sqlite3session_diff(
|
|||||||
if( abPK[i] ) bHasPk = 1;
|
if( abPK[i] ) bHasPk = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
sqlite3_free((char*)azCol);
|
sqlite3_free((char*)azCol);
|
||||||
if( bMismatch ){
|
if( bMismatch ){
|
||||||
@@ -1627,6 +1707,7 @@ void sqlite3session_delete(sqlite3_session *pSession){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sqlite3_mutex_leave(sqlite3_db_mutex(db));
|
sqlite3_mutex_leave(sqlite3_db_mutex(db));
|
||||||
|
sqlite3ValueFree(pSession->pZeroBlob);
|
||||||
|
|
||||||
/* Delete all attached table objects. And the contents of their
|
/* Delete all attached table objects. And the contents of their
|
||||||
** associated hash-tables. */
|
** associated hash-tables. */
|
||||||
@@ -2094,6 +2175,15 @@ static int sessionSelectStmt(
|
|||||||
sqlite3_stmt **ppStmt /* OUT: Prepared SELECT statement */
|
sqlite3_stmt **ppStmt /* OUT: Prepared SELECT statement */
|
||||||
){
|
){
|
||||||
int rc = SQLITE_OK;
|
int rc = SQLITE_OK;
|
||||||
|
char *zSql = 0;
|
||||||
|
int nSql = -1;
|
||||||
|
|
||||||
|
if( 0==sqlite3_stricmp("sqlite_stat1", zTab) ){
|
||||||
|
zSql = sqlite3_mprintf(
|
||||||
|
"SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND "
|
||||||
|
"idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)", zDb
|
||||||
|
);
|
||||||
|
}else{
|
||||||
int i;
|
int i;
|
||||||
const char *zSep = "";
|
const char *zSep = "";
|
||||||
SessionBuffer buf = {0, 0, 0};
|
SessionBuffer buf = {0, 0, 0};
|
||||||
@@ -2107,15 +2197,19 @@ static int sessionSelectStmt(
|
|||||||
if( abPK[i] ){
|
if( abPK[i] ){
|
||||||
sessionAppendStr(&buf, zSep, &rc);
|
sessionAppendStr(&buf, zSep, &rc);
|
||||||
sessionAppendIdent(&buf, azCol[i], &rc);
|
sessionAppendIdent(&buf, azCol[i], &rc);
|
||||||
sessionAppendStr(&buf, " = ?", &rc);
|
sessionAppendStr(&buf, " IS ?", &rc);
|
||||||
sessionAppendInteger(&buf, i+1, &rc);
|
sessionAppendInteger(&buf, i+1, &rc);
|
||||||
zSep = " AND ";
|
zSep = " AND ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( rc==SQLITE_OK ){
|
zSql = (char*)buf.aBuf;
|
||||||
rc = sqlite3_prepare_v2(db, (char *)buf.aBuf, buf.nBuf, ppStmt, 0);
|
nSql = buf.nBuf;
|
||||||
}
|
}
|
||||||
sqlite3_free(buf.aBuf);
|
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = sqlite3_prepare_v2(db, zSql, nSql, ppStmt, 0);
|
||||||
|
}
|
||||||
|
sqlite3_free(zSql);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3284,7 +3378,7 @@ struct SessionApplyCtx {
|
|||||||
int nCol; /* Size of azCol[] and abPK[] arrays */
|
int nCol; /* Size of azCol[] and abPK[] arrays */
|
||||||
const char **azCol; /* Array of column names */
|
const char **azCol; /* Array of column names */
|
||||||
u8 *abPK; /* Boolean array - true if column is in PK */
|
u8 *abPK; /* Boolean array - true if column is in PK */
|
||||||
|
int bStat1; /* True if table is sqlite_stat1 */
|
||||||
int bDeferConstraints; /* True to defer constraints */
|
int bDeferConstraints; /* True to defer constraints */
|
||||||
SessionBuffer constraints; /* Deferred constraints are stored here */
|
SessionBuffer constraints; /* Deferred constraints are stored here */
|
||||||
};
|
};
|
||||||
@@ -3454,6 +3548,7 @@ static int sessionUpdateRow(
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Formulate and prepare an SQL statement to query table zTab by primary
|
** Formulate and prepare an SQL statement to query table zTab by primary
|
||||||
** key. Assuming the following table structure:
|
** key. Assuming the following table structure:
|
||||||
@@ -3515,6 +3610,47 @@ static int sessionInsertRow(
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int sessionPrepare(sqlite3 *db, sqlite3_stmt **pp, const char *zSql){
|
||||||
|
return sqlite3_prepare_v2(db, zSql, -1, pp, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Prepare statements for applying changes to the sqlite_stat1 table.
|
||||||
|
** These are similar to those created by sessionSelectRow(),
|
||||||
|
** sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for
|
||||||
|
** other tables.
|
||||||
|
*/
|
||||||
|
static int sessionStat1Sql(sqlite3 *db, SessionApplyCtx *p){
|
||||||
|
int rc = sessionSelectRow(db, "sqlite_stat1", p);
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = sessionPrepare(db, &p->pInsert,
|
||||||
|
"INSERT INTO main.sqlite_stat1 VALUES(?1, "
|
||||||
|
"CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, "
|
||||||
|
"?3)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = sessionPrepare(db, &p->pUpdate,
|
||||||
|
"UPDATE main.sqlite_stat1 SET "
|
||||||
|
"tbl = CASE WHEN ?2 THEN ?3 ELSE tbl END, "
|
||||||
|
"idx = CASE WHEN ?5 THEN ?6 ELSE idx END, "
|
||||||
|
"stat = CASE WHEN ?8 THEN ?9 ELSE stat END "
|
||||||
|
"WHERE tbl=?1 AND idx IS "
|
||||||
|
"CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END "
|
||||||
|
"AND (?10 OR ?8=0 OR stat IS ?7)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
|
rc = sessionPrepare(db, &p->pDelete,
|
||||||
|
"DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS "
|
||||||
|
"CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END "
|
||||||
|
"AND (?4 OR stat IS ?3)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
assert( rc==SQLITE_OK );
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** A wrapper around sqlite3_bind_value() that detects an extra problem.
|
** A wrapper around sqlite3_bind_value() that detects an extra problem.
|
||||||
** See comments in the body of this function for details.
|
** See comments in the body of this function for details.
|
||||||
@@ -3845,11 +3981,25 @@ static int sessionApplyOneOp(
|
|||||||
|
|
||||||
}else{
|
}else{
|
||||||
assert( op==SQLITE_INSERT );
|
assert( op==SQLITE_INSERT );
|
||||||
|
if( p->bStat1 ){
|
||||||
|
/* Check if there is a conflicting row. For sqlite_stat1, this needs
|
||||||
|
** to be done using a SELECT, as there is no PRIMARY KEY in the
|
||||||
|
** database schema to throw an exception if a duplicate is inserted. */
|
||||||
|
rc = sessionSeekToRow(p->db, pIter, p->abPK, p->pSelect);
|
||||||
|
if( rc==SQLITE_ROW ){
|
||||||
|
rc = SQLITE_CONSTRAINT;
|
||||||
|
sqlite3_reset(p->pSelect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( rc==SQLITE_OK ){
|
||||||
rc = sessionBindRow(pIter, sqlite3changeset_new, nCol, 0, p->pInsert);
|
rc = sessionBindRow(pIter, sqlite3changeset_new, nCol, 0, p->pInsert);
|
||||||
if( rc!=SQLITE_OK ) return rc;
|
if( rc!=SQLITE_OK ) return rc;
|
||||||
|
|
||||||
sqlite3_step(p->pInsert);
|
sqlite3_step(p->pInsert);
|
||||||
rc = sqlite3_reset(p->pInsert);
|
rc = sqlite3_reset(p->pInsert);
|
||||||
|
}
|
||||||
|
|
||||||
if( (rc&0xff)==SQLITE_CONSTRAINT ){
|
if( (rc&0xff)==SQLITE_CONSTRAINT ){
|
||||||
rc = sessionConflictHandler(
|
rc = sessionConflictHandler(
|
||||||
SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, pbReplace
|
SQLITE_CHANGESET_CONFLICT, p, pIter, xConflict, pCtx, pbReplace
|
||||||
@@ -4082,6 +4232,12 @@ static int sessionChangesetApply(
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
sApply.nCol = nCol;
|
sApply.nCol = nCol;
|
||||||
|
if( 0==sqlite3_stricmp(zTab, "sqlite_stat1") ){
|
||||||
|
if( (rc = sessionStat1Sql(db, &sApply) ) ){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sApply.bStat1 = 1;
|
||||||
|
}else{
|
||||||
if((rc = sessionSelectRow(db, zTab, &sApply))
|
if((rc = sessionSelectRow(db, zTab, &sApply))
|
||||||
|| (rc = sessionUpdateRow(db, zTab, &sApply))
|
|| (rc = sessionUpdateRow(db, zTab, &sApply))
|
||||||
|| (rc = sessionDeleteRow(db, zTab, &sApply))
|
|| (rc = sessionDeleteRow(db, zTab, &sApply))
|
||||||
@@ -4089,6 +4245,8 @@ static int sessionChangesetApply(
|
|||||||
){
|
){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
sApply.bStat1 = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
nTab = sqlite3Strlen30(zTab);
|
nTab = sqlite3Strlen30(zTab);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,35 @@ int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect);
|
|||||||
**
|
**
|
||||||
** SQLITE_OK is returned if the call completes without error. Or, if an error
|
** SQLITE_OK is returned if the call completes without error. Or, if an error
|
||||||
** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned.
|
** occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned.
|
||||||
|
**
|
||||||
|
** <h3>Special sqlite_stat1 Handling</h3>
|
||||||
|
**
|
||||||
|
** As of SQLite version 3.22.0, the "sqlite_stat1" table is an exception to
|
||||||
|
** some of the rules above. In SQLite, the schema of sqlite_stat1 is:
|
||||||
|
** <pre>
|
||||||
|
** CREATE TABLE sqlite_stat1(tbl,idx,stat)
|
||||||
|
** </pre>
|
||||||
|
**
|
||||||
|
** Even though sqlite_stat1 does not have a PRIMARY KEY, changes are
|
||||||
|
** recorded for it as if the PRIMARY KEY is (tbl,idx). Additionally, changes
|
||||||
|
** are recorded for rows for which (idx IS NULL) is true. However, for such
|
||||||
|
** rows a zero-length blob (SQL value X'') is stored in the changeset or
|
||||||
|
** patchset instead of a NULL value. This allows such changesets to be
|
||||||
|
** manipulated by legacy implementations of sqlite3changeset_invert(),
|
||||||
|
** concat() and similar.
|
||||||
|
**
|
||||||
|
** The sqlite3changeset_apply() function automatically converts the
|
||||||
|
** zero-length blob back to a NULL value when updating the sqlite_stat1
|
||||||
|
** table. However, if the application calls sqlite3changeset_new(),
|
||||||
|
** sqlite3changeset_old() or sqlite3changeset_conflict on a changeset
|
||||||
|
** iterator directly (including on a changeset iterator passed to a
|
||||||
|
** conflict-handler callback) then the X'' value is returned. The application
|
||||||
|
** must translate X'' to NULL itself if required.
|
||||||
|
**
|
||||||
|
** Legacy (older than 3.22.0) versions of the sessions module cannot capture
|
||||||
|
** changes made to the sqlite_stat1 table. Legacy versions of the
|
||||||
|
** sqlite3changeset_apply() function silently ignore any modifications to the
|
||||||
|
** sqlite_stat1 table that are part of a changeset or patchset.
|
||||||
*/
|
*/
|
||||||
int sqlite3session_attach(
|
int sqlite3session_attach(
|
||||||
sqlite3_session *pSession, /* Session object */
|
sqlite3_session *pSession, /* Session object */
|
||||||
|
|||||||
@@ -371,6 +371,7 @@ TESTSRC += \
|
|||||||
$(TOP)/ext/misc/unionvtab.c \
|
$(TOP)/ext/misc/unionvtab.c \
|
||||||
$(TOP)/ext/misc/wholenumber.c \
|
$(TOP)/ext/misc/wholenumber.c \
|
||||||
$(TOP)/ext/misc/vfslog.c \
|
$(TOP)/ext/misc/vfslog.c \
|
||||||
|
$(TOP)/ext/misc/zipfile.c \
|
||||||
$(TOP)/ext/fts5/fts5_tcl.c \
|
$(TOP)/ext/fts5/fts5_tcl.c \
|
||||||
$(TOP)/ext/fts5/fts5_test_mi.c \
|
$(TOP)/ext/fts5/fts5_test_mi.c \
|
||||||
$(TOP)/ext/fts5/fts5_test_tok.c
|
$(TOP)/ext/fts5/fts5_test_tok.c
|
||||||
@@ -422,6 +423,7 @@ TESTSRC2 = \
|
|||||||
$(TOP)/ext/fts3/fts3_tokenizer.c \
|
$(TOP)/ext/fts3/fts3_tokenizer.c \
|
||||||
$(TOP)/ext/fts3/fts3_write.c \
|
$(TOP)/ext/fts3/fts3_write.c \
|
||||||
$(TOP)/ext/async/sqlite3async.c \
|
$(TOP)/ext/async/sqlite3async.c \
|
||||||
|
$(TOP)/ext/misc/stmt.c \
|
||||||
$(TOP)/ext/session/sqlite3session.c \
|
$(TOP)/ext/session/sqlite3session.c \
|
||||||
$(TOP)/ext/session/test_session.c
|
$(TOP)/ext/session/test_session.c
|
||||||
|
|
||||||
@@ -487,7 +489,8 @@ TESTPROGS = \
|
|||||||
sqlite3_analyzer$(EXE) \
|
sqlite3_analyzer$(EXE) \
|
||||||
sqlite3_checker$(EXE) \
|
sqlite3_checker$(EXE) \
|
||||||
sqldiff$(EXE) \
|
sqldiff$(EXE) \
|
||||||
dbhash$(EXE)
|
dbhash$(EXE) \
|
||||||
|
sqltclsh$(EXE)
|
||||||
|
|
||||||
# Databases containing fuzzer test cases
|
# Databases containing fuzzer test cases
|
||||||
#
|
#
|
||||||
@@ -505,6 +508,7 @@ TESTOPTS = --verbose=file --output=test-out.txt
|
|||||||
# Extra compiler options for various shell tools
|
# Extra compiler options for various shell tools
|
||||||
#
|
#
|
||||||
SHELL_OPT += -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
|
SHELL_OPT += -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
|
||||||
|
SHELL_OPT += -DSQLITE_ENABLE_RTREE
|
||||||
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||||
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
|
||||||
SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
|
SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
|
||||||
@@ -693,11 +697,15 @@ keywordhash.h: $(TOP)/tool/mkkeywordhash.c
|
|||||||
# Source files that go into making shell.c
|
# Source files that go into making shell.c
|
||||||
SHELL_SRC = \
|
SHELL_SRC = \
|
||||||
$(TOP)/src/shell.c.in \
|
$(TOP)/src/shell.c.in \
|
||||||
|
$(TOP)/ext/misc/appendvfs.c \
|
||||||
$(TOP)/ext/misc/shathree.c \
|
$(TOP)/ext/misc/shathree.c \
|
||||||
$(TOP)/ext/misc/fileio.c \
|
$(TOP)/ext/misc/fileio.c \
|
||||||
$(TOP)/ext/misc/completion.c \
|
$(TOP)/ext/misc/completion.c \
|
||||||
|
$(TOP)/ext/misc/sqlar.c \
|
||||||
$(TOP)/ext/expert/sqlite3expert.c \
|
$(TOP)/ext/expert/sqlite3expert.c \
|
||||||
$(TOP)/ext/expert/sqlite3expert.h
|
$(TOP)/ext/expert/sqlite3expert.h \
|
||||||
|
$(TOP)/ext/misc/zipfile.c \
|
||||||
|
$(TOP)/src/test_windirent.c
|
||||||
|
|
||||||
shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
|
shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
|
||||||
tclsh $(TOP)/tool/mkshellc.tcl >shell.c
|
tclsh $(TOP)/tool/mkshellc.tcl >shell.c
|
||||||
@@ -816,6 +824,12 @@ sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $
|
|||||||
sqlite3_analyzer$(EXE): sqlite3_analyzer.c
|
sqlite3_analyzer$(EXE): sqlite3_analyzer.c
|
||||||
$(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(THREADLIB)
|
$(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(THREADLIB)
|
||||||
|
|
||||||
|
sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl
|
||||||
|
tclsh $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
|
||||||
|
|
||||||
|
sqltclsh$(EXE): sqltclsh.c
|
||||||
|
$(TCCX) $(TCL_FLAGS) sqltclsh.c -o $@ $(LIBTCL) $(THREADLIB)
|
||||||
|
|
||||||
sqlite3_expert$(EXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
|
sqlite3_expert$(EXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
|
||||||
$(TCCX) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert$(EXE) $(THREADLIB)
|
$(TCCX) -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert$(EXE) $(THREADLIB)
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
C Fix\scompiler\swarnings\son\sWindows.
|
C Merge\schanges\sfrom\strunk.
|
||||||
D 2018-01-03T23:54:18.421
|
D 2018-01-24T15:02:53.185
|
||||||
F Makefile.in 892bf253c48f3d2d8d4e4e89b44b71aa548a0eba11b148c338690cfb99822859
|
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||||
|
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||||
|
F Makefile.in 2974b995b10238cb009db0b89edafb8f5a3a309ef8e50ceb1e988ae687d5f50d
|
||||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||||
F Makefile.msc 3b7ee2ebaf579fe7d30bece93e61e52782c3ff836455cba3a192f7a8f6f269d6
|
F Makefile.msc ce9db774520fb2e2d82ce32cefa4e16db37105ab4b28ed32c6c0f90212dd4a83
|
||||||
F README.md eeae1e552f93ef72ef7c5b8f6647b368a001c28820ad1df179d3dae602bef681
|
F README.md d748f58e3ab0fe0307fb4ae0942b415d93dcc4288756e366cc9e7cf8260c093f
|
||||||
F VERSION 0c10cdfed866fdd2d80434f64f042c3330f1daaed12e54287beb104f04b3faaf
|
F VERSION cdf91ac446255ecf3d8f6d8c3ee40d64123235ae5b3cef29d344e61b45ec3759
|
||||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||||
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
|
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
|
||||||
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
|
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
|
||||||
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
|
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
|
||||||
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
|
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
|
||||||
F autoconf/Makefile.am 66c0befa511f0d95ba229e180067cf0357a9ebf8b3201b06d683c5ba6220fb39
|
F autoconf/Makefile.am 6cca3f797c649b40c762484ce26491839fec54de72d376d774969e76ed13931f
|
||||||
F autoconf/Makefile.msc b88a70dee8453cc353e5d6df172d60a11a0af905710a24b1e6be80f8fea6e96b
|
F autoconf/Makefile.msc 2c50a59319af7da4eaca8c13e3240881b1bc245fd175845a055faab7d03d6e67
|
||||||
F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
|
F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
|
||||||
F autoconf/README.txt 4f04b0819303aabaa35fff5f7b257fb0c1ef95f1
|
F autoconf/README.txt 4f04b0819303aabaa35fff5f7b257fb0c1ef95f1
|
||||||
F autoconf/configure.ac 8dd08ca564279fff091c9bfdd2599d8f992c9f1f70c5396de2126ad2bd1b3bed
|
F autoconf/configure.ac aeeed858e5e54e79052ae44ba774e56595dcb787f23a2155aa98a8aa27327b66
|
||||||
F autoconf/tea/Makefile.in b438a7020446c8a8156e8d97c8914a04833da6fd
|
F autoconf/tea/Makefile.in b438a7020446c8a8156e8d97c8914a04833da6fd
|
||||||
F autoconf/tea/README 3e9a3c060f29a44344ab50aec506f4db903fb873
|
F autoconf/tea/README 3e9a3c060f29a44344ab50aec506f4db903fb873
|
||||||
F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43
|
F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43
|
||||||
@@ -30,7 +32,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
|
|||||||
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
|
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
|
||||||
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
|
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
|
||||||
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
|
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
|
||||||
F configure 9af547be0e0e1a8fca8553b82599b5a3be1528a3d78deb68cb49d3b611215cb7 x
|
F configure 2c71f331b463e987567a2dd942f728534f1aa7a174551e08a7b31b328e9da4ff x
|
||||||
F configure.ac d4529ebb26ae046269334f1dac65f2b1d6927c2efe22b2ec24dce24dfe4f83dd
|
F configure.ac d4529ebb26ae046269334f1dac65f2b1d6927c2efe22b2ec24dce24dfe4f83dd
|
||||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||||
F doc/lemon.html 278113807f49d12d04179a93fab92b5b917a08771152ca7949d34e928efa3941
|
F doc/lemon.html 278113807f49d12d04179a93fab92b5b917a08771152ca7949d34e928efa3941
|
||||||
@@ -42,10 +44,10 @@ F ext/async/sqlite3async.c 0f3070cc3f5ede78f2b9361fb3b629ce200d7d74
|
|||||||
F ext/async/sqlite3async.h f489b080af7e72aec0e1ee6f1d98ab6cf2e4dcef
|
F ext/async/sqlite3async.h f489b080af7e72aec0e1ee6f1d98ab6cf2e4dcef
|
||||||
F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3
|
F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3
|
||||||
F ext/expert/expert.c 4791c5e064aea81b2b829fa95228b22283380ee370ea88a1e580103b75516ebf
|
F ext/expert/expert.c 4791c5e064aea81b2b829fa95228b22283380ee370ea88a1e580103b75516ebf
|
||||||
F ext/expert/expert1.test 0c71a3453ce3a0b4dbe952713aec0ae8d416dd846820dd027b08f305f5278b30
|
F ext/expert/expert1.test fd21496d8e52c817a7741f467f42b0502c0ac7e07dcdd1d6e15a3e8154ed4e41
|
||||||
F ext/expert/sqlite3expert.c 252f3129f12a0e9df094a14711db98265c9c6d7afa033ec906d94e920f5c7ba7
|
F ext/expert/sqlite3expert.c 1dfa561e64dc0f89d56b96e6afda87468c34b43604c2df50c47e3f4362778fb2
|
||||||
F ext/expert/sqlite3expert.h af6354f8ee5c9e025024e63fec3bd640a802afcc3099a44d804752cf0791d811
|
F ext/expert/sqlite3expert.h af6354f8ee5c9e025024e63fec3bd640a802afcc3099a44d804752cf0791d811
|
||||||
F ext/expert/test_expert.c 85f5c743a899063fa48296d21de2f32c26d09a21c8582b2a0bc482e8de183e7a
|
F ext/expert/test_expert.c d56c194b769bdc90cf829a14c9ecbc1edca9c850b837a4d0b13be14095c32a72
|
||||||
F ext/fts1/README.txt 20ac73b006a70bcfd80069bdaf59214b6cf1db5e
|
F ext/fts1/README.txt 20ac73b006a70bcfd80069bdaf59214b6cf1db5e
|
||||||
F ext/fts1/ft_hash.c 3927bd880e65329bdc6f506555b228b28924921b
|
F ext/fts1/ft_hash.c 3927bd880e65329bdc6f506555b228b28924921b
|
||||||
F ext/fts1/ft_hash.h 06df7bba40dadd19597aa400a875dbc2fed705ea
|
F ext/fts1/ft_hash.h 06df7bba40dadd19597aa400a875dbc2fed705ea
|
||||||
@@ -114,7 +116,7 @@ F ext/fts5/fts5_hash.c 32be400cf761868c9db33efe81a06eb19a17c5402ad477ee9efb51301
|
|||||||
F ext/fts5/fts5_index.c 5fe14375a29e8a7aa8f3e863babe180a19269206c254c8f47b216821d4ac1e15
|
F ext/fts5/fts5_index.c 5fe14375a29e8a7aa8f3e863babe180a19269206c254c8f47b216821d4ac1e15
|
||||||
F ext/fts5/fts5_main.c 24868f88ab2a865defbba7a92eebeb726cc991eb092b71b5f5508f180c72605b
|
F ext/fts5/fts5_main.c 24868f88ab2a865defbba7a92eebeb726cc991eb092b71b5f5508f180c72605b
|
||||||
F ext/fts5/fts5_storage.c fb5ef3c27073f67ade2e1bea08405f9e43f68f5f3676ed0ab7013bce5ba10be6
|
F ext/fts5/fts5_storage.c fb5ef3c27073f67ade2e1bea08405f9e43f68f5f3676ed0ab7013bce5ba10be6
|
||||||
F ext/fts5/fts5_tcl.c a7df39442ae674dde877cf06fe02ebb7658e69c179a4d223241c90df4f14b54e
|
F ext/fts5/fts5_tcl.c 39bcbae507f594aad778172fa914cad0f585bf92fd3b078c686e249282db0d95
|
||||||
F ext/fts5/fts5_test_mi.c 65864ba1e5c34a61d409c4c587e0bbe0466eb4f8f478d85dc42a92caad1338e6
|
F ext/fts5/fts5_test_mi.c 65864ba1e5c34a61d409c4c587e0bbe0466eb4f8f478d85dc42a92caad1338e6
|
||||||
F ext/fts5/fts5_test_tok.c ffd657dd67e7fcdb31bf63fb60b6d867299a581d0f46e97086abacd66c2a9b26
|
F ext/fts5/fts5_test_tok.c ffd657dd67e7fcdb31bf63fb60b6d867299a581d0f46e97086abacd66c2a9b26
|
||||||
F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8
|
F ext/fts5/fts5_tokenize.c 2ce7b44183538ec46b7907726262ee43ffdd39a8
|
||||||
@@ -163,10 +165,10 @@ F ext/fts5/test/fts5fault2.test 69c8fdbef830cd0d450908d4504d5bb86609e255af99c421
|
|||||||
F ext/fts5/test/fts5fault3.test da2f9e3e56ff5740d68ebdd6877c97089e7ed28ddff28a0da87a6afea27e5522
|
F ext/fts5/test/fts5fault3.test da2f9e3e56ff5740d68ebdd6877c97089e7ed28ddff28a0da87a6afea27e5522
|
||||||
F ext/fts5/test/fts5fault4.test 1c1db5fcfe59401e7833146100f1d8de284a0a686fac31ddac9fb56c459f725b
|
F ext/fts5/test/fts5fault4.test 1c1db5fcfe59401e7833146100f1d8de284a0a686fac31ddac9fb56c459f725b
|
||||||
F ext/fts5/test/fts5fault5.test a336e4e11847de24c9497f80cce18e00bb3fab7fb11f97d04eb9af898900a762
|
F ext/fts5/test/fts5fault5.test a336e4e11847de24c9497f80cce18e00bb3fab7fb11f97d04eb9af898900a762
|
||||||
F ext/fts5/test/fts5fault6.test 8a3c61402e36960ba46a419e73121fcefdc9160e0c04b6f5318c7fb0e3180dbc
|
F ext/fts5/test/fts5fault6.test a0fc0a8f99e4b16500c31dfc7e38e1defe0f1693ac47650517ac7b723b1956f8
|
||||||
F ext/fts5/test/fts5fault7.test 0acbec416edb24b8881f154e99c31e9ccf73f539cfcd164090be139e9e97ed4c
|
F ext/fts5/test/fts5fault7.test 0acbec416edb24b8881f154e99c31e9ccf73f539cfcd164090be139e9e97ed4c
|
||||||
F ext/fts5/test/fts5fault8.test 318238659d35f82ad215ecb57ca4c87486ea85d45dbeedaee42f148ff5105ee2
|
F ext/fts5/test/fts5fault8.test 318238659d35f82ad215ecb57ca4c87486ea85d45dbeedaee42f148ff5105ee2
|
||||||
F ext/fts5/test/fts5fault9.test 0111b229388bdf251b91cfead68580227801dd30960a19aa8fe9021a1e73cb6d
|
F ext/fts5/test/fts5fault9.test 098e6b894bbdf9b2192f994a30f4043673fb3f338b6b8ab1624c704422f39119
|
||||||
F ext/fts5/test/fts5faultA.test be4487576bff8c22cee6597d1893b312f306504a8c6ccd3c53ca85af12290c8c
|
F ext/fts5/test/fts5faultA.test be4487576bff8c22cee6597d1893b312f306504a8c6ccd3c53ca85af12290c8c
|
||||||
F ext/fts5/test/fts5faultB.test e6d04f9ea7b21be1d89abb8df2cb4baf65b0453b744d5a805fcd3ef45ff86a7e
|
F ext/fts5/test/fts5faultB.test e6d04f9ea7b21be1d89abb8df2cb4baf65b0453b744d5a805fcd3ef45ff86a7e
|
||||||
F ext/fts5/test/fts5faultD.test cc5d1225556e356615e719c612e845d41bff7d5a
|
F ext/fts5/test/fts5faultD.test cc5d1225556e356615e719c612e845d41bff7d5a
|
||||||
@@ -221,7 +223,7 @@ F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
|
|||||||
F ext/lsm1/Makefile 98b0a24b45e248283d6bea4b6cb3e58d7b394edd8e96a0ac28c5fa5104813bad
|
F ext/lsm1/Makefile 98b0a24b45e248283d6bea4b6cb3e58d7b394edd8e96a0ac28c5fa5104813bad
|
||||||
F ext/lsm1/Makefile.msc f8c878b467232226de288da320e1ac71c131f5ec91e08b21f502303347260013
|
F ext/lsm1/Makefile.msc f8c878b467232226de288da320e1ac71c131f5ec91e08b21f502303347260013
|
||||||
F ext/lsm1/lsm-test/README 87ea529d2abe615e856d4714bfe8bb185e6c2771b8612aa6298588b7b43e6f86
|
F ext/lsm1/lsm-test/README 87ea529d2abe615e856d4714bfe8bb185e6c2771b8612aa6298588b7b43e6f86
|
||||||
F ext/lsm1/lsm-test/lsmtest.h 5847594d4b43ec3412e1fd97104f7eb5fd770be55e691e6cb2e80929f86bebe3
|
F ext/lsm1/lsm-test/lsmtest.h cf58528ffe0cfe535e91b44584e2ec5fb1caacdabecef0d8dcf83bf83168bf28
|
||||||
F ext/lsm1/lsm-test/lsmtest1.c 33158978327f800e82b6a47c09b86ace809f56a9ff10b0162273ec1186cc3153
|
F ext/lsm1/lsm-test/lsmtest1.c 33158978327f800e82b6a47c09b86ace809f56a9ff10b0162273ec1186cc3153
|
||||||
F ext/lsm1/lsm-test/lsmtest2.c 188b09aec776516aeedcfd13b9c6faf85ba16b3671a0897a2c740ee00a5dc4f8
|
F ext/lsm1/lsm-test/lsmtest2.c 188b09aec776516aeedcfd13b9c6faf85ba16b3671a0897a2c740ee00a5dc4f8
|
||||||
F ext/lsm1/lsm-test/lsmtest3.c 9ab87528a36dbf4a61d7c8ad954f5ee368c0878c127b84b942b2e2abe522de26
|
F ext/lsm1/lsm-test/lsmtest3.c 9ab87528a36dbf4a61d7c8ad954f5ee368c0878c127b84b942b2e2abe522de26
|
||||||
@@ -237,10 +239,10 @@ F ext/lsm1/lsm-test/lsmtest_func.c 159aa401bc8032bfa3d8cf2977bd687abebab88025589
|
|||||||
F ext/lsm1/lsm-test/lsmtest_io.c cf11b27b129c6bd5818fa1d440176502dc27229f0db892b4479118d61993ea20
|
F ext/lsm1/lsm-test/lsmtest_io.c cf11b27b129c6bd5818fa1d440176502dc27229f0db892b4479118d61993ea20
|
||||||
F ext/lsm1/lsm-test/lsmtest_main.c a9bc647738c0dcaebf205d6d194b3ce4a6ef3925801cd2d919f0a4ea33a15aeb
|
F ext/lsm1/lsm-test/lsmtest_main.c a9bc647738c0dcaebf205d6d194b3ce4a6ef3925801cd2d919f0a4ea33a15aeb
|
||||||
F ext/lsm1/lsm-test/lsmtest_mem.c 4e63c764345ab1df59d4f13a77980c6f3643798210b10d6cdbd785b4b888fda5
|
F ext/lsm1/lsm-test/lsmtest_mem.c 4e63c764345ab1df59d4f13a77980c6f3643798210b10d6cdbd785b4b888fda5
|
||||||
F ext/lsm1/lsm-test/lsmtest_tdb.c 555fb101d2fe638abdd133e9294536c857fb38e0f227e049c00a67f51eaece06
|
F ext/lsm1/lsm-test/lsmtest_tdb.c 618a8619183fda4f5540fcde15f9068293c5e3180e1a246e34409b0c148758b3
|
||||||
F ext/lsm1/lsm-test/lsmtest_tdb.h 8733eee249b12956a9df8322994b43d19bd8c02ad2e8b0bb5164db4d6ccc1735
|
F ext/lsm1/lsm-test/lsmtest_tdb.h 8733eee249b12956a9df8322994b43d19bd8c02ad2e8b0bb5164db4d6ccc1735
|
||||||
F ext/lsm1/lsm-test/lsmtest_tdb2.cc 99ea7f2dd9c7536c8fb9bdd329e4cfeb76899f3ddf6f48bdd3926e016922b715
|
F ext/lsm1/lsm-test/lsmtest_tdb2.cc 99ea7f2dd9c7536c8fb9bdd329e4cfeb76899f3ddf6f48bdd3926e016922b715
|
||||||
F ext/lsm1/lsm-test/lsmtest_tdb3.c e44bf94e8bd724cd6ac161fd2cd44ffe43193932ad3a6bee1b07d80bb74012bb
|
F ext/lsm1/lsm-test/lsmtest_tdb3.c b4e46b1d2fec553fe4efb44e341b43abd20556fde610db0cfffdc2300b72defe
|
||||||
F ext/lsm1/lsm-test/lsmtest_tdb4.c 47e8bb5eba266472d690fb8264f1855ebdba0ae5a0e541e35fcda61ebf1d277f
|
F ext/lsm1/lsm-test/lsmtest_tdb4.c 47e8bb5eba266472d690fb8264f1855ebdba0ae5a0e541e35fcda61ebf1d277f
|
||||||
F ext/lsm1/lsm-test/lsmtest_util.c 241622db5a332a09c8e6e7606b617d288a37b557f7d3bce0bb97809f67cc2806
|
F ext/lsm1/lsm-test/lsmtest_util.c 241622db5a332a09c8e6e7606b617d288a37b557f7d3bce0bb97809f67cc2806
|
||||||
F ext/lsm1/lsm-test/lsmtest_win32.c 0e0a224674c4d3170631c41b026b56c7e1672b151f5261e1b4cc19068641da2d
|
F ext/lsm1/lsm-test/lsmtest_win32.c 0e0a224674c4d3170631c41b026b56c7e1672b151f5261e1b4cc19068641da2d
|
||||||
@@ -249,11 +251,11 @@ F ext/lsm1/lsmInt.h 5983690e05e83653cc01ba9d8fbf8455e534ddf8349ed9adedbf46a75497
|
|||||||
F ext/lsm1/lsm_ckpt.c 0eabfaf812ddb4ea43add38f05e430694cd054eb622c3e35af4c43118a2d5321
|
F ext/lsm1/lsm_ckpt.c 0eabfaf812ddb4ea43add38f05e430694cd054eb622c3e35af4c43118a2d5321
|
||||||
F ext/lsm1/lsm_file.c 3c51841d5b3e7da162693cbac9a9f47eeedf6bcbbe2969a4d25e30c428c9fe36
|
F ext/lsm1/lsm_file.c 3c51841d5b3e7da162693cbac9a9f47eeedf6bcbbe2969a4d25e30c428c9fe36
|
||||||
F ext/lsm1/lsm_log.c a8bf334532109bba05b09a504ee45fc393828b0d034ca61ab45e3940709d9a7c
|
F ext/lsm1/lsm_log.c a8bf334532109bba05b09a504ee45fc393828b0d034ca61ab45e3940709d9a7c
|
||||||
F ext/lsm1/lsm_main.c 801295038b548ae2e5fae93f08c3f945154f40848a03ff26b16eab5d04ba573a
|
F ext/lsm1/lsm_main.c b5703f8042e71d3a2d65e671f6832e077e79e89e9975818f67f969922618db63
|
||||||
F ext/lsm1/lsm_mem.c 4c51ea9fa285ee6e35301b33491642d071740a0a
|
F ext/lsm1/lsm_mem.c 4c51ea9fa285ee6e35301b33491642d071740a0a
|
||||||
F ext/lsm1/lsm_mutex.c 378edf0a2b142b4f7640ee982df06d50b98788ea
|
F ext/lsm1/lsm_mutex.c 378edf0a2b142b4f7640ee982df06d50b98788ea
|
||||||
F ext/lsm1/lsm_shared.c 76adfc1ed9ffebaf92746dde4b370ccc48143ca8b05b563816eadd2aadf1c525
|
F ext/lsm1/lsm_shared.c 76adfc1ed9ffebaf92746dde4b370ccc48143ca8b05b563816eadd2aadf1c525
|
||||||
F ext/lsm1/lsm_sorted.c d07ff7c28758542b8b4da4b5a1fb67b22a4d33e50e7f684cffe1f6c45cf5182c
|
F ext/lsm1/lsm_sorted.c df7b393d9e4b85e6ad07181c6434d58a69a9145ee925d89c3ee1d2a210adaf9a
|
||||||
F ext/lsm1/lsm_str.c 65e361b488c87b10bf3e5c0070b14ffc602cf84f094880bece77bbf6678bca82
|
F ext/lsm1/lsm_str.c 65e361b488c87b10bf3e5c0070b14ffc602cf84f094880bece77bbf6678bca82
|
||||||
F ext/lsm1/lsm_tree.c 682679d7ef2b8b6f2fe77aeb532c8d29695bca671c220b0abac77069de5fb9fb
|
F ext/lsm1/lsm_tree.c 682679d7ef2b8b6f2fe77aeb532c8d29695bca671c220b0abac77069de5fb9fb
|
||||||
F ext/lsm1/lsm_unix.c 57361bcf5b1a1a028f5d66571ee490e9064d2cfb145a2cc9e5ddade467bb551b
|
F ext/lsm1/lsm_unix.c 57361bcf5b1a1a028f5d66571ee490e9064d2cfb145a2cc9e5ddade467bb551b
|
||||||
@@ -263,18 +265,19 @@ F ext/lsm1/lsm_win32.c 0a4acbd7e8d136dd3a5753f0a9e7a9802263a9d96cef3278cf120bcaa
|
|||||||
F ext/lsm1/test/lsm1_common.tcl 5ed4bab07c93be2e4f300ebe46007ecf4b3e20bc5fbe1dedaf04a8774a6d8d82
|
F ext/lsm1/test/lsm1_common.tcl 5ed4bab07c93be2e4f300ebe46007ecf4b3e20bc5fbe1dedaf04a8774a6d8d82
|
||||||
F ext/lsm1/test/lsm1_simple.test ca949efefa102f4644231dcd9291d8cda7699a4ce1006b26e0e3fcb72233f422
|
F ext/lsm1/test/lsm1_simple.test ca949efefa102f4644231dcd9291d8cda7699a4ce1006b26e0e3fcb72233f422
|
||||||
F ext/lsm1/tool/mklsm1c.tcl f31561bbee5349f0a554d1ad7236ac1991fc09176626f529f6078e07335398b0
|
F ext/lsm1/tool/mklsm1c.tcl f31561bbee5349f0a554d1ad7236ac1991fc09176626f529f6078e07335398b0
|
||||||
F ext/misc/README.md 8e008c8d2b02e09096b31dfba033253ac27c6c06a18aa5826e299fa7601d90b2
|
F ext/misc/README.md d6dd0fe1d8af77040216798a6a2b0c46c73054d2f0ea544fbbcdccf6f238c240
|
||||||
F ext/misc/amatch.c 6db4607cb17c54b853a2d7c7c36046d004853f65b9b733e6f019d543d5dfae87
|
F ext/misc/amatch.c 6db4607cb17c54b853a2d7c7c36046d004853f65b9b733e6f019d543d5dfae87
|
||||||
F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a22525eddb
|
F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a22525eddb
|
||||||
F ext/misc/btreeinfo.c d7fd9a2fe2fa33ba28488e2fce703ebecc759219ea9e0bb3b254784866c0a676
|
F ext/misc/appendvfs.c 3777f22ec1057dc4e5fd89f2fbddcc7a29fbeef1ad038c736c54411bb1967af7
|
||||||
|
F ext/misc/btreeinfo.c 78c8c57d325185ccc04b7679e5b020e34a4d9c87453e6b7ac943d0a26cee3256
|
||||||
F ext/misc/carray.c ed96c218ea940b85c9a274c4d9c59fe9491c299147a38a8bba537687bd6c6005
|
F ext/misc/carray.c ed96c218ea940b85c9a274c4d9c59fe9491c299147a38a8bba537687bd6c6005
|
||||||
F ext/misc/closure.c 0d2a038df8fbae7f19de42e7c7d71f2e4dc88704
|
F ext/misc/closure.c 0d2a038df8fbae7f19de42e7c7d71f2e4dc88704
|
||||||
F ext/misc/completion.c 52c3f01523e3e387eb321b4739a89d1fe47cbe6025aa1f2d8d3685e9e365df0f
|
F ext/misc/completion.c 52c3f01523e3e387eb321b4739a89d1fe47cbe6025aa1f2d8d3685e9e365df0f
|
||||||
F ext/misc/compress.c 122faa92d25033d6c3f07c39231de074ab3d2e83
|
F ext/misc/compress.c dd4f8a6d0baccff3c694757db5b430f3bbd821d8686d1fc24df55cf9f035b189
|
||||||
F ext/misc/csv.c 1a009b93650732e22334edc92459c4630b9fa703397cbb3c8ca279921a36ca11
|
F ext/misc/csv.c 1a009b93650732e22334edc92459c4630b9fa703397cbb3c8ca279921a36ca11
|
||||||
F ext/misc/dbdump.c 3509fa6b8932d04e932d6b6b827b6a82ca362781b8e8f3c77336f416793e215e
|
F ext/misc/dbdump.c 3509fa6b8932d04e932d6b6b827b6a82ca362781b8e8f3c77336f416793e215e
|
||||||
F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2
|
F ext/misc/eval.c f971962e92ebb8b0a4e6b62949463ee454d88fa2
|
||||||
F ext/misc/fileio.c b1aa06c0f1dac277695d4529e5e976c65ab5678dcbb53a0304deaa8adc44b332
|
F ext/misc/fileio.c bd2f717be63a9ae9ff85977a756c43a96d47a7763d98ae913636c64b714c232b
|
||||||
F ext/misc/fuzzer.c 7c64b8197bb77b7d64eff7cac7848870235d4c25
|
F ext/misc/fuzzer.c 7c64b8197bb77b7d64eff7cac7848870235d4c25
|
||||||
F ext/misc/ieee754.c f190d0cc5182529acb15babd177781be1ac1718c
|
F ext/misc/ieee754.c f190d0cc5182529acb15babd177781be1ac1718c
|
||||||
F ext/misc/json1.c dbe086615b9546c156bf32b9378fc09383b58bd17513b866cfd24c1e15281984
|
F ext/misc/json1.c dbe086615b9546c156bf32b9378fc09383b58bd17513b866cfd24c1e15281984
|
||||||
@@ -291,14 +294,16 @@ F ext/misc/sha1.c 0b9e9b855354910d3ca467bf39099d570e73db56
|
|||||||
F ext/misc/shathree.c 9e960ba50483214c6a7a4b1517f8d8cef799e9db381195178c3fd3ad207e10c0
|
F ext/misc/shathree.c 9e960ba50483214c6a7a4b1517f8d8cef799e9db381195178c3fd3ad207e10c0
|
||||||
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
|
F ext/misc/showauth.c 732578f0fe4ce42d577e1c86dc89dd14a006ab52
|
||||||
F ext/misc/spellfix.c 41cf26c6b89fcaa8798ae10ae64d39c1f1d9d6995152e545bd491c13058b8fac
|
F ext/misc/spellfix.c 41cf26c6b89fcaa8798ae10ae64d39c1f1d9d6995152e545bd491c13058b8fac
|
||||||
|
F ext/misc/sqlar.c 57d5bc45cd5492208e451f697404be88f8612527d64c9d42f96b325b64983d74
|
||||||
F ext/misc/stmt.c 6f16443abb3551e3f5813bb13ba19a30e7032830015b0f92fe0c0453045c0a11
|
F ext/misc/stmt.c 6f16443abb3551e3f5813bb13ba19a30e7032830015b0f92fe0c0453045c0a11
|
||||||
F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512
|
F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512
|
||||||
F ext/misc/unionvtab.c 2aa94902ea646e1aaf6c05eac944a14276cddd67735b2ad856030ffffbb6626c
|
F ext/misc/unionvtab.c 0b3173f69b8899da640a13a345dc5ef1400199405f738abe6145b2454195b8ff
|
||||||
F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95
|
F ext/misc/vfslog.c fe40fab5c077a40477f7e5eba994309ecac6cc95
|
||||||
F ext/misc/vfsstat.c bf10ef0bc51e1ad6756629e1edb142f7a8db1178
|
F ext/misc/vfsstat.c bf10ef0bc51e1ad6756629e1edb142f7a8db1178
|
||||||
F ext/misc/vtablog.c 31d0d8f4406795679dcd3a67917c213d3a2a5fb3ea5de35f6e773491ed7e13c9
|
F ext/misc/vtablog.c 31d0d8f4406795679dcd3a67917c213d3a2a5fb3ea5de35f6e773491ed7e13c9
|
||||||
F ext/misc/vtshim.c 1976e6dd68dd0d64508c91a6dfab8e75f8aaf6cd
|
F ext/misc/vtshim.c 1976e6dd68dd0d64508c91a6dfab8e75f8aaf6cd
|
||||||
F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212
|
F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212
|
||||||
|
F ext/misc/zipfile.c d99efb67ecdfcae7e1855984c218c8c33d0d46a833eaa4b5a5c3d7a4f6690ce4
|
||||||
F ext/rbu/rbu.c ea7d1b7eb44c123a2a619332e19fe5313500705c4a58aaa1887905c0d83ffc2e
|
F ext/rbu/rbu.c ea7d1b7eb44c123a2a619332e19fe5313500705c4a58aaa1887905c0d83ffc2e
|
||||||
F ext/rbu/rbu1.test 43836fac8c7179a358eaf38a8a1ef3d6e6285842
|
F ext/rbu/rbu1.test 43836fac8c7179a358eaf38a8a1ef3d6e6285842
|
||||||
F ext/rbu/rbu10.test 1846519a438697f45e9dcb246908af81b551c29e1078d0304fae83f1fed7e9ee
|
F ext/rbu/rbu10.test 1846519a438697f45e9dcb246908af81b551c29e1078d0304fae83f1fed7e9ee
|
||||||
@@ -325,6 +330,7 @@ F ext/rbu/rbufault2.test 9a7f19edd6ea35c4c9f807d8a3db0a03a5670c06
|
|||||||
F ext/rbu/rbufault3.test 0913c1aeaee266d9c36c33179341a5a504aad7d423d1979cfec43c8346a29899
|
F ext/rbu/rbufault3.test 0913c1aeaee266d9c36c33179341a5a504aad7d423d1979cfec43c8346a29899
|
||||||
F ext/rbu/rbufault4.test 34e70701cbec51571ffbd9fbf9d4e0f2ec495ca7
|
F ext/rbu/rbufault4.test 34e70701cbec51571ffbd9fbf9d4e0f2ec495ca7
|
||||||
F ext/rbu/rbufts.test a2bbd202c9321fba15fb4a62a90add7d70e07bd8404e1e598135adbfff8a0508
|
F ext/rbu/rbufts.test a2bbd202c9321fba15fb4a62a90add7d70e07bd8404e1e598135adbfff8a0508
|
||||||
|
F ext/rbu/rbumulti.test 2cf153ab3d5861ff26517dc6cbaec430787a59f1d50e8771fe7a7529a0551cf1
|
||||||
F ext/rbu/rbuprogress.test 1849d4e0e50616edf5ce75ce7db86622e656b5cf
|
F ext/rbu/rbuprogress.test 1849d4e0e50616edf5ce75ce7db86622e656b5cf
|
||||||
F ext/rbu/rburesume.test 8acb77f4a422ff55acfcfc9cc15a5cb210b1de83
|
F ext/rbu/rburesume.test 8acb77f4a422ff55acfcfc9cc15a5cb210b1de83
|
||||||
F ext/rbu/rbusave.test 0f43b6686084f426ddd040b878426452fd2c2f48
|
F ext/rbu/rbusave.test 0f43b6686084f426ddd040b878426452fd2c2f48
|
||||||
@@ -344,8 +350,8 @@ F ext/repair/test/checkfreelist01.test 3e8aa6aeb4007680c94a8d07b41c339aa635cc782
|
|||||||
F ext/repair/test/checkindex01.test 6945d0ffc0c1dc993b2ce88036b26e0f5d6fcc65da70fc9df27c2647bb358b0f
|
F ext/repair/test/checkindex01.test 6945d0ffc0c1dc993b2ce88036b26e0f5d6fcc65da70fc9df27c2647bb358b0f
|
||||||
F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c
|
F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c
|
||||||
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
|
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
|
||||||
F ext/rtree/rtree.c 2111f685ae07988622c241f819b56fea60782f56e32f97e334473c59f6083481
|
F ext/rtree/rtree.c d941e44ad901da039caebb9f9fa99d81f2a4fc822e67cafe33fa4f6f789074a0
|
||||||
F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
|
F ext/rtree/rtree.h 4a690463901cb5e6127cf05eb8e642f127012fd5003830dbc974eca5802d9412
|
||||||
F ext/rtree/rtree1.test 82a353747fcab1083d114b2ac84723dfefdbf86c1a6e1df57bf588c7d4285436
|
F ext/rtree/rtree1.test 82a353747fcab1083d114b2ac84723dfefdbf86c1a6e1df57bf588c7d4285436
|
||||||
F ext/rtree/rtree2.test 5f25b01acd03470067a2d52783b2eb0a50bf836803d4342d20ca39e541220fe2
|
F ext/rtree/rtree2.test 5f25b01acd03470067a2d52783b2eb0a50bf836803d4342d20ca39e541220fe2
|
||||||
F ext/rtree/rtree3.test 2cafe8265d1ff28f206fce88d114f208349df482
|
F ext/rtree/rtree3.test 2cafe8265d1ff28f206fce88d114f208349df482
|
||||||
@@ -381,19 +387,21 @@ F ext/session/session9.test 5409d90d8141881d08285ed1c2c0d8d10fb92069
|
|||||||
F ext/session/sessionA.test 1feeab0b8e03527f08f2f1defb442da25480138f
|
F ext/session/sessionA.test 1feeab0b8e03527f08f2f1defb442da25480138f
|
||||||
F ext/session/sessionB.test 886252dcb7e692e62ef7e357456200912e367823
|
F ext/session/sessionB.test 886252dcb7e692e62ef7e357456200912e367823
|
||||||
F ext/session/sessionC.test 97556f5164ac29f2344b24bd7de6a3a35a95c390
|
F ext/session/sessionC.test 97556f5164ac29f2344b24bd7de6a3a35a95c390
|
||||||
F ext/session/sessionD.test d4744c78334162851d2a2f285c7e603e31b49aa2
|
F ext/session/sessionD.test d3617e29aa15c9413aee5286d99587633245d58d2ad28f3f331c822735418a22
|
||||||
F ext/session/sessionE.test 0a616c4ad8fd2c05f23217ebb6212ef80b7fef30f5f086a6633a081f93e84637
|
F ext/session/sessionE.test 0a616c4ad8fd2c05f23217ebb6212ef80b7fef30f5f086a6633a081f93e84637
|
||||||
F ext/session/sessionF.test c2f178d4dfd723a5fd94a730ea2ccb44c669e3ce
|
F ext/session/sessionF.test c2f178d4dfd723a5fd94a730ea2ccb44c669e3ce
|
||||||
F ext/session/sessionG.test 01ef705096a9d3984eebdcca79807a211dee1b60
|
F ext/session/sessionG.test 63f9a744341d670775af29e4f19c1ef09a4810798400f28cd76704803a2e56ff
|
||||||
|
F ext/session/sessionH.test 332b60e4c2e0a680105e11936201cabe378216f307e2747803cea56fa7d9ebae
|
||||||
F ext/session/session_common.tcl 7776eda579773113b30c7abfd4545c445228cb73
|
F ext/session/session_common.tcl 7776eda579773113b30c7abfd4545c445228cb73
|
||||||
F ext/session/session_speed_test.c edc1f96fd5e0e4b16eb03e2a73041013d59e8723
|
F ext/session/session_speed_test.c edc1f96fd5e0e4b16eb03e2a73041013d59e8723
|
||||||
F ext/session/sessionat.test feb7d22b3124882064b9d9df69f5484a9bb8c123dc9ddc6ffcd357521848139f
|
F ext/session/sessionat.test efe88965e74ff1bc2af9c310b28358c02d420c1fb2705cc7a28f0c1cc142c3ec
|
||||||
F ext/session/sessiondiff.test ad13dd65664bae26744e1f18eb3cbd5588349b7e9118851d8f9364248d67bcec
|
F ext/session/sessiondiff.test ad13dd65664bae26744e1f18eb3cbd5588349b7e9118851d8f9364248d67bcec
|
||||||
F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7
|
F ext/session/sessionfault.test da273f2712b6411e85e71465a1733b8501dbf6f7
|
||||||
F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0
|
F ext/session/sessionfault2.test 04aa0bc9aa70ea43d8de82c4f648db4de1e990b0
|
||||||
|
F ext/session/sessionstat1.test 41cd97c2e48619a41cdf8ae749e1b25f34719de638689221aa43971be693bf4e
|
||||||
F ext/session/sessionwor.test 2f3744236dc8b170a695b7d8ddc8c743c7e79fdc
|
F ext/session/sessionwor.test 2f3744236dc8b170a695b7d8ddc8c743c7e79fdc
|
||||||
F ext/session/sqlite3session.c cc127222a9ea6f4eaa31281aa9da924f5244f6099be0ee526c950684fb3513a6
|
F ext/session/sqlite3session.c a5b7aed647abe7e366254b755597fce3f2719d82c98990cb0e1e07a3d203fe2b
|
||||||
F ext/session/sqlite3session.h cb4d860101ba6d3ac810f18684539b766d24d668fa2436cdde90d711af9464fb
|
F ext/session/sqlite3session.h 01774161cbd328fe3d496323655b9cc142317ff1fb1ae15c1232075ea240e3a4
|
||||||
F ext/session/test_session.c eb0bd6c1ea791c1d66ee4ef94c16500dad936386
|
F ext/session/test_session.c eb0bd6c1ea791c1d66ee4ef94c16500dad936386
|
||||||
F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3
|
F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3
|
||||||
F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
|
F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
|
||||||
@@ -401,7 +409,7 @@ F ext/userauth/userauth.c 3410be31283abba70255d71fd24734e017a4497f
|
|||||||
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
|
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
|
||||||
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
|
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
|
||||||
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
|
F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60
|
||||||
F main.mk da996649117a4563f04b046d73ce82237ff544138b252245111703f6b916fcd4
|
F main.mk 05ae4da060eaf044c33d40fdaf99299fc55cde4e168c5f955a8f42da944731d2
|
||||||
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
|
F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83
|
||||||
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
|
F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271
|
||||||
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
|
F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504
|
||||||
@@ -414,27 +422,27 @@ F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
|
|||||||
F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
|
F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
|
||||||
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
|
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
|
||||||
F src/alter.c cf7a8af45cb0ace672f47a1b29ab24092a9e8cd8d945a9974e3b5d925f548594
|
F src/alter.c cf7a8af45cb0ace672f47a1b29ab24092a9e8cd8d945a9974e3b5d925f548594
|
||||||
F src/analyze.c 0d0ccf7520a201d8747ea2f02c92c26e26f801bc161f714f27b9f7630dde0421
|
F src/analyze.c 6b42e36a5dcc2703a771f2411bd5e99524bd62c7ecde209bb88dfb04c72f046e
|
||||||
F src/attach.c 8158394251d62a6513d6e395f14c9b8ad3f3447d8a1249c242c940cde5c1453e
|
F src/attach.c 8158394251d62a6513d6e395f14c9b8ad3f3447d8a1249c242c940cde5c1453e
|
||||||
F src/auth.c 6277d63837357549fe14e723490d6dc1a38768d71c795c5eb5c0f8a99f918f73
|
F src/auth.c 6277d63837357549fe14e723490d6dc1a38768d71c795c5eb5c0f8a99f918f73
|
||||||
F src/backup.c faf17e60b43233c214aae6a8179d24503a61e83b
|
F src/backup.c faf17e60b43233c214aae6a8179d24503a61e83b
|
||||||
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
||||||
F src/btmutex.c 0e9ce2d56159b89b9bc8e197e023ee11e39ff8ca
|
F src/btmutex.c 0e9ce2d56159b89b9bc8e197e023ee11e39ff8ca
|
||||||
F src/btree.c 0a1f63b50ab1ac5d4b1637c30cb1ae123fbc162ec8cb6336ddb9491a0bc1e363
|
F src/btree.c 1beceb1c5f9563271241fd0c294484668e4ad28cf6aa970eab70e50ff6f75e25
|
||||||
F src/btree.h 0866c0a08255142ea0e754aabd211c843cab32045c978a592a43152405ed0c84
|
F src/btree.h 0866c0a08255142ea0e754aabd211c843cab32045c978a592a43152405ed0c84
|
||||||
F src/btreeInt.h 55b702efce17e5d1941865464227d3802cfc9c7c832fac81d4c94dced47a71fc
|
F src/btreeInt.h 6e70d15435b60a29386ae9864875618ca225c31bf815038bbd8f510a66bb9cb1
|
||||||
F src/build.c a03eb5a1cfff74784c24a4478ba5455711571936f1ac9d43f94fa7df57509977
|
F src/build.c 9f9647454f236cab097f266ae970f899b53c71cadab6756c47e2b2e81392c2a1
|
||||||
F src/callback.c fe677cb5f5abb02f7a772a62a98c2f516426081df68856e8f2d5f950929b966a
|
F src/callback.c fe677cb5f5abb02f7a772a62a98c2f516426081df68856e8f2d5f950929b966a
|
||||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||||
F src/ctime.c ff1be3eed7bdd75aaca61ca8dc848f7c9f850ef2fb9cb56f2734e922a098f9c0
|
F src/ctime.c ff1be3eed7bdd75aaca61ca8dc848f7c9f850ef2fb9cb56f2734e922a098f9c0
|
||||||
F src/date.c ebe1dc7c8a347117bb02570f1a931c62dd78f4a2b1b516f4837d45b7d6426957
|
F src/date.c ebe1dc7c8a347117bb02570f1a931c62dd78f4a2b1b516f4837d45b7d6426957
|
||||||
F src/dbpage.c 8db4c97f630e7d83f884ea75caf1ffd0988c160e9d530194d93721c80821e0f6
|
F src/dbpage.c 8db4c97f630e7d83f884ea75caf1ffd0988c160e9d530194d93721c80821e0f6
|
||||||
F src/dbstat.c 7a4ba8518b6369ef3600c49cf9c918ad979acba610b2aebef1b656d649b96720
|
F src/dbstat.c 7a4ba8518b6369ef3600c49cf9c918ad979acba610b2aebef1b656d649b96720
|
||||||
F src/delete.c 74667ad914ac143731a444a1bacf29ceb18f6eded8a0dd17aafae80baa07f8bb
|
F src/delete.c 20c8788451dc737a967c87ea53ad43544d617f5b57d32ccce8bd52a0daf9e89b
|
||||||
F src/expr.c ad6e7a9c34a4bab9d10cc857d647ae7ce370a633b5c0bfa71f1c29b81ae364b8
|
F src/expr.c 9e06de431c09f144438aa6895ea4d4290fa3c6875bfcc3ba331012ca78deadf0
|
||||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||||
F src/fkey.c d617daf66b5515e2b42c1405b2b4984c30ca50fb705ab164271a9bf66c69e331
|
F src/fkey.c d617daf66b5515e2b42c1405b2b4984c30ca50fb705ab164271a9bf66c69e331
|
||||||
F src/func.c 697a3ee3b8c8481db497226e9e71935727d6a9fb3d3cc049e82a1c717a0a8342
|
F src/func.c 9970db37cc004136996a5c9b966b86f06583bcf3f275449b977fbb06d75e7300
|
||||||
F src/global.c ac3094f1dc59fbeb919aef7cc0cc827a8459d1fb1adb7972ef75bd9e0c10b75b
|
F src/global.c ac3094f1dc59fbeb919aef7cc0cc827a8459d1fb1adb7972ef75bd9e0c10b75b
|
||||||
F src/hash.c a12580e143f10301ed5166ea4964ae2853d3905a511d4e0c44497245c7ce1f7a
|
F src/hash.c a12580e143f10301ed5166ea4964ae2853d3905a511d4e0c44497245c7ce1f7a
|
||||||
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
|
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
|
||||||
@@ -442,9 +450,9 @@ F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da
|
|||||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||||
F src/insert.c 14686083cedc198540b15a79586cdd4be2acf6d5fa97627e355f817ab07e9fee
|
F src/insert.c 14686083cedc198540b15a79586cdd4be2acf6d5fa97627e355f817ab07e9fee
|
||||||
F src/legacy.c 134ab3e3fae00a0f67a5187981d6935b24b337bcf0f4b3e5c9fa5763da95bf4e
|
F src/legacy.c 134ab3e3fae00a0f67a5187981d6935b24b337bcf0f4b3e5c9fa5763da95bf4e
|
||||||
F src/loadext.c 55bcc3c741059a1056859e8adaf133aa179e22be12215c0936b2f354ef71209b
|
F src/loadext.c f6e4e416a736369f9e80eba609f0acda97148a8b0453784d670c78d3eed2f302
|
||||||
F src/main.c 37139a23caa1a9864b42b0e4bd6416b0d9387e8a7423ebd0ca70f32d03018f46
|
F src/main.c a3e15ef7ffe64ccc468fe83acc669536ee45ded148efeac2ed522422beb4ac91
|
||||||
F src/malloc.c 6f684fd039f53bf9195193eb0cde731a2954970fabc6ef054ba379b6052dc296
|
F src/malloc.c 07295435093ce354c6d9063ac05a2eeae28bd251d2e63c48b3d67c12c76f7e18
|
||||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||||
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
|
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
|
||||||
F src/mem2.c f1940d9e91948dd6a908fbb9ce3835c36b5d83c3
|
F src/mem2.c f1940d9e91948dd6a908fbb9ce3835c36b5d83c3
|
||||||
@@ -463,12 +471,12 @@ F src/os.c 22d31db3ca5a96a408fbf1ceeaaebcaf64c87024d2ff9fe1cf2ddbec3e75c104
|
|||||||
F src/os.h 48388821692e87da174ea198bf96b1b2d9d83be5dfc908f673ee21fafbe0d432
|
F src/os.h 48388821692e87da174ea198bf96b1b2d9d83be5dfc908f673ee21fafbe0d432
|
||||||
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
|
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
|
||||||
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
||||||
F src/os_unix.c 7fc2735390a7809d5d893ed735d994ff12521224b89738226fff6f1a0aa1c932
|
F src/os_unix.c a82505be158d8ce42b38dcc9b426187d776904c12cdc68dc8925e1dfcc5cb6ce
|
||||||
F src/os_win.c 0a4afa35cc8e812000df3ea2f64b476131b39e29e75d8007d0504726e4761de4
|
F src/os_win.c 501dde1ee770f4ffa458bfe1cf376a556de3ab00bb8320d659c5984403991d62
|
||||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||||
F src/pager.c ede1e65f465f6c507c876b87c3f796a7809b52bd9f82da14bac2680f5df8ebe6
|
F src/pager.c 20e9757e5b428f9624f82b13a32e0d68f646be4d6dbb0e4687467bd657df81d3
|
||||||
F src/pager.h 581698f2177e8bd4008fe4760898ce20b6133d1df22139b9101b5155f900df7a
|
F src/pager.h 581698f2177e8bd4008fe4760898ce20b6133d1df22139b9101b5155f900df7a
|
||||||
F src/parse.y 44cbbc3e132ea128258eff7be7f6d5c5dfa25522f89ec8b5501276966511bd50
|
F src/parse.y 4e750e1b261ff9f1d0b6b5d40a829c66d691899f48953fde839d8b52d41aa148
|
||||||
F src/pcache.c 7ae91a4557a43d77d449accbfdc68846e6516f8e2eda46e8bbe4536fb669b201
|
F src/pcache.c 7ae91a4557a43d77d449accbfdc68846e6516f8e2eda46e8bbe4536fb669b201
|
||||||
F src/pcache.h 072f94d29281cffd99e46c1539849f248c4b56ae7684c1f36626797fee375170
|
F src/pcache.h 072f94d29281cffd99e46c1539849f248c4b56ae7684c1f36626797fee375170
|
||||||
F src/pcache1.c 716975564c15eb6679e97f734cec1bfd6c16ac3d4010f05f1f8e509fc7d19880
|
F src/pcache1.c 716975564c15eb6679e97f734cec1bfd6c16ac3d4010f05f1f8e509fc7d19880
|
||||||
@@ -479,17 +487,17 @@ F src/printf.c 9506b4b96e59c0467047155f09015750cb2878aeda3d39e5610c1192ddc3c41c
|
|||||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||||
F src/resolve.c bbee7e31d369a18a2f4836644769882e9c5d40ef4a3af911db06410b65cb3730
|
F src/resolve.c bbee7e31d369a18a2f4836644769882e9c5d40ef4a3af911db06410b65cb3730
|
||||||
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
|
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
|
||||||
F src/select.c 8b22abe193e4d8243befa2038e4ae2405802fed1c446e5e502d11f652e09ba74
|
F src/select.c bebe7cce45d899d2237c76bce059d525abf5b861f2fce92f6b53914a961c01ba
|
||||||
F src/shell.c.in 23b0207a222c1a1fcd0a3b9d790c79c0713212d63be94d96c0be0e62ccac3cd0
|
F src/shell.c.in 7cea439c3f7f2e4ed6eb4b3a633cd93dccb1349241400de4da0c1291285ed514
|
||||||
F src/sqlite.h.in 95a2e67c1ff46365eef3cb14e73d0b279a7435c0d0fb7e59c89cde9d4353dae2
|
F src/sqlite.h.in 9d0ef749ff6492d13686d153e359e07226564be4f70d0cbc46385c8d8d0b96fc
|
||||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||||
F src/sqlite3ext.h c02d628cca67f3889c689d82d25c3eb45e2c155db08e4c6089b5840d64687d34
|
F src/sqlite3ext.h 83a3c4ce93d650bedfd1aa558cb85a516bd6d094445ee989740827d0d944368d
|
||||||
F src/sqliteInt.h 315d863d61ac951d125934bc0946db15e94c61890d93fd6c6ff29c3c9881b39c
|
F src/sqliteInt.h fc800ea6bb5897d2c33ee19f8b08e631309cd0fb5096c6ae3db002a8d1b551b6
|
||||||
F src/sqliteLimit.h 1513bfb7b20378aa0041e7022d04acb73525de35b80b252f1b83fedb4de6a76b
|
F src/sqliteLimit.h 1513bfb7b20378aa0041e7022d04acb73525de35b80b252f1b83fedb4de6a76b
|
||||||
F src/status.c 9737ed017279a9e0c5da748701c3c7bf1e8ae0dae459aad20dd64fcff97a7e35
|
F src/status.c 9737ed017279a9e0c5da748701c3c7bf1e8ae0dae459aad20dd64fcff97a7e35
|
||||||
F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
|
F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
|
||||||
F src/tclsqlite.c 4f4ca19af1a666da6f80d35443e58905d1fb7cbdb9899cf9ce7da60aeede5830
|
F src/tclsqlite.c d05dde2bb9534ee39a5095c4c4a43625997e0f3ab6889b55e76393b05b6895b1
|
||||||
F src/test1.c 8ef15f7a357f85dfc41c6c748ce9c947b4f676e01bb5ae6a45bee4923dff8b51
|
F src/test1.c b52f9e7fe62016d357c3266fcfa0793cc1883d3cb2b11dfa39fcba2e70b0305c
|
||||||
F src/test2.c 3efb99ab7f1fc8d154933e02ae1378bac9637da5
|
F src/test2.c 3efb99ab7f1fc8d154933e02ae1378bac9637da5
|
||||||
F src/test3.c b8434949dfb8aff8dfa082c8b592109e77844c2135ed3c492113839b6956255b
|
F src/test3.c b8434949dfb8aff8dfa082c8b592109e77844c2135ed3c492113839b6956255b
|
||||||
F src/test4.c 18ec393bb4d0ad1de729f0b94da7267270f3d8e6
|
F src/test4.c 18ec393bb4d0ad1de729f0b94da7267270f3d8e6
|
||||||
@@ -537,24 +545,24 @@ F src/test_tclvar.c 33ff42149494a39c5fbb0df3d25d6fafb2f668888e41c0688d07273dcb26
|
|||||||
F src/test_thread.c 911d15fb14e19c0c542bdc8aabf981c2f10a4858
|
F src/test_thread.c 911d15fb14e19c0c542bdc8aabf981c2f10a4858
|
||||||
F src/test_vfs.c f0186261a24de2671d080bcd8050732f0cb64f6e
|
F src/test_vfs.c f0186261a24de2671d080bcd8050732f0cb64f6e
|
||||||
F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698
|
F src/test_vfstrace.c bab9594adc976cbe696ff3970728830b4c5ed698
|
||||||
F src/test_windirent.c 17f91f5f2aa1bb7328abb49414c363b5d2a9d3ff
|
F src/test_windirent.c a895e2c068a06644eef91a7f0a32182445a893b9a0f33d0cdb4283dca2486ac1
|
||||||
F src/test_windirent.h 5d67483a55442e31e1bde0f4a230e6e932ad5906
|
F src/test_windirent.h 90dfbe95442c9762357fe128dc7ae3dc199d006de93eb33ba3972e0a90484215
|
||||||
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
||||||
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
||||||
F src/tokenize.c 1003d6d90c6783206c711f0a9397656fa5b055209f4d092caa43bb3bf5215db5
|
F src/tokenize.c 5b0c661a85f783d35b9883830736eeb63be4aefc4f6b7d9cd081d48782c041e2
|
||||||
F src/treeview.c eae35972ff44f67064de2eaf35f04afe94e7aea3271a8b3bcebb3f954880fec3
|
F src/treeview.c eae35972ff44f67064de2eaf35f04afe94e7aea3271a8b3bcebb3f954880fec3
|
||||||
F src/trigger.c a34539c69433276d37b0da9a89c117726ff2d292c0902895af1f393a983cd3a1
|
F src/trigger.c a34539c69433276d37b0da9a89c117726ff2d292c0902895af1f393a983cd3a1
|
||||||
F src/update.c 961bd1265d4d1e5cd65c9a54fa5122fb7aefcb003fcf2de0c092fceb7e58972c
|
F src/update.c a90a32ffc0100265b0693dbbdbe490756447af181f5ea2c138cce515b08c8795
|
||||||
F src/utf.c 810fbfebe12359f10bc2a011520a6e10879ab2a163bcb26c74768eab82ea62a5
|
F src/utf.c 810fbfebe12359f10bc2a011520a6e10879ab2a163bcb26c74768eab82ea62a5
|
||||||
F src/util.c 7315e97a8dc2c8e19ca64196c652cf0a65d13fd0a211b2cec082062372dc6261
|
F src/util.c ef4a5f904d942e660abade7fbf3e6bdb402dabe9e7c27f3361ecf40b945538b5
|
||||||
F src/vacuum.c 90839322fd5f00df9617eb21b68beda9b6e2a2937576b0d65985e4aeb1c53739
|
F src/vacuum.c 90839322fd5f00df9617eb21b68beda9b6e2a2937576b0d65985e4aeb1c53739
|
||||||
F src/vdbe.c c70267613df80345ed9bbd9c249c365b53bb9cbbe9d3e78e6d5c049d00ef5501
|
F src/vdbe.c d4684bd5efad095d9e4405e5ca2e1168dc7aff643cae04c424e4bade70641d70
|
||||||
F src/vdbe.h d50cadf12bcf9fb99117ef392ce1ea283aa429270481426b6e8b0280c101fd97
|
F src/vdbe.h 134beb7a12a6213c00eba58febaede33447cc4441bc568a0d9c144b33fc3720a
|
||||||
F src/vdbeInt.h 1fe00770144c12c4913128f35262d11527ef3284561baaab59b947a41c08d0d9
|
F src/vdbeInt.h 8d7d07f13cb3c4cbca91e22ba4a1920e542dda7c5d9299920432a0b3d5b009f5
|
||||||
F src/vdbeapi.c 9c670ca0dcc1cd86373aa353b747b26fe531ca5cd4331690c611d1f03842e2a1
|
F src/vdbeapi.c fea41171884a4de119f8b10ab514c788674eeeb7f27218bb6d008e1310bfd07f
|
||||||
F src/vdbeaux.c 7ae48b180e5dd5d282e6752d155f1ab7929196d8e6577b82742044188152ca85
|
F src/vdbeaux.c 2756ac68ac259c416554100598fc291870063288cd7e1af22847f57b3e130e56
|
||||||
F src/vdbeblob.c f5c70f973ea3a9e915d1693278a5f890dc78594300cf4d54e64f2b0917c94191
|
F src/vdbeblob.c f5c70f973ea3a9e915d1693278a5f890dc78594300cf4d54e64f2b0917c94191
|
||||||
F src/vdbemem.c 8478f7fb1948bf8fdeec7c2cb59ea58155c31258b9cd43c56d485e03ed40bd07
|
F src/vdbemem.c 943e41881e6317c9f93c77c1d60d3b37ddc8d26a3f852233ce7423d3e581523e
|
||||||
F src/vdbesort.c 731a09e5cb9e96b70c394c1b7cf3860fbe84acca7682e178615eb941a3a0ef2f
|
F src/vdbesort.c 731a09e5cb9e96b70c394c1b7cf3860fbe84acca7682e178615eb941a3a0ef2f
|
||||||
F src/vdbetrace.c 48e11ebe040c6b41d146abed2602e3d00d621d7ebe4eb29b0a0f1617fd3c2f6c
|
F src/vdbetrace.c 48e11ebe040c6b41d146abed2602e3d00d621d7ebe4eb29b0a0f1617fd3c2f6c
|
||||||
F src/vtab.c 0e4885495172e1bdf54b12cce23b395ac74ef5729031f15e1bc1e3e6b360ed1a
|
F src/vtab.c 0e4885495172e1bdf54b12cce23b395ac74ef5729031f15e1bc1e3e6b360ed1a
|
||||||
@@ -562,9 +570,9 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
|||||||
F src/wal.c 5a3f464edd64596f601683ed321d12e6fd93c5fb9afdfb3653d6ffd0fee9c48f
|
F src/wal.c 5a3f464edd64596f601683ed321d12e6fd93c5fb9afdfb3653d6ffd0fee9c48f
|
||||||
F src/wal.h 8de5d2d3de0956d6f6cb48c83a4012d5f227b8fe940f3a349a4b7e85ebcb492a
|
F src/wal.h 8de5d2d3de0956d6f6cb48c83a4012d5f227b8fe940f3a349a4b7e85ebcb492a
|
||||||
F src/walker.c da987a20d40145c0a03c07d8fefcb2ed363becc7680d0500d9c79915591f5b1f
|
F src/walker.c da987a20d40145c0a03c07d8fefcb2ed363becc7680d0500d9c79915591f5b1f
|
||||||
F src/where.c 36b92103f726609cc3dbe07c619426bd6886bede455de56ccff54c8e567f5582
|
F src/where.c caf0b6c9d31f22f0b2c91aba723858de52b5d665aaa89034099015aaf9bb8219
|
||||||
F src/whereInt.h 82c04c5075308abbac59180c8bad5ecb45b07453981f60a53f3c7dee21e1e971
|
F src/whereInt.h 82c04c5075308abbac59180c8bad5ecb45b07453981f60a53f3c7dee21e1e971
|
||||||
F src/wherecode.c af1e79154aaa88cd802d6f2e5b945f67eaca7c958d1525fbf8ee19d5bd7b9020
|
F src/wherecode.c cb360c511f69294ddf00340d7b390e6b1d601a1cfb77b42c4d316fe2f4cd01c3
|
||||||
F src/whereexpr.c 427ea8e96ec24f2a7814c67b8024ad664a9c7656264c4566c34743cb23186e46
|
F src/whereexpr.c 427ea8e96ec24f2a7814c67b8024ad664a9c7656264c4566c34743cb23186e46
|
||||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||||
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
|
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
|
||||||
@@ -659,8 +667,8 @@ F test/busy.test 510dc6daaad18bcbbc085bcc6217d6dc418def5e73f72ce1475eea0cb783472
|
|||||||
F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
|
F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
|
||||||
F test/cacheflush.test af25bb1509df04c1da10e38d8f322d66eceedf61
|
F test/cacheflush.test af25bb1509df04c1da10e38d8f322d66eceedf61
|
||||||
F test/cachespill.test 895997f84a25b323b166aecb69baab2d6380ea98f9e0bcc688c4493c535cfab9
|
F test/cachespill.test 895997f84a25b323b166aecb69baab2d6380ea98f9e0bcc688c4493c535cfab9
|
||||||
F test/capi2.test d3267a146df2251e7ad09a672d59e33e836d74c6fbeb843c18e87835ef646c12
|
F test/capi2.test 34a1a9a96d543a2ec2c209696b11b164444f57253b1f2cba1c2e53fadede6c7b
|
||||||
F test/capi3.test 986e57cea8ab423b3fc8c2e3b69330394252d3d2a4496122ff3749e258305695
|
F test/capi3.test 36f5c859c91a9bb0075d6ddcfcf2476cad629b09f7bfd135776fb94b06c04706
|
||||||
F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4
|
F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4
|
||||||
F test/capi3c.test 7ebed1d8fa2f3190149d556fe8cff5a006be62af437c5c4640db614470126098
|
F test/capi3c.test 7ebed1d8fa2f3190149d556fe8cff5a006be62af437c5c4640db614470126098
|
||||||
F test/capi3d.test 485048dc5cd07bc68011e4917ad035ad6047ab82
|
F test/capi3d.test 485048dc5cd07bc68011e4917ad035ad6047ab82
|
||||||
@@ -683,7 +691,7 @@ F test/collate9.test 3adcc799229545940df2f25308dd1ad65869145a
|
|||||||
F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
|
F test/collateA.test b8218ab90d1fa5c59dcf156efabb1b2599c580d6
|
||||||
F test/collateB.test 1e68906951b846570f29f20102ed91d29e634854ee47454d725f2151ecac0b95
|
F test/collateB.test 1e68906951b846570f29f20102ed91d29e634854ee47454d725f2151ecac0b95
|
||||||
F test/colmeta.test 2c765ea61ee37bc43bbe6d6047f89004e6508eb1
|
F test/colmeta.test 2c765ea61ee37bc43bbe6d6047f89004e6508eb1
|
||||||
F test/colname.test 101aa39392a1f6883278f588836a3ab99178f8103f78032433400475cc05109f
|
F test/colname.test fb28b3687e03625425bc216edf8b186ce974aa71008e2aa1f426a7dcb75a601d
|
||||||
F test/conflict.test 029faa2d81a0d1cafb5f88614beb663d972c01db
|
F test/conflict.test 029faa2d81a0d1cafb5f88614beb663d972c01db
|
||||||
F test/conflict2.test bb0b94cf7196c64a3cbd815c66d3ee98c2fecd9c
|
F test/conflict2.test bb0b94cf7196c64a3cbd815c66d3ee98c2fecd9c
|
||||||
F test/conflict3.test a83db76a6c3503b2fa057c7bfb08c318d8a422202d8bc5b86226e078e5b49ff9
|
F test/conflict3.test a83db76a6c3503b2fa057c7bfb08c318d8a422202d8bc5b86226e078e5b49ff9
|
||||||
@@ -718,7 +726,7 @@ F test/crash4.test fe2821baf37168dc59dd733dcf7dba2a401487bc
|
|||||||
F test/crash5.test 05dd3aa9dbb751a22d5cdaf22a9c49b6667aa219
|
F test/crash5.test 05dd3aa9dbb751a22d5cdaf22a9c49b6667aa219
|
||||||
F test/crash6.test 4c56f1e40d0291e1110790a99807aa875b1647ba
|
F test/crash6.test 4c56f1e40d0291e1110790a99807aa875b1647ba
|
||||||
F test/crash7.test 1a194c4900a255258cf94b7fcbfd29536db572df
|
F test/crash7.test 1a194c4900a255258cf94b7fcbfd29536db572df
|
||||||
F test/crash8.test a63907617d8e74fb54b4bff23eca8a4435625245
|
F test/crash8.test 63cd5aea313222d7a69637cf7174c34d151676cc187d57193b66d4c89dedede3
|
||||||
F test/crashM.test d95f59046fa749b0d0822edf18a717788c8f318d
|
F test/crashM.test d95f59046fa749b0d0822edf18a717788c8f318d
|
||||||
F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
|
F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
|
||||||
F test/createtab.test b5de160630b209c4b8925bdcbbaf48cc90b67fe8
|
F test/createtab.test b5de160630b209c4b8925bdcbbaf48cc90b67fe8
|
||||||
@@ -738,7 +746,7 @@ F test/delete.test acc38fca8ee4851467705b1c2cfea64cd26667e5
|
|||||||
F test/delete2.test 3a03f2cca1f9a67ec469915cb8babd6485db43fa
|
F test/delete2.test 3a03f2cca1f9a67ec469915cb8babd6485db43fa
|
||||||
F test/delete3.test 555e84a00a99230b7d049d477a324a631126a6ab
|
F test/delete3.test 555e84a00a99230b7d049d477a324a631126a6ab
|
||||||
F test/delete4.test 21d2113217eeaacac2d99defe14fe6611615ae86
|
F test/delete4.test 21d2113217eeaacac2d99defe14fe6611615ae86
|
||||||
F test/delete_db.test c70a43629dd4d3e1dd03fdaf7a22153af6a69d92
|
F test/delete_db.test 096d828493c7907f9ea11a7098ea6a0f73edba89406487d5d6cc2228dc4ab8b0
|
||||||
F test/descidx1.test 6d03b44c8538fe0eb4924e19fba10cdd8f3c9240
|
F test/descidx1.test 6d03b44c8538fe0eb4924e19fba10cdd8f3c9240
|
||||||
F test/descidx2.test 9f1a0c83fd57f8667c82310ca21b30a350888b5d
|
F test/descidx2.test 9f1a0c83fd57f8667c82310ca21b30a350888b5d
|
||||||
F test/descidx3.test 09ddbe3f5295f482d2f8b687cf6db8bad7acd9a2
|
F test/descidx3.test 09ddbe3f5295f482d2f8b687cf6db8bad7acd9a2
|
||||||
@@ -779,17 +787,17 @@ F test/enc4.test c8f1ce3618508fd0909945beb8b8831feef2c020
|
|||||||
F test/eqp.test 3fe051af50921284189d1970eb653f9fcf5117d2
|
F test/eqp.test 3fe051af50921284189d1970eb653f9fcf5117d2
|
||||||
F test/errmsg.test eae9f091eb39ce7e20305de45d8e5d115b68fa856fba4ea6757b6ca3705ff7f9
|
F test/errmsg.test eae9f091eb39ce7e20305de45d8e5d115b68fa856fba4ea6757b6ca3705ff7f9
|
||||||
F test/eval.test a64c9105d6ff163df7cf09d6ac29cdad5922078c
|
F test/eval.test a64c9105d6ff163df7cf09d6ac29cdad5922078c
|
||||||
F test/exclusive.test 9a57bd66e39144b888ca75c309914fcdefb4e3f9
|
F test/exclusive.test 1206b87e192497d78c7f35552e86a9d05421498da300fb1cce5ca5351ccde3c3
|
||||||
F test/exclusive2.test 984090e8e9d1b331d2e8111daf6e5d61dda0bef7
|
F test/exclusive2.test 984090e8e9d1b331d2e8111daf6e5d61dda0bef7
|
||||||
F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
|
F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
|
||||||
F test/exists.test 79a75323c78f02bbe9c251ea502a092f9ef63dac
|
F test/exists.test 79a75323c78f02bbe9c251ea502a092f9ef63dac
|
||||||
F test/expr.test 66a2c9ac34f74f036faa4092f5402c7d3162fc93
|
F test/expr.test 66a2c9ac34f74f036faa4092f5402c7d3162fc93
|
||||||
F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9
|
F test/extension01.test 00d13cec817f331a687a243e0e5a2d87b0e358c9
|
||||||
F test/extraquick.test cb254400bd42bfb777ff675356aabf3287978f79
|
F test/extraquick.test cb254400bd42bfb777ff675356aabf3287978f79
|
||||||
F test/fallocate.test 87b5e43c872b7e69cd80b7b8813eb102b571a75d45dda24e38b65537bcc85733
|
F test/fallocate.test 07416bd593a116d5893cb244f45a94d5c6fe030561df3bd972e6135f8106e509
|
||||||
F test/filectrl.test 6e871c2d35dead1d9a88e176e8d2ca094fec6bb3
|
F test/filectrl.test 6e871c2d35dead1d9a88e176e8d2ca094fec6bb3
|
||||||
F test/filefmt.test f393e80c4b8d493b7a7f8f3809a8425bbf4292af1f5140f01cb1427798a2bbd4
|
F test/filefmt.test f393e80c4b8d493b7a7f8f3809a8425bbf4292af1f5140f01cb1427798a2bbd4
|
||||||
F test/fkey1.test 9d7e3a0d409e7f64ab077af3b4fc5e5ce1a4e8d8f1272b65b9d93480aeb1fa2b
|
F test/fkey1.test d11dbb8a93ead9b5c46ae5d02da016d61245d47662fb2d844c99214f6163f768
|
||||||
F test/fkey2.test 155809016fad6b2a1491facf2ac53a551bc57c2c
|
F test/fkey2.test 155809016fad6b2a1491facf2ac53a551bc57c2c
|
||||||
F test/fkey3.test 76d475c80b84ee7a5d062e56ccb6ea68882e2b49
|
F test/fkey3.test 76d475c80b84ee7a5d062e56ccb6ea68882e2b49
|
||||||
F test/fkey4.test 86446017011273aad8f9a99c1a65019e7bd9ca9d
|
F test/fkey4.test 86446017011273aad8f9a99c1a65019e7bd9ca9d
|
||||||
@@ -887,7 +895,7 @@ F test/fts3offsets.test b85fd382abdc78ebce721d8117bd552dfb75094c
|
|||||||
F test/fts3prefix.test fa794eaab0bdae466494947b0b153d7844478ab2
|
F test/fts3prefix.test fa794eaab0bdae466494947b0b153d7844478ab2
|
||||||
F test/fts3prefix2.test e1f0a822ca661dced7f12ce392e14eaf65609dce
|
F test/fts3prefix2.test e1f0a822ca661dced7f12ce392e14eaf65609dce
|
||||||
F test/fts3query.test f33eb71a1fe1084ea585eeb7ee76b390729f5170
|
F test/fts3query.test f33eb71a1fe1084ea585eeb7ee76b390729f5170
|
||||||
F test/fts3rank.test e4d2e16a28c98cae95001a75e2b4b05b19b051ffd6aaab15491c5e0595127b9b
|
F test/fts3rank.test cd99bc83a3c923c8d52afd90d86979cf05fc41849f892faeac3988055ef37b99
|
||||||
F test/fts3rnd.test 1320d8826a845e38a96e769562bf83d7a92a15d0
|
F test/fts3rnd.test 1320d8826a845e38a96e769562bf83d7a92a15d0
|
||||||
F test/fts3shared.test 57e26a801f21027b7530da77db54286a6fe4997e
|
F test/fts3shared.test 57e26a801f21027b7530da77db54286a6fe4997e
|
||||||
F test/fts3snippet.test 01a4231816e03a0660ae53ba2404fe69012fe0db
|
F test/fts3snippet.test 01a4231816e03a0660ae53ba2404fe69012fe0db
|
||||||
@@ -918,7 +926,7 @@ F test/func2.test 772d66227e4e6684b86053302e2d74a2500e1e0f
|
|||||||
F test/func3.test d202a7606d23f90988a664e88e268aed1087c11c
|
F test/func3.test d202a7606d23f90988a664e88e268aed1087c11c
|
||||||
F test/func4.test 6beacdfcb0e18c358e6c2dcacf1b65d1fa80955f
|
F test/func4.test 6beacdfcb0e18c358e6c2dcacf1b65d1fa80955f
|
||||||
F test/func5.test cdd224400bc3e48d891827cc913a57051a426fa4
|
F test/func5.test cdd224400bc3e48d891827cc913a57051a426fa4
|
||||||
F test/func6.test 1a2bc511fedb779e2bd3154361385216c6d35080f36bfe896b8cdd1b1954294a
|
F test/func6.test a4281c8fcd42b56f7a60f28e8e4d444e8b2256f9e82658b7ab87699f8318f564
|
||||||
F test/fuzz-oss1.test e58330d01cbbd8215ee636b17a03fe220b37dbfa
|
F test/fuzz-oss1.test e58330d01cbbd8215ee636b17a03fe220b37dbfa
|
||||||
F test/fuzz.test 96083052bf5765e4518c1ba686ce2bab785670d1
|
F test/fuzz.test 96083052bf5765e4518c1ba686ce2bab785670d1
|
||||||
F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1
|
F test/fuzz2.test 76dc35b32b6d6f965259508508abce75a6c4d7e1
|
||||||
@@ -939,9 +947,9 @@ F test/genesis.tcl 1e2e2e8e5cc4058549a154ff1892fe5c9de19f98
|
|||||||
F test/having.test e4098a4b8962f9596035c3b87a8928a10648acc509f1bb8d6f96413bbf79a1b3
|
F test/having.test e4098a4b8962f9596035c3b87a8928a10648acc509f1bb8d6f96413bbf79a1b3
|
||||||
F test/hexlit.test 4a6a5f46e3c65c4bf1fa06f5dd5a9507a5627751
|
F test/hexlit.test 4a6a5f46e3c65c4bf1fa06f5dd5a9507a5627751
|
||||||
F test/hidden.test 23c1393a79e846d68fd902d72c85d5e5dcf98711
|
F test/hidden.test 23c1393a79e846d68fd902d72c85d5e5dcf98711
|
||||||
F test/hook.test dbc0b87756e1e20e7497b56889c9e9cd2f8cc2b5
|
F test/hook.test 1604b3b2f5931430087540404555c1b6be3618600b81558657c66b533ed70b13
|
||||||
F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
|
F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
|
||||||
F test/icu.test 7fb00edc09e05d51e36be12b33e0af04e3394e3b02dbdcb2eefcb901203e28c4
|
F test/icu.test 41aa8847745a879b897a7febea0f8f9efc8e67fe8bf680589b6e07c7b0a1569a
|
||||||
F test/ieee754.test 806fc0ce7f305f57e3331eaceeddcfec9339e607
|
F test/ieee754.test 806fc0ce7f305f57e3331eaceeddcfec9339e607
|
||||||
F test/imposter1.test c3f1db2d3db2c24611a6596a3fc0ffc14f1466c8
|
F test/imposter1.test c3f1db2d3db2c24611a6596a3fc0ffc14f1466c8
|
||||||
F test/in.test 2fa2dfba1afe30eb830f327e7131dfadaa7a701d677de0eb65f9303d99e18fe0
|
F test/in.test 2fa2dfba1afe30eb830f327e7131dfadaa7a701d677de0eb65f9303d99e18fe0
|
||||||
@@ -970,7 +978,7 @@ F test/index7.test 7feababe16f2091b229c22aff2bcc1d4d6b9d2bb
|
|||||||
F test/index8.test bc2e3db70e8e62459aaa1bd7e4a9b39664f8f9d7
|
F test/index8.test bc2e3db70e8e62459aaa1bd7e4a9b39664f8f9d7
|
||||||
F test/index9.test 0aa3e509dddf81f93380396e40e9bb386904c1054924ba8fa9bcdfe85a8e7721
|
F test/index9.test 0aa3e509dddf81f93380396e40e9bb386904c1054924ba8fa9bcdfe85a8e7721
|
||||||
F test/indexedby.test faa585e315e868f09bce0eb39c41d6134649b13d2801638294d3ae616edf1609
|
F test/indexedby.test faa585e315e868f09bce0eb39c41d6134649b13d2801638294d3ae616edf1609
|
||||||
F test/indexexpr1.test 60e2d6f1d1337fd213208270295c650d268503ff215de728f540ea31eb237f70
|
F test/indexexpr1.test ace1ad489adc25325ad298434f13b1a515b36bf5dca9fe2a4b66cdf17aea3fa0
|
||||||
F test/indexexpr2.test 13247bac49143196556eb3f65e97ef301bd3e993f4511558b5db322ddc370ea6
|
F test/indexexpr2.test 13247bac49143196556eb3f65e97ef301bd3e993f4511558b5db322ddc370ea6
|
||||||
F test/indexfault.test 31d4ab9a7d2f6e9616933eb079722362a883eb1d
|
F test/indexfault.test 31d4ab9a7d2f6e9616933eb079722362a883eb1d
|
||||||
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
|
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
|
||||||
@@ -986,7 +994,7 @@ F test/interrupt.test 16ea879ec728cb76414c148c5f24afd5d1f91054
|
|||||||
F test/interrupt2.test e4408ca770a6feafbadb0801e54a0dcd1a8d108d
|
F test/interrupt2.test e4408ca770a6feafbadb0801e54a0dcd1a8d108d
|
||||||
F test/intpkey.test ac71107a49a06492b69b82aafaf225400598d3c8
|
F test/intpkey.test ac71107a49a06492b69b82aafaf225400598d3c8
|
||||||
F test/io.test f95bca1783b01ea7761671560d023360d2dfa4cc
|
F test/io.test f95bca1783b01ea7761671560d023360d2dfa4cc
|
||||||
F test/ioerr.test 2a24bd6ed5a8b062e64bfe1f6cf94fb25e92210d
|
F test/ioerr.test 470fcc78e9cd352d162baf782fe301ea807d764241f58a48fc58109c2dfcdb6b
|
||||||
F test/ioerr2.test 2593563599e2cc6b6b4fcf5878b177bdd5d8df26
|
F test/ioerr2.test 2593563599e2cc6b6b4fcf5878b177bdd5d8df26
|
||||||
F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd
|
F test/ioerr3.test d3cec5e1a11ad6d27527d0d38573fbff14c71bdd
|
||||||
F test/ioerr4.test f130fe9e71008577b342b8874d52984bd04ede2c
|
F test/ioerr4.test f130fe9e71008577b342b8874d52984bd04ede2c
|
||||||
@@ -998,11 +1006,11 @@ F test/join3.test 6f0c774ff1ba0489e6c88a3e77b9d3528fb4fda0
|
|||||||
F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
|
F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
|
||||||
F test/join5.test bc98ea4b4e5003f5b1453701ebb8cd7d1c01a550
|
F test/join5.test bc98ea4b4e5003f5b1453701ebb8cd7d1c01a550
|
||||||
F test/join6.test cfe6503791ceb0cbb509966740286ec423cbf10b
|
F test/join6.test cfe6503791ceb0cbb509966740286ec423cbf10b
|
||||||
F test/journal1.test 69abc726c51b4a0409189f9a85191205297c0577
|
F test/journal1.test c7b768041b7f494471531e17abc2f4f5ebf9e5096984f43ed17c4eb80ba34497
|
||||||
F test/journal2.test 9dac6b4ba0ca79c3b21446bbae993a462c2397c4
|
F test/journal2.test 9dac6b4ba0ca79c3b21446bbae993a462c2397c4
|
||||||
F test/journal3.test ff8af941f9e06161d3db1b46bb9f965ff0e7f307
|
F test/journal3.test c9c29883f5bf535ae82ae21c472df6263806a22e467b6db7cd0d6d545305b4f6
|
||||||
F test/jrnlmode.test 7864d59cf7f6e552b9b99ba0f38acd167edc10fa
|
F test/jrnlmode.test a6693f2bed4541a21e703aaa37bb3e10de154130645952933b82b2dec0a8b539
|
||||||
F test/jrnlmode2.test 81610545a4e6ed239ea8fa661891893385e23a1d
|
F test/jrnlmode2.test 8759a1d4657c064637f8b079592651530db738419e1d649c6df7048cd724363d
|
||||||
F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa
|
F test/jrnlmode3.test 556b447a05be0e0963f4311e95ab1632b11c9eaa
|
||||||
F test/json101.test d7cdf3e6731d41e0c4bde1c88806abd17f1f478486a1409933c1d8eac9120095
|
F test/json101.test d7cdf3e6731d41e0c4bde1c88806abd17f1f478486a1409933c1d8eac9120095
|
||||||
F test/json102.test eeb54efa221e50b74a2d6fb9259963b48d7414dca3ce2fdfdeed45cb28487bc1
|
F test/json102.test eeb54efa221e50b74a2d6fb9259963b48d7414dca3ce2fdfdeed45cb28487bc1
|
||||||
@@ -1022,16 +1030,16 @@ F test/loadext2.test 0408380b57adca04004247179837a18e866a74f7
|
|||||||
F test/lock.test be4fe08118fb988fed741f429b7dd5d65e1c90db
|
F test/lock.test be4fe08118fb988fed741f429b7dd5d65e1c90db
|
||||||
F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
|
F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
|
||||||
F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
|
F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
|
||||||
F test/lock4.test e175ae13865bc87680607563bafba21f31a26f12
|
F test/lock4.test 27143363eda1622f03c133efc8db808fc331afd973486cb571ea71cd717d37b8
|
||||||
F test/lock5.test c6c5e0ebcb21c61a572870cc86c0cb9f14cede38
|
F test/lock5.test c6c5e0ebcb21c61a572870cc86c0cb9f14cede38
|
||||||
F test/lock6.test ad5b387a3a8096afd3c68a55b9535056431b0cf5
|
F test/lock6.test ad5b387a3a8096afd3c68a55b9535056431b0cf5
|
||||||
F test/lock7.test 49f1eaff1cdc491cc5dee3669f3c671d9f172431
|
F test/lock7.test 49f1eaff1cdc491cc5dee3669f3c671d9f172431
|
||||||
F test/lock_common.tcl 7ffb45accf6ee91c736df9bafe0806a44358f035
|
F test/lock_common.tcl 7ffb45accf6ee91c736df9bafe0806a44358f035
|
||||||
F test/lookaside.test b17c99ae3aef96a8c9fa6f6be33cc75b93d657cb791d3827302b6835b71941f7
|
F test/lookaside.test b17c99ae3aef96a8c9fa6f6be33cc75b93d657cb791d3827302b6835b71941f7
|
||||||
F test/main.test bb75e406c9b64931f3dc7e7f04626633365bb22f
|
F test/main.test 6bbb3999fd461eb8fb335cbab97409a3d7f91bbb8da60635e8be3e4a04a77772
|
||||||
F test/make-where7.tcl 05c16b5d4f5d6512881dfec560cb793915932ef9
|
F test/make-where7.tcl 05c16b5d4f5d6512881dfec560cb793915932ef9
|
||||||
F test/malloc.test 21c213365f2cca95ab2d7dc078dc8525f96065f8
|
F test/malloc.test 18dd1c4188c81ca79cf123527c71b19ee0c31feb9947fdffb0dc6ceb1436816a
|
||||||
F test/malloc3.test e3b32c724b5a124b57cb0ed177f675249ad0c66a
|
F test/malloc3.test 6e88bae6312854a4adb4ecc2a6a5ea8c59b4db778b724ba718e1c43fc8c3c136
|
||||||
F test/malloc4.test 957337613002b7058a85116493a262f679f3a261
|
F test/malloc4.test 957337613002b7058a85116493a262f679f3a261
|
||||||
F test/malloc5.test f6eb6eca07a4c75f2897bf43a404689b6295bb95ab2e07d4b52eda743f925a27
|
F test/malloc5.test f6eb6eca07a4c75f2897bf43a404689b6295bb95ab2e07d4b52eda743f925a27
|
||||||
F test/malloc6.test 2f039d9821927eacae43e1831f815e157659a151
|
F test/malloc6.test 2f039d9821927eacae43e1831f815e157659a151
|
||||||
@@ -1070,7 +1078,7 @@ F test/misc3.test cf3dda47d5dda3e53fc5804a100d3c82be736c9d
|
|||||||
F test/misc4.test 0d8be3466adf123a7791a66ba2bc8e8d229e87f3
|
F test/misc4.test 0d8be3466adf123a7791a66ba2bc8e8d229e87f3
|
||||||
F test/misc5.test 60e1fc758a93cacd19eb2fafcd1d40d150a05047546c7a92389c98047d621901
|
F test/misc5.test 60e1fc758a93cacd19eb2fafcd1d40d150a05047546c7a92389c98047d621901
|
||||||
F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
|
F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
|
||||||
F test/misc7.test edd0b63e2ee29a256900b0514f6fff27e19e9bb2
|
F test/misc7.test 567e223b6497da2226a0340befaf2d663c91ad57a48aede21a35a984a2882d41
|
||||||
F test/misc8.test ba03aaa08f02d62fbb8d3b2f5595c1b33aa9bbc5
|
F test/misc8.test ba03aaa08f02d62fbb8d3b2f5595c1b33aa9bbc5
|
||||||
F test/misuse.test 9e7f78402005e833af71dcab32d048003869eca5abcaccc985d4f8dc1d86bcc7
|
F test/misuse.test 9e7f78402005e833af71dcab32d048003869eca5abcaccc985d4f8dc1d86bcc7
|
||||||
F test/mjournal.test 9d86e697dcbc5da2c4e8caba9b176b5765fe65e80c88c278b8c09a917e436795
|
F test/mjournal.test 9d86e697dcbc5da2c4e8caba9b176b5765fe65e80c88c278b8c09a917e436795
|
||||||
@@ -1108,14 +1116,14 @@ F test/orderby7.test 3d1383d52ade5b9eb3a173b3147fdd296f0202da
|
|||||||
F test/orderby8.test 23ef1a5d72bd3adcc2f65561c654295d1b8047bd
|
F test/orderby8.test 23ef1a5d72bd3adcc2f65561c654295d1b8047bd
|
||||||
F test/orderby9.test 87fb9548debcc2cd141c5299002dd94672fa76a3
|
F test/orderby9.test 87fb9548debcc2cd141c5299002dd94672fa76a3
|
||||||
F test/oserror.test b32dc34f2363ef18532e3a0a7358e3e7e321974f
|
F test/oserror.test b32dc34f2363ef18532e3a0a7358e3e7e321974f
|
||||||
F test/ossfuzz.c 7f5cc87a0280a5854c1bfa7d5c4d07d34731f08ec34dc9c916aa35ed292b1468
|
F test/ossfuzz.c 3613bc516386234cf2e513fb94dc677ab3862eb7ebc5b3671c319a80f86839fb
|
||||||
F test/ossshell.c 296ab63067841bd1b1e97b46a0b2af48ee7f69d50d1a723008bee12dd7122622
|
F test/ossshell.c 296ab63067841bd1b1e97b46a0b2af48ee7f69d50d1a723008bee12dd7122622
|
||||||
F test/ovfl.test 199c482696defceacee8c8e0e0ef36da62726b2f
|
F test/ovfl.test 199c482696defceacee8c8e0e0ef36da62726b2f
|
||||||
F test/pager1.test 8149b2a8986fee667ab6a8171ab310be19e77ae215bebad0e90c857b0df1935c
|
F test/pager1.test f596d3bd53ce96e1d87d44d223d2ae6c8867dd782c425e5eb28b5721fa6aaa97
|
||||||
F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
|
F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
|
||||||
F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f
|
F test/pager3.test 4e9a83d6ca0838d7c602c9eb93d1357562d9059c1e02ffb138a8271020838370
|
||||||
F test/pager4.test a122e9e6925d5b23b31e3dfef8c6a44bbf19590e
|
F test/pager4.test a122e9e6925d5b23b31e3dfef8c6a44bbf19590e
|
||||||
F test/pagerfault.test 263c5442c06caf0b9b9e3fe42acdeb11f254dcebe533f69f401aaef9111eaf20
|
F test/pagerfault.test 63c5da625562c66345ab4528790327ca63db2f6f9cbae2aba8cb7c51de3d1628
|
||||||
F test/pagerfault2.test caf4c7facb914fd3b03a17b31ae2b180c8d6ca1f
|
F test/pagerfault2.test caf4c7facb914fd3b03a17b31ae2b180c8d6ca1f
|
||||||
F test/pagerfault3.test 1003fcda009bf48a8e22a516e193b6ef0dd1bbd8
|
F test/pagerfault3.test 1003fcda009bf48a8e22a516e193b6ef0dd1bbd8
|
||||||
F test/pageropt.test 84e4cc5cbca285357f7906e99b21be4f2bf5abc0
|
F test/pageropt.test 84e4cc5cbca285357f7906e99b21be4f2bf5abc0
|
||||||
@@ -1149,15 +1157,15 @@ F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8
|
|||||||
F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
|
F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
|
||||||
F test/regexp2.test 40e894223b3d6672655481493f1be12012f2b33c
|
F test/regexp2.test 40e894223b3d6672655481493f1be12012f2b33c
|
||||||
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
|
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
|
||||||
F test/releasetest.tcl 0b0b3d926e36822ff63b405d683544ce1014303b029f2678bbcf40c162b5f246 x
|
F test/releasetest.tcl 6aaa853f7a7bbdc458d4cb42c0425228729b0f3e5769e9b41088c08eee999a49 x
|
||||||
F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
|
F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
|
||||||
F test/rollback.test f580934279800d480a19176c6b44909df31ce7ad45267ea475a541daa522f3d3
|
F test/rollback.test 06680159bc6746d0f26276e339e3ae2f951c64812468308838e0a3362d911eaa
|
||||||
F test/rollback2.test 8435d6ff0f13f51d2a4181c232e706005fa90fc5
|
F test/rollback2.test 8435d6ff0f13f51d2a4181c232e706005fa90fc5
|
||||||
F test/rollbackfault.test 0e646aeab8840c399cfbfa43daab46fd609cf04a
|
F test/rollbackfault.test 0e646aeab8840c399cfbfa43daab46fd609cf04a
|
||||||
F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
|
F test/rowallock.test 3f88ec6819489d0b2341c7a7528ae17c053ab7cc
|
||||||
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
|
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
|
||||||
F test/rowid.test 5b7509f384f4f6fae1af3c8c104c8ca299fea18d
|
F test/rowid.test 5b7509f384f4f6fae1af3c8c104c8ca299fea18d
|
||||||
F test/rowvalue.test 44f3492f415cc9f374e8388a5eb61503eaca5230
|
F test/rowvalue.test e1bd1690d891abff6138f9612241615d2de7671cb28eb58ebdd591a5b01089a4
|
||||||
F test/rowvalue2.test 060d238b7e5639a7c5630cb5e63e311b44efef2b
|
F test/rowvalue2.test 060d238b7e5639a7c5630cb5e63e311b44efef2b
|
||||||
F test/rowvalue3.test 3068f508753af69884b12125995f023da0dbb256
|
F test/rowvalue3.test 3068f508753af69884b12125995f023da0dbb256
|
||||||
F test/rowvalue4.test 4b556d7de161a0dd8cff095c336e913986398bea
|
F test/rowvalue4.test 4b556d7de161a0dd8cff095c336e913986398bea
|
||||||
@@ -1185,7 +1193,7 @@ F test/schema5.test 29699b4421f183c8f0e88bd28ce7d75d13ea653e
|
|||||||
F test/schema6.test e4bd1f23d368695eb9e7b51ef6e02ca0642ea2ab4a52579959826b5e7dce1f9b
|
F test/schema6.test e4bd1f23d368695eb9e7b51ef6e02ca0642ea2ab4a52579959826b5e7dce1f9b
|
||||||
F test/securedel.test 2f70b2449186a1921bd01ec9da407fbfa98c3a7a5521854c300c194b2ff09384
|
F test/securedel.test 2f70b2449186a1921bd01ec9da407fbfa98c3a7a5521854c300c194b2ff09384
|
||||||
F test/securedel2.test 2d54c28e46eb1fd6902089958b20b1b056c6f1c5
|
F test/securedel2.test 2d54c28e46eb1fd6902089958b20b1b056c6f1c5
|
||||||
F test/select1.test 460a5824df01575b18f7fa4bd8e40d09de20c542e90c1543e164bc7d3b0a0bb7
|
F test/select1.test 2e760bab8f3658b3b97debcf52860d0d2e20aa6cbe8b40e678ddb99871a15491
|
||||||
F test/select2.test 352480e0e9c66eda9c3044e412abdf5be0215b56
|
F test/select2.test 352480e0e9c66eda9c3044e412abdf5be0215b56
|
||||||
F test/select3.test 2ce595f8fb8e2ac10071d3b4e424cadd4634a054
|
F test/select3.test 2ce595f8fb8e2ac10071d3b4e424cadd4634a054
|
||||||
F test/select4.test 5389d9895968d1196c457d59b3ee6515d771d328
|
F test/select4.test 5389d9895968d1196c457d59b3ee6515d771d328
|
||||||
@@ -1200,7 +1208,7 @@ F test/selectC.test e25243f8ca503e06f252eb0218976d07cfeceac3
|
|||||||
F test/selectD.test b0f02a04ef7737decb24e08be2c39b9664b43394
|
F test/selectD.test b0f02a04ef7737decb24e08be2c39b9664b43394
|
||||||
F test/selectE.test a8730ca330fcf40ace158f134f4fe0eb00c7edbf
|
F test/selectE.test a8730ca330fcf40ace158f134f4fe0eb00c7edbf
|
||||||
F test/selectF.test 21c94e6438f76537b72532fa9fd4710cdd455fc3
|
F test/selectF.test 21c94e6438f76537b72532fa9fd4710cdd455fc3
|
||||||
F test/selectG.test e8600e379589e85e9fefd2fe4d44a4cdd63f6982
|
F test/selectG.test 089f7d3d7e6db91566f00b036cb353107a2cca6220eb1cb264085a836dae8840
|
||||||
F test/server1.test 46803bd3fe8b99b30dbc5ff38ffc756f5c13a118
|
F test/server1.test 46803bd3fe8b99b30dbc5ff38ffc756f5c13a118
|
||||||
F test/session.test 78fa2365e93d3663a6e933f86e7afc395adf18be
|
F test/session.test 78fa2365e93d3663a6e933f86e7afc395adf18be
|
||||||
F test/shared.test 1da9dbad400cee0d93f252ccf76e1ae007a63746
|
F test/shared.test 1da9dbad400cee0d93f252ccf76e1ae007a63746
|
||||||
@@ -1211,17 +1219,18 @@ F test/shared6.test 866bb4982c45ce216c61ded5e8fde4e7e2f3ffa9
|
|||||||
F test/shared7.test a81e99f83e6c51b02ac99c96fb3a2a7b5978c956
|
F test/shared7.test a81e99f83e6c51b02ac99c96fb3a2a7b5978c956
|
||||||
F test/shared8.test 00a07bf5e1337ecf72e94542bdefdc330d7a2538
|
F test/shared8.test 00a07bf5e1337ecf72e94542bdefdc330d7a2538
|
||||||
F test/shared9.test 5f2a8f79b4d6c7d107a01ffa1ed05ae7e6333e21
|
F test/shared9.test 5f2a8f79b4d6c7d107a01ffa1ed05ae7e6333e21
|
||||||
F test/sharedA.test 0cdf1a76dfa00e6beee66af5b534b1e8df2720f5
|
F test/sharedA.test 49d87ec54ab640fbbc3786ee3c01de94aaa482a3a9f834ad3fe92770eb69e281
|
||||||
F test/sharedB.test 16cc7178e20965d75278f410943109b77b2e645e
|
F test/sharedB.test 16cc7178e20965d75278f410943109b77b2e645e
|
||||||
F test/shared_err.test 32634e404a3317eeb94abc7a099c556a346fdb8fb3858dbe222a4cbb8926a939
|
F test/shared_err.test 32634e404a3317eeb94abc7a099c556a346fdb8fb3858dbe222a4cbb8926a939
|
||||||
F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304
|
F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304
|
||||||
F test/shell1.test 6d69e08039aea13f2c42749f162fe05eab7b5c93729f31d49d7d27cf36226e5a
|
F test/shell1.test 9f8b8da05a79b134e252a5e1d8d411245ad83ac7126c262900b9f42b43108ffd
|
||||||
F test/shell2.test e242a9912f44f4c23c3d1d802a83e934e84c853b
|
F test/shell2.test e242a9912f44f4c23c3d1d802a83e934e84c853b
|
||||||
F test/shell3.test 9b95ba643eaa228376f06a898fb410ee9b6e57c1
|
F test/shell3.test ac8c2b744014c3e9a0e26bfd829ab65f00923dc1a91ffd044863e9423cc91494
|
||||||
F test/shell4.test 89ad573879a745974ff2df20ff97c5d6ffffbd5d
|
F test/shell4.test 89ad573879a745974ff2df20ff97c5d6ffffbd5d
|
||||||
F test/shell5.test 23939a4c51f0421330ea61dbd3c74f9c215f5f8d3d1a94846da6ffc777a35458
|
F test/shell5.test 23939a4c51f0421330ea61dbd3c74f9c215f5f8d3d1a94846da6ffc777a35458
|
||||||
F test/shell6.test 1ceb51b2678c472ba6cf1e5da96679ce8347889fe2c3bf93a0e0fa73f00b00d3
|
F test/shell6.test 1ceb51b2678c472ba6cf1e5da96679ce8347889fe2c3bf93a0e0fa73f00b00d3
|
||||||
F test/shell7.test 115132f66d0463417f408562cc2cf534f6bbc6d83a6d50f0072a9eb171bae97f
|
F test/shell7.test 115132f66d0463417f408562cc2cf534f6bbc6d83a6d50f0072a9eb171bae97f
|
||||||
|
F test/shell8.test 96be02ea0c21f05b24c1883d7b711a1fa8525a68ab7b636aacf6057876941013
|
||||||
F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
|
F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
|
||||||
F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
|
F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
|
||||||
F test/shrink.test 1b4330b1fd9e818c04726d45cb28db73087535ce
|
F test/shrink.test 1b4330b1fd9e818c04726d45cb28db73087535ce
|
||||||
@@ -1260,7 +1269,7 @@ F test/sqllimits1.test a74ee2a3740b9f9c2437c246d8fb77354862a142
|
|||||||
F test/sqllog.test 6af6cb0b09f4e44e1917e06ce85be7670302517a
|
F test/sqllog.test 6af6cb0b09f4e44e1917e06ce85be7670302517a
|
||||||
F test/stat.test f8f1279ffffabe6df825723af18cc6e0ae70a893
|
F test/stat.test f8f1279ffffabe6df825723af18cc6e0ae70a893
|
||||||
F test/statfault.test f525a7bf633e50afd027700e9a486090684b1ac1
|
F test/statfault.test f525a7bf633e50afd027700e9a486090684b1ac1
|
||||||
F test/stmt.test 64844332db69cf1a735fcb3e11548557fc95392f
|
F test/stmt.test 54ed2cc0764bf3e48a058331813c3dbd19fc1d0827c3d8369914a5d8f564ec75
|
||||||
F test/stmtvtab1.test 6873dfb24f8e79cbb5b799b95c2e4349060eb7a3b811982749a84b359468e2d5
|
F test/stmtvtab1.test 6873dfb24f8e79cbb5b799b95c2e4349060eb7a3b811982749a84b359468e2d5
|
||||||
F test/subjournal.test 8d4e2572c0ee9a15549f0d8e40863161295107e52f07a3e8012a2e1fdd093c49
|
F test/subjournal.test 8d4e2572c0ee9a15549f0d8e40863161295107e52f07a3e8012a2e1fdd093c49
|
||||||
F test/subquery.test d7268d193dd33d5505df965399d3a594e76ae13f
|
F test/subquery.test d7268d193dd33d5505df965399d3a594e76ae13f
|
||||||
@@ -1271,11 +1280,11 @@ F test/subtype1.test 7fe09496352f97053af1437150751be2d0a0cae8
|
|||||||
F test/superlock.test ec94f0556b6488d97f71c79f9061ae08d9ab8f12
|
F test/superlock.test ec94f0556b6488d97f71c79f9061ae08d9ab8f12
|
||||||
F test/swarmvtab.test 9a3fd5ab3e9b3c976ad1b3d7646aab725114f2ac26b59395d0778b33bab6cdaf
|
F test/swarmvtab.test 9a3fd5ab3e9b3c976ad1b3d7646aab725114f2ac26b59395d0778b33bab6cdaf
|
||||||
F test/swarmvtab2.test c948cb2fdfc5b01d85e8f6d6504854202dc1a0782ab2a0ed61538f27cbd0aa5c
|
F test/swarmvtab2.test c948cb2fdfc5b01d85e8f6d6504854202dc1a0782ab2a0ed61538f27cbd0aa5c
|
||||||
F test/swarmvtab3.test c4c8d09e56ae99b90187ac225458f13f373873ea296fc442c7ad7511f25e7314
|
F test/swarmvtab3.test 6cb664669630fcec4102a09333e52068734858fd2761eee3b0465c14cdbcee29
|
||||||
F test/swarmvtabfault.test 00aec54665909490f5c383f3cae3b5d18bd97c12490b429ff8752a3027acfa42
|
F test/swarmvtabfault.test 00aec54665909490f5c383f3cae3b5d18bd97c12490b429ff8752a3027acfa42
|
||||||
F test/symlink.test c9ebe7330d228249e447038276bfc8a7b22f4849
|
F test/symlink.test 0d816670325536b8973ec08d32b45136baddb80bd45fd178e0ce7a9e8153f3e7
|
||||||
F test/sync.test 2f84bdbc2b2df1fcb0220575b4b9f8cea94b7529
|
F test/sync.test 89539f4973c010eda5638407e71ca7fddbcd8e0594f4c9980229f804d4333092
|
||||||
F test/sync2.test 6be8ed007fa063b147773c1982b5bdba97a32badc536bdc6077eff5cf8710ece
|
F test/sync2.test 8f9f7d4f6d5be8ca8941a8dadcc4299e558cb6a1ff653a9469146c7a76ef2039
|
||||||
F test/syscall.test a39d9a36f852ae6e4800f861bc2f2e83f68bbc2112d9399931ecfadeabd2d69d
|
F test/syscall.test a39d9a36f852ae6e4800f861bc2f2e83f68bbc2112d9399931ecfadeabd2d69d
|
||||||
F test/sysfault.test c9f2b0d8d677558f74de750c75e12a5454719d04
|
F test/sysfault.test c9f2b0d8d677558f74de750c75e12a5454719d04
|
||||||
F test/tabfunc01.test c47171c36b3d411df2bd49719dcaa5d034f8d277477fd41d253940723b969a51
|
F test/tabfunc01.test c47171c36b3d411df2bd49719dcaa5d034f8d277477fd41d253940723b969a51
|
||||||
@@ -1283,7 +1292,7 @@ F test/table.test b708f3e5fa2542fa51dfab21fc07b36ea445cb2f
|
|||||||
F test/tableapi.test 2674633fa95d80da917571ebdd759a14d9819126
|
F test/tableapi.test 2674633fa95d80da917571ebdd759a14d9819126
|
||||||
F test/tableopts.test dba698ba97251017b7c80d738c198d39ab747930
|
F test/tableopts.test dba698ba97251017b7c80d738c198d39ab747930
|
||||||
F test/tclsqlite.test 5337e8890b96dad1ee541b15fbeec32e6bac2fe7fa096f91089057385aadba9b
|
F test/tclsqlite.test 5337e8890b96dad1ee541b15fbeec32e6bac2fe7fa096f91089057385aadba9b
|
||||||
F test/tempdb.test bd92eba8f20e16a9136e434e20b280794de3cdb6
|
F test/tempdb.test 4cdaa23ddd8acb4d79cbb1b68ccdfd09b0537aaba909ca69a876157c2a2cbd08
|
||||||
F test/tempdb2.test 27e41ed540b2f9b056c2e77e9bddc1b875358507
|
F test/tempdb2.test 27e41ed540b2f9b056c2e77e9bddc1b875358507
|
||||||
F test/tempfault.test 0c0d349c9a99bf5f374655742577f8712c647900
|
F test/tempfault.test 0c0d349c9a99bf5f374655742577f8712c647900
|
||||||
F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30
|
F test/temptable.test d2c9b87a54147161bcd1822e30c1d1cd891e5b30
|
||||||
@@ -1410,7 +1419,7 @@ F test/tkt3357.test 77c37c6482b526fe89941ce951c22d011f5922ed
|
|||||||
F test/tkt3419.test 1bbf36d7ea03b638c15804251287c2391f5c1f6b
|
F test/tkt3419.test 1bbf36d7ea03b638c15804251287c2391f5c1f6b
|
||||||
F test/tkt3424.test 61f831bd2b071bd128fa5d00fbda57e656ca5812
|
F test/tkt3424.test 61f831bd2b071bd128fa5d00fbda57e656ca5812
|
||||||
F test/tkt3442.test 53840ec5325bb94544792aad4c20476f81dc26b1
|
F test/tkt3442.test 53840ec5325bb94544792aad4c20476f81dc26b1
|
||||||
F test/tkt3457.test 44e980fe5334753dcc27b94fa4deabc485a92f74
|
F test/tkt3457.test 5651e2cbb94645b677ec663160b9e192b87b7d365aecdfb24e19f749575a6fc2
|
||||||
F test/tkt3461.test 228ea328a5a21e8663f80ee3d212a6ad92549a19
|
F test/tkt3461.test 228ea328a5a21e8663f80ee3d212a6ad92549a19
|
||||||
F test/tkt3493.test 1686cbde85f8721fc1bdc0ee72f2ef2f63139218
|
F test/tkt3493.test 1686cbde85f8721fc1bdc0ee72f2ef2f63139218
|
||||||
F test/tkt3508.test d75704db9501625c7f7deec119fcaf1696aefb7d
|
F test/tkt3508.test d75704db9501625c7f7deec119fcaf1696aefb7d
|
||||||
@@ -1484,7 +1493,7 @@ F test/unique2.test 3674e9f2a3f1fbbfd4772ac74b7a97090d0f77d2
|
|||||||
F test/unixexcl.test d936ba2b06794018e136418addd59a2354eeae97
|
F test/unixexcl.test d936ba2b06794018e136418addd59a2354eeae97
|
||||||
F test/unordered.test ca7adce0419e4ca0c50f039885e76ed2c531eda8
|
F test/unordered.test ca7adce0419e4ca0c50f039885e76ed2c531eda8
|
||||||
F test/update.test 6c68446b8a0a33d522a7c72b320934596a2d7d32
|
F test/update.test 6c68446b8a0a33d522a7c72b320934596a2d7d32
|
||||||
F test/update2.test fffc92e72ae568fe048588762e650cd8ccbd8c8b6e4fe9099231766bfe4b51de
|
F test/update2.test 5e67667e1c54017d964e626db765cf8bedcf87483c184f4c575bdb8c1dd2313e
|
||||||
F test/uri.test 3481026f00ade6dfe8adb7acb6e1e47b04369568
|
F test/uri.test 3481026f00ade6dfe8adb7acb6e1e47b04369568
|
||||||
F test/uri2.test 9d3ba7a53ee167572d53a298ee4a5d38ec4a8fb7
|
F test/uri2.test 9d3ba7a53ee167572d53a298ee4a5d38ec4a8fb7
|
||||||
F test/userauth01.test e740a2697a7b40d7c5003a7d7edaee16acd349a9
|
F test/userauth01.test e740a2697a7b40d7c5003a7d7edaee16acd349a9
|
||||||
@@ -1493,7 +1502,7 @@ F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
|
|||||||
F test/vacuum2.test aa048abee196c16c9ba308465494009057b79f9b
|
F test/vacuum2.test aa048abee196c16c9ba308465494009057b79f9b
|
||||||
F test/vacuum3.test 77ecdd54592b45a0bcb133339f99f1ae0ae94d0d
|
F test/vacuum3.test 77ecdd54592b45a0bcb133339f99f1ae0ae94d0d
|
||||||
F test/vacuum4.test 7ea76b769fffeb41f925303b04cbcf5a5bbeabe55e4c60ae754ff24eeeb7c010
|
F test/vacuum4.test 7ea76b769fffeb41f925303b04cbcf5a5bbeabe55e4c60ae754ff24eeeb7c010
|
||||||
F test/vacuum5.test c87234e8ca4107f349da4edbeda3e4ea5adc93f3
|
F test/vacuum5.test 263b144d537e92ad8e9ca8a73cc6e1583f41cfd0dda9432b87f7806174a2f48c
|
||||||
F test/vacuummem.test 7b42abb3208bd82dd23a7536588396f295a314f2
|
F test/vacuummem.test 7b42abb3208bd82dd23a7536588396f295a314f2
|
||||||
F test/varint.test bbce22cda8fc4d135bcc2b589574be8410614e62
|
F test/varint.test bbce22cda8fc4d135bcc2b589574be8410614e62
|
||||||
F test/veryquick.test 57ab846bacf7b90cf4e9a672721ea5c5b669b661
|
F test/veryquick.test 57ab846bacf7b90cf4e9a672721ea5c5b669b661
|
||||||
@@ -1520,7 +1529,7 @@ F test/vtab_alter.test 736e66fb5ec7b4fee58229aa3ada2f27ec58bc58c00edae4836890c37
|
|||||||
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
|
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
|
||||||
F test/vtab_shared.test 5253bff2355a9a3f014c15337da7e177ab0ef8ad
|
F test/vtab_shared.test 5253bff2355a9a3f014c15337da7e177ab0ef8ad
|
||||||
F test/wal.test 613efec03e517e1775d86b993a54877d2e29a477
|
F test/wal.test 613efec03e517e1775d86b993a54877d2e29a477
|
||||||
F test/wal2.test 2d81ffe2a02d9e5c7447b266f7153716cfcba7aecda5ed832db4544617399e29
|
F test/wal2.test 155b9efa999bdb38ce1cd729b9a4fcdbffd6b88be27f039bad1d2929d287d918
|
||||||
F test/wal3.test 2a93004bc0fb2b5c29888964024695bade278ab2
|
F test/wal3.test 2a93004bc0fb2b5c29888964024695bade278ab2
|
||||||
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
|
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
|
||||||
F test/wal5.test 9c11da7aeccd83a46d79a556ad11a18d3cb15aa9
|
F test/wal5.test 9c11da7aeccd83a46d79a556ad11a18d3cb15aa9
|
||||||
@@ -1538,19 +1547,19 @@ F test/walcrash.test 21038858cc552077b0522f50b0fa87e38139306a
|
|||||||
F test/walcrash2.test a0edab4e5390f03b99a790de89aad15d6ec70b36
|
F test/walcrash2.test a0edab4e5390f03b99a790de89aad15d6ec70b36
|
||||||
F test/walcrash3.test e426aa58122d20f2b9fbe9a507f9eb8cab85b8af
|
F test/walcrash3.test e426aa58122d20f2b9fbe9a507f9eb8cab85b8af
|
||||||
F test/walcrash4.test e7b6e7639a950a0cca8e210e248c8dad4d63bf20
|
F test/walcrash4.test e7b6e7639a950a0cca8e210e248c8dad4d63bf20
|
||||||
F test/walfault.test 1f8389f7709877e9b4cc679033d71d6fe529056b
|
F test/walfault.test 09b8ad7e52d2f54bce50e31aa7ea51412bb9f70ac13c74e669ddcd8b48b0d98d
|
||||||
F test/walhook.test ed00a40ba7255da22d6b66433ab61fab16a63483
|
F test/walhook.test ed00a40ba7255da22d6b66433ab61fab16a63483
|
||||||
F test/walmode.test 4022fe03ae6e830583672caa101f046438a0473c
|
F test/walmode.test cd6e7cff618eaaa5910ce57c3657aa50110397f86213886a2400afb9bfec7b7b
|
||||||
F test/walnoshm.test 84ca10c544632a756467336b7c3b864d493ee496
|
F test/walnoshm.test 84ca10c544632a756467336b7c3b864d493ee496
|
||||||
F test/waloverwrite.test dad2f26567f1b45174e54fbf9a8dc1cb876a7f03
|
F test/waloverwrite.test dad2f26567f1b45174e54fbf9a8dc1cb876a7f03
|
||||||
F test/walpersist.test 8c6b7e3ec1ba91b5e4dc4e0921d6d3f87cd356a6
|
F test/walpersist.test 8c6b7e3ec1ba91b5e4dc4e0921d6d3f87cd356a6
|
||||||
F test/walprotocol.test a112aba0b79e3adeaa485fed09484b32c654e97df58e454aa8489ac2cd57bf84
|
F test/walprotocol.test a112aba0b79e3adeaa485fed09484b32c654e97df58e454aa8489ac2cd57bf84
|
||||||
F test/walro.test cb438d05ba0d191f10b688e39c4f0cd5b71569a1d1f4440e5bdf3c6880e08c20
|
F test/walro.test cb438d05ba0d191f10b688e39c4f0cd5b71569a1d1f4440e5bdf3c6880e08c20
|
||||||
F test/walro2.test 5cd57d192ee334c3894330303b5f8cb6789fef49b2c83ad1b50b9b132d0f7ae1
|
F test/walro2.test 6c73e8e4b5ccc55f907f4603ba36458b45c085fb6dfb04f30e3c0babbc1c2f41
|
||||||
F test/walrofault.test c70cb6e308c443867701856cce92ad8288cd99488fa52afab77cca6cfd51af68
|
F test/walrofault.test c70cb6e308c443867701856cce92ad8288cd99488fa52afab77cca6cfd51af68
|
||||||
F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417
|
F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417
|
||||||
F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f
|
F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f
|
||||||
F test/walthread.test de8dbaf6d9e41481c460ba31ca61e163d7348f8e
|
F test/walthread.test 14b20fcfa6ae152f5d8e12f5dc8a8a724b7ef189f5d8ef1e2ceab79f2af51747
|
||||||
F test/where.test f0c325563acde44f2c4ea6ba348e9e29f7121757
|
F test/where.test f0c325563acde44f2c4ea6ba348e9e29f7121757
|
||||||
F test/where2.test 478d2170637b9211f593120648858593bf2445a1
|
F test/where2.test 478d2170637b9211f593120648858593bf2445a1
|
||||||
F test/where3.test 54cdeb02157acc979de41530b804ae7b09552bf1
|
F test/where3.test 54cdeb02157acc979de41530b804ae7b09552bf1
|
||||||
@@ -1581,7 +1590,7 @@ F test/win32lock.test fbf107c91d8f5512be5a5b87c4c42ab9fdd54972
|
|||||||
F test/win32longpath.test 169c75a3b2e43481f4a62122510210c67b08f26d
|
F test/win32longpath.test 169c75a3b2e43481f4a62122510210c67b08f26d
|
||||||
F test/win32nolock.test ac4f08811a562e45a5755e661f45ca85892bdbbc
|
F test/win32nolock.test ac4f08811a562e45a5755e661f45ca85892bdbbc
|
||||||
F test/with1.test ca08e291249a810a2ec9b72ceef5575e07d5925b360fcf6652ae6fe06ac4dced
|
F test/with1.test ca08e291249a810a2ec9b72ceef5575e07d5925b360fcf6652ae6fe06ac4dced
|
||||||
F test/with2.test 2b40da883658eb74ad8ad06afabe11a408e7fb87
|
F test/with2.test e0030e2f0267a910d6c0e4f46f2dfe941c1cc0d4f659ba69b3597728e7e8f1ab
|
||||||
F test/with3.test e71604a0e53cba82bc04c703987cb1d6751ec0b6
|
F test/with3.test e71604a0e53cba82bc04c703987cb1d6751ec0b6
|
||||||
F test/withM.test 693b61765f2b387b5e3e24a4536e2e82de15ff64
|
F test/withM.test 693b61765f2b387b5e3e24a4536e2e82de15ff64
|
||||||
F test/without_rowid1.test 06b7215130882d6a072233820dd364c874c4fd69221e8fc756ec471009192874
|
F test/without_rowid1.test 06b7215130882d6a072233820dd364c874c4fd69221e8fc756ec471009192874
|
||||||
@@ -1593,7 +1602,8 @@ F test/without_rowid6.test 1f99644e6508447fb050f73697350c7ceca3392e
|
|||||||
F test/wordcount.c cb589cec469a1d90add05b1f8cee75c7210338d87a5afd65260ed5c0f4bbf8ac
|
F test/wordcount.c cb589cec469a1d90add05b1f8cee75c7210338d87a5afd65260ed5c0f4bbf8ac
|
||||||
F test/writecrash.test f1da7f7adfe8d7f09ea79b42e5ca6dcc41102f27f8e334ad71539501ddd910cc
|
F test/writecrash.test f1da7f7adfe8d7f09ea79b42e5ca6dcc41102f27f8e334ad71539501ddd910cc
|
||||||
F test/zeroblob.test 3857870fe681b8185654414a9bccfde80b62a0fa
|
F test/zeroblob.test 3857870fe681b8185654414a9bccfde80b62a0fa
|
||||||
F test/zerodamage.test e59a56443d6298ecf7435f618f0b27654f0c849e
|
F test/zerodamage.test 9c41628db7e8d9e8a0181e59ea5f189df311a9f6ce99cc376dc461f66db6f8dc
|
||||||
|
F test/zipfile.test cb42e8fa6ba5db4a03ce6baa4401fc6236baf6eb5e62b44f3e463bf6aafd631d
|
||||||
F tool/GetFile.cs a15e08acb5dd7539b75ba23501581d7c2b462cb5
|
F tool/GetFile.cs a15e08acb5dd7539b75ba23501581d7c2b462cb5
|
||||||
F tool/GetTclKit.bat 8995df40c4209808b31f24de0b58f90930239a234f7591e3675d45bfbb990c5d
|
F tool/GetTclKit.bat 8995df40c4209808b31f24de0b58f90930239a234f7591e3675d45bfbb990c5d
|
||||||
F tool/Replace.cs 02c67258801c2fb5f63231e0ac0f220b4b36ba91
|
F tool/Replace.cs 02c67258801c2fb5f63231e0ac0f220b4b36ba91
|
||||||
@@ -1612,7 +1622,7 @@ F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
|
|||||||
F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
|
F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
|
||||||
F tool/kvtest-speed.sh 4761a9c4b3530907562314d7757995787f7aef8f
|
F tool/kvtest-speed.sh 4761a9c4b3530907562314d7757995787f7aef8f
|
||||||
F tool/lemon.c 7f7735326ca9c3b48327b241063cee52d35d44e20ebe1b3624a81658052a4d39
|
F tool/lemon.c 7f7735326ca9c3b48327b241063cee52d35d44e20ebe1b3624a81658052a4d39
|
||||||
F tool/lempar.c dddd4f592b8bad36aec4500d456c5db5fe42fefc4ee384913880439d8917f87a
|
F tool/lempar.c da840fc8a6fbac23599a65ff075e6e3d01320417c794ff577088e09f5d74b689
|
||||||
F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
|
F tool/libvers.c caafc3b689638a1d88d44bc5f526c2278760d9b9
|
||||||
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
|
F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862
|
||||||
F tool/logest.c 11346aa019e2e77a00902aa7d0cabd27bd2e8cca
|
F tool/logest.c 11346aa019e2e77a00902aa7d0cabd27bd2e8cca
|
||||||
@@ -1626,7 +1636,7 @@ F tool/mkopcodec.tcl d1b6362bd3aa80d5520d4d6f3765badf01f6c43c
|
|||||||
F tool/mkopcodeh.tcl 4ee2a30ccbd900dc4d5cdb61bdab87cd2166cd2affcc78c9cc0b8d22a65b2eee
|
F tool/mkopcodeh.tcl 4ee2a30ccbd900dc4d5cdb61bdab87cd2166cd2affcc78c9cc0b8d22a65b2eee
|
||||||
F tool/mkopts.tcl 680f785fdb09729fd9ac50632413da4eadbdf9071535e3f26d03795828ab07fa
|
F tool/mkopts.tcl 680f785fdb09729fd9ac50632413da4eadbdf9071535e3f26d03795828ab07fa
|
||||||
F tool/mkpragmatab.tcl 2144bc8550a6471a029db262a132d2df4b9e0db61b90398bf64f5b7b3f8d92cd
|
F tool/mkpragmatab.tcl 2144bc8550a6471a029db262a132d2df4b9e0db61b90398bf64f5b7b3f8d92cd
|
||||||
F tool/mkshellc.tcl 574307265b49d813301fba91ccd74e6a26d33f65f74b6891c320a0ffbee07895
|
F tool/mkshellc.tcl 1f45770aea226ac093a9c72f718efbb88a2a2833409ec2e1c4cecae4202626f5
|
||||||
F tool/mksourceid.c d458f9004c837bee87a6382228ac20d3eae3c49ea3b0a5aace936f8b60748d3b
|
F tool/mksourceid.c d458f9004c837bee87a6382228ac20d3eae3c49ea3b0a5aace936f8b60748d3b
|
||||||
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
|
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
|
||||||
F tool/mksqlite3c-noext.tcl fef88397668ae83166735c41af99d79f56afaabb
|
F tool/mksqlite3c-noext.tcl fef88397668ae83166735c41af99d79f56afaabb
|
||||||
@@ -1659,6 +1669,8 @@ F tool/speedtest8inst1.c 7ce07da76b5e745783e703a834417d725b7d45fd
|
|||||||
F tool/split-sqlite3c.tcl 3efcd4240b738f6bb2b5af0aea7e1e0ef9bc1c61654f645076cec883030b710c
|
F tool/split-sqlite3c.tcl 3efcd4240b738f6bb2b5af0aea7e1e0ef9bc1c61654f645076cec883030b710c
|
||||||
F tool/sqldiff.c 30879bbc8de686df4624e86adce2d8981f500904c1cfb55b5d1eea2ffd9341eb
|
F tool/sqldiff.c 30879bbc8de686df4624e86adce2d8981f500904c1cfb55b5d1eea2ffd9341eb
|
||||||
F tool/sqlite3_analyzer.c.in 7eeaae8b0d7577662acaabbb11107af0659d1b41bc1dfdd4d91422de27127968
|
F tool/sqlite3_analyzer.c.in 7eeaae8b0d7577662acaabbb11107af0659d1b41bc1dfdd4d91422de27127968
|
||||||
|
F tool/sqltclsh.c.in 1bcc2e9da58fadf17b0bf6a50e68c1159e602ce057210b655d50bad5aaaef898
|
||||||
|
F tool/sqltclsh.tcl 862f4cf1418df5e1315b5db3b5ebe88969e2a784525af5fbf9596592f14ed848
|
||||||
F tool/srcck1.c 371de5363b70154012955544f86fdee8f6e5326f
|
F tool/srcck1.c 371de5363b70154012955544f86fdee8f6e5326f
|
||||||
F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
|
F tool/stack_usage.tcl f8e71b92cdb099a147dad572375595eae55eca43
|
||||||
F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
|
F tool/symbols-mingw.sh 4dbcea7e74768305384c9fd2ed2b41bbf9f0414d
|
||||||
@@ -1690,7 +1702,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
|||||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||||
P e0da2cc382e0db33d0423372133115f52c77bd0093dbf816c7e88a0aad5f6582
|
P 512b8e40c4ce2066d230b5f007bd704dc3577e21c55131ef07d90bf2fcf91b40 e0f192ea6dda4fa0b243d58c8ce41932519141bcae0689a90318b4f866f54edd
|
||||||
R 3114b544cf591fa5de64b7bed571adcc
|
R d69faf4c612ebfba1638ce54002893c8
|
||||||
U drh
|
U drh
|
||||||
Z b9d8faa03d64775d21ab162e0db38bba
|
Z 027f1b62b36e246537cbc0170b90eb31
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
512b8e40c4ce2066d230b5f007bd704dc3577e21c55131ef07d90bf2fcf91b40
|
6ef3de810d54563c227045b16197b8011ce285ea867261946f93b2de55344f29
|
||||||
@@ -234,6 +234,10 @@ static void openStatTable(
|
|||||||
"DELETE FROM %Q.%s WHERE %s=%Q",
|
"DELETE FROM %Q.%s WHERE %s=%Q",
|
||||||
pDb->zDbSName, zTab, zWhereType, zWhere
|
pDb->zDbSName, zTab, zWhereType, zWhere
|
||||||
);
|
);
|
||||||
|
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||||
|
}else if( db->xPreUpdateCallback ){
|
||||||
|
sqlite3NestedParse(pParse, "DELETE FROM %Q.%s", pDb->zDbSName, zTab);
|
||||||
|
#endif
|
||||||
}else{
|
}else{
|
||||||
/* The sqlite_stat[134] table already exists. Delete all rows. */
|
/* The sqlite_stat[134] table already exists. Delete all rows. */
|
||||||
sqlite3VdbeAddOp2(v, OP_Clear, aRoot[i], iDb);
|
sqlite3VdbeAddOp2(v, OP_Clear, aRoot[i], iDb);
|
||||||
@@ -998,6 +1002,9 @@ static void analyzeOneTable(
|
|||||||
int regIdxname = iMem++; /* Register containing index name */
|
int regIdxname = iMem++; /* Register containing index name */
|
||||||
int regStat1 = iMem++; /* Value for the stat column of sqlite_stat1 */
|
int regStat1 = iMem++; /* Value for the stat column of sqlite_stat1 */
|
||||||
int regPrev = iMem; /* MUST BE LAST (see below) */
|
int regPrev = iMem; /* MUST BE LAST (see below) */
|
||||||
|
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||||
|
Table *pStat1 = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
pParse->nMem = MAX(pParse->nMem, iMem);
|
pParse->nMem = MAX(pParse->nMem, iMem);
|
||||||
v = sqlite3GetVdbe(pParse);
|
v = sqlite3GetVdbe(pParse);
|
||||||
@@ -1023,6 +1030,18 @@ static void analyzeOneTable(
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||||
|
if( db->xPreUpdateCallback ){
|
||||||
|
pStat1 = (Table*)sqlite3DbMallocZero(db, sizeof(Table) + 13);
|
||||||
|
if( pStat1==0 ) return;
|
||||||
|
pStat1->zName = (char*)&pStat1[1];
|
||||||
|
memcpy(pStat1->zName, "sqlite_stat1", 13);
|
||||||
|
pStat1->nCol = 3;
|
||||||
|
pStat1->iPKey = -1;
|
||||||
|
sqlite3VdbeAddOp4(pParse->pVdbe, OP_Noop, 0, 0, 0,(char*)pStat1,P4_DYNBLOB);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Establish a read-lock on the table at the shared-cache level.
|
/* Establish a read-lock on the table at the shared-cache level.
|
||||||
** Open a read-only cursor on the table. Also allocate a cursor number
|
** Open a read-only cursor on the table. Also allocate a cursor number
|
||||||
** to use for scanning indexes (iIdxCur). No index cursor is opened at
|
** to use for scanning indexes (iIdxCur). No index cursor is opened at
|
||||||
@@ -1224,6 +1243,9 @@ static void analyzeOneTable(
|
|||||||
sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regTemp, "BBB", 0);
|
sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regTemp, "BBB", 0);
|
||||||
sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);
|
sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);
|
||||||
sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regTemp, regNewRowid);
|
sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regTemp, regNewRowid);
|
||||||
|
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||||
|
sqlite3VdbeChangeP4(v, -1, (char*)pStat1, P4_TABLE);
|
||||||
|
#endif
|
||||||
sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
|
sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
|
||||||
|
|
||||||
/* Add the entries to the stat3 or stat4 table. */
|
/* Add the entries to the stat3 or stat4 table. */
|
||||||
@@ -1287,6 +1309,9 @@ static void analyzeOneTable(
|
|||||||
sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);
|
sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);
|
||||||
sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regTemp, regNewRowid);
|
sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regTemp, regNewRowid);
|
||||||
sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
|
sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
|
||||||
|
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||||
|
sqlite3VdbeChangeP4(v, -1, (char*)pStat1, P4_TABLE);
|
||||||
|
#endif
|
||||||
sqlite3VdbeJumpHere(v, jZeroRows);
|
sqlite3VdbeJumpHere(v, jZeroRows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-5
@@ -123,9 +123,12 @@ int sqlite3_enable_shared_cache(int enable){
|
|||||||
*/
|
*/
|
||||||
#ifdef SQLITE_DEBUG
|
#ifdef SQLITE_DEBUG
|
||||||
int corruptPageError(int lineno, MemPage *p){
|
int corruptPageError(int lineno, MemPage *p){
|
||||||
char *zMsg = sqlite3_mprintf("database corruption page %d of %s",
|
char *zMsg;
|
||||||
|
sqlite3BeginBenignMalloc();
|
||||||
|
zMsg = sqlite3_mprintf("database corruption page %d of %s",
|
||||||
(int)p->pgno, sqlite3PagerFilename(p->pBt->pPager, 0)
|
(int)p->pgno, sqlite3PagerFilename(p->pBt->pPager, 0)
|
||||||
);
|
);
|
||||||
|
sqlite3EndBenignMalloc();
|
||||||
if( zMsg ){
|
if( zMsg ){
|
||||||
sqlite3ReportError(SQLITE_CORRUPT, lineno, zMsg);
|
sqlite3ReportError(SQLITE_CORRUPT, lineno, zMsg);
|
||||||
}
|
}
|
||||||
@@ -6186,9 +6189,8 @@ static void freePage(MemPage *pPage, int *pRC){
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Free any overflow pages associated with the given Cell. Write the
|
** Free any overflow pages associated with the given Cell. Store
|
||||||
** local Cell size (the number of bytes on the original page, omitting
|
** size information about the cell in pInfo.
|
||||||
** overflow) into *pnSize.
|
|
||||||
*/
|
*/
|
||||||
static int clearCell(
|
static int clearCell(
|
||||||
MemPage *pPage, /* The page that contains the Cell */
|
MemPage *pPage, /* The page that contains the Cell */
|
||||||
@@ -7392,7 +7394,7 @@ static int balance_nonroot(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Load b.apCell[] with pointers to all cells in pOld. If pOld
|
/* Load b.apCell[] with pointers to all cells in pOld. If pOld
|
||||||
** constains overflow cells, include them in the b.apCell[] array
|
** contains overflow cells, include them in the b.apCell[] array
|
||||||
** in the correct spot.
|
** in the correct spot.
|
||||||
**
|
**
|
||||||
** Note that when there are multiple overflow cells, it is always the
|
** Note that when there are multiple overflow cells, it is always the
|
||||||
|
|||||||
+2
-2
@@ -566,8 +566,8 @@ struct BtCursor {
|
|||||||
** Do nothing else with this cursor. Any attempt to use the cursor
|
** Do nothing else with this cursor. Any attempt to use the cursor
|
||||||
** should return the error code stored in BtCursor.skipNext
|
** should return the error code stored in BtCursor.skipNext
|
||||||
*/
|
*/
|
||||||
#define CURSOR_INVALID 0
|
#define CURSOR_VALID 0
|
||||||
#define CURSOR_VALID 1
|
#define CURSOR_INVALID 1
|
||||||
#define CURSOR_SKIPNEXT 2
|
#define CURSOR_SKIPNEXT 2
|
||||||
#define CURSOR_REQUIRESEEK 3
|
#define CURSOR_REQUIRESEEK 3
|
||||||
#define CURSOR_FAULT 4
|
#define CURSOR_FAULT 4
|
||||||
|
|||||||
+1
-1
@@ -2124,7 +2124,7 @@ void sqlite3CreateView(
|
|||||||
** the end.
|
** the end.
|
||||||
*/
|
*/
|
||||||
sEnd = pParse->sLastToken;
|
sEnd = pParse->sLastToken;
|
||||||
assert( sEnd.z[0]!=0 );
|
assert( sEnd.z[0]!=0 || sEnd.n==0 );
|
||||||
if( sEnd.z[0]!=';' ){
|
if( sEnd.z[0]!=';' ){
|
||||||
sEnd.z += sEnd.n;
|
sEnd.z += sEnd.n;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -760,7 +760,7 @@ void sqlite3GenerateRowDelete(
|
|||||||
u8 p5 = 0;
|
u8 p5 = 0;
|
||||||
sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur,0,iIdxNoSeek);
|
sqlite3GenerateRowIndexDelete(pParse, pTab, iDataCur, iIdxCur,0,iIdxNoSeek);
|
||||||
sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, (count?OPFLAG_NCHANGE:0));
|
sqlite3VdbeAddOp2(v, OP_Delete, iDataCur, (count?OPFLAG_NCHANGE:0));
|
||||||
if( pParse->nested==0 ){
|
if( pParse->nested==0 || 0==sqlite3_stricmp(pTab->zName, "sqlite_stat1") ){
|
||||||
sqlite3VdbeAppendP4(v, (char*)pTab, P4_TABLE);
|
sqlite3VdbeAppendP4(v, (char*)pTab, P4_TABLE);
|
||||||
}
|
}
|
||||||
if( eMode!=ONEPASS_OFF ){
|
if( eMode!=ONEPASS_OFF ){
|
||||||
|
|||||||
+3
-4
@@ -658,15 +658,15 @@ static void heightOfExprList(ExprList *p, int *pnHeight){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void heightOfSelect(Select *p, int *pnHeight){
|
static void heightOfSelect(Select *pSelect, int *pnHeight){
|
||||||
if( p ){
|
Select *p;
|
||||||
|
for(p=pSelect; p; p=p->pPrior){
|
||||||
heightOfExpr(p->pWhere, pnHeight);
|
heightOfExpr(p->pWhere, pnHeight);
|
||||||
heightOfExpr(p->pHaving, pnHeight);
|
heightOfExpr(p->pHaving, pnHeight);
|
||||||
heightOfExpr(p->pLimit, pnHeight);
|
heightOfExpr(p->pLimit, pnHeight);
|
||||||
heightOfExprList(p->pEList, pnHeight);
|
heightOfExprList(p->pEList, pnHeight);
|
||||||
heightOfExprList(p->pGroupBy, pnHeight);
|
heightOfExprList(p->pGroupBy, pnHeight);
|
||||||
heightOfExprList(p->pOrderBy, pnHeight);
|
heightOfExprList(p->pOrderBy, pnHeight);
|
||||||
heightOfSelect(p->pPrior, pnHeight);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2764,7 +2764,6 @@ int sqlite3CodeSubselect(
|
|||||||
pSel->pLimit = sqlite3PExpr(pParse, TK_LIMIT, pLimit, 0);
|
pSel->pLimit = sqlite3PExpr(pParse, TK_LIMIT, pLimit, 0);
|
||||||
}
|
}
|
||||||
pSel->iLimit = 0;
|
pSel->iLimit = 0;
|
||||||
pSel->selFlags &= ~SF_MultiValue;
|
|
||||||
if( sqlite3Select(pParse, pSel, &dest) ){
|
if( sqlite3Select(pParse, pSel, &dest) ){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-9
@@ -35,6 +35,8 @@ static CollSeq *sqlite3GetFuncCollSeq(sqlite3_context *context){
|
|||||||
** iteration of the aggregate loop.
|
** iteration of the aggregate loop.
|
||||||
*/
|
*/
|
||||||
static void sqlite3SkipAccumulatorLoad(sqlite3_context *context){
|
static void sqlite3SkipAccumulatorLoad(sqlite3_context *context){
|
||||||
|
assert( context->isError<=0 );
|
||||||
|
context->isError = -1;
|
||||||
context->skipFlag = 1;
|
context->skipFlag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,8 +103,6 @@ static void lengthFunc(
|
|||||||
int argc,
|
int argc,
|
||||||
sqlite3_value **argv
|
sqlite3_value **argv
|
||||||
){
|
){
|
||||||
int len;
|
|
||||||
|
|
||||||
assert( argc==1 );
|
assert( argc==1 );
|
||||||
UNUSED_PARAMETER(argc);
|
UNUSED_PARAMETER(argc);
|
||||||
switch( sqlite3_value_type(argv[0]) ){
|
switch( sqlite3_value_type(argv[0]) ){
|
||||||
@@ -114,13 +114,17 @@ static void lengthFunc(
|
|||||||
}
|
}
|
||||||
case SQLITE_TEXT: {
|
case SQLITE_TEXT: {
|
||||||
const unsigned char *z = sqlite3_value_text(argv[0]);
|
const unsigned char *z = sqlite3_value_text(argv[0]);
|
||||||
|
const unsigned char *z0;
|
||||||
|
unsigned char c;
|
||||||
if( z==0 ) return;
|
if( z==0 ) return;
|
||||||
len = 0;
|
z0 = z;
|
||||||
while( *z ){
|
while( (c = *z)!=0 ){
|
||||||
len++;
|
z++;
|
||||||
SQLITE_SKIP_UTF8(z);
|
if( c>=0xc0 ){
|
||||||
|
while( (*z & 0xc0)==0x80 ){ z++; z0++; }
|
||||||
}
|
}
|
||||||
sqlite3_result_int(context, len);
|
}
|
||||||
|
sqlite3_result_int(context, (int)(z-z0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
@@ -1800,8 +1804,7 @@ void sqlite3RegisterBuiltinFunctions(void){
|
|||||||
FUNCTION2(affinity, 1, 0, 0, noopFunc, SQLITE_FUNC_AFFINITY),
|
FUNCTION2(affinity, 1, 0, 0, noopFunc, SQLITE_FUNC_AFFINITY),
|
||||||
#endif
|
#endif
|
||||||
#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC
|
#ifdef SQLITE_ENABLE_OFFSET_SQL_FUNC
|
||||||
FUNCTION2(sqlite_unsupported_offset,
|
FUNCTION2(sqlite_offset, 1, 0, 0, noopFunc, SQLITE_FUNC_OFFSET|
|
||||||
1, 0, 0, noopFunc, SQLITE_FUNC_OFFSET|
|
|
||||||
SQLITE_FUNC_TYPEOF),
|
SQLITE_FUNC_TYPEOF),
|
||||||
#endif
|
#endif
|
||||||
FUNCTION(ltrim, 1, 1, 0, trimFunc ),
|
FUNCTION(ltrim, 1, 1, 0, trimFunc ),
|
||||||
|
|||||||
+5
-1
@@ -430,7 +430,11 @@ static const sqlite3_api_routines sqlite3Apis = {
|
|||||||
sqlite3_prepare16_v3,
|
sqlite3_prepare16_v3,
|
||||||
sqlite3_bind_pointer,
|
sqlite3_bind_pointer,
|
||||||
sqlite3_result_pointer,
|
sqlite3_result_pointer,
|
||||||
sqlite3_value_pointer
|
sqlite3_value_pointer,
|
||||||
|
/* Version 3.22.0 and later */
|
||||||
|
sqlite3_vtab_nochange,
|
||||||
|
sqlite3_value_nochange,
|
||||||
|
sqlite3_vtab_collation
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1323,6 +1323,7 @@ const char *sqlite3ErrName(int rc){
|
|||||||
case SQLITE_READONLY_CANTINIT: zName = "SQLITE_READONLY_CANTINIT"; break;
|
case SQLITE_READONLY_CANTINIT: zName = "SQLITE_READONLY_CANTINIT"; break;
|
||||||
case SQLITE_READONLY_ROLLBACK: zName = "SQLITE_READONLY_ROLLBACK"; break;
|
case SQLITE_READONLY_ROLLBACK: zName = "SQLITE_READONLY_ROLLBACK"; break;
|
||||||
case SQLITE_READONLY_DBMOVED: zName = "SQLITE_READONLY_DBMOVED"; break;
|
case SQLITE_READONLY_DBMOVED: zName = "SQLITE_READONLY_DBMOVED"; break;
|
||||||
|
case SQLITE_READONLY_DIRECTORY: zName = "SQLITE_READONLY_DIRECTORY";break;
|
||||||
case SQLITE_INTERRUPT: zName = "SQLITE_INTERRUPT"; break;
|
case SQLITE_INTERRUPT: zName = "SQLITE_INTERRUPT"; break;
|
||||||
case SQLITE_IOERR: zName = "SQLITE_IOERR"; break;
|
case SQLITE_IOERR: zName = "SQLITE_IOERR"; break;
|
||||||
case SQLITE_IOERR_READ: zName = "SQLITE_IOERR_READ"; break;
|
case SQLITE_IOERR_READ: zName = "SQLITE_IOERR_READ"; break;
|
||||||
|
|||||||
+1
-1
@@ -636,7 +636,7 @@ char *sqlite3DbSpanDup(sqlite3 *db, const char *zStart, const char *zEnd){
|
|||||||
int n;
|
int n;
|
||||||
while( sqlite3Isspace(zStart[0]) ) zStart++;
|
while( sqlite3Isspace(zStart[0]) ) zStart++;
|
||||||
n = (int)(zEnd - zStart);
|
n = (int)(zEnd - zStart);
|
||||||
while( n>0 && sqlite3Isspace(zStart[n-1]) ) n--;
|
while( ALWAYS(n>0) && sqlite3Isspace(zStart[n-1]) ) n--;
|
||||||
return sqlite3DbStrNDup(db, zStart, n);
|
return sqlite3DbStrNDup(db, zStart, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-6
@@ -3950,7 +3950,7 @@ static void setDeviceCharacteristics(unixFile *pFile){
|
|||||||
pFile->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;
|
pFile->sectorSize = SQLITE_DEFAULT_SECTOR_SIZE;
|
||||||
pFile->deviceCharacteristics = 0;
|
pFile->deviceCharacteristics = 0;
|
||||||
if( fstatvfs(pFile->h, &fsInfo) == -1 ) {
|
if( fstatvfs(pFile->h, &fsInfo) == -1 ) {
|
||||||
return pFile->sectorSize;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !strcmp(fsInfo.f_basetype, "tmp") ) {
|
if( !strcmp(fsInfo.f_basetype, "tmp") ) {
|
||||||
@@ -5904,7 +5904,12 @@ static int unixOpen(
|
|||||||
fd = robust_open(zName, openFlags, openMode);
|
fd = robust_open(zName, openFlags, openMode);
|
||||||
OSTRACE(("OPENX %-3d %s 0%o\n", fd, zName, openFlags));
|
OSTRACE(("OPENX %-3d %s 0%o\n", fd, zName, openFlags));
|
||||||
assert( !isExclusive || (openFlags & O_CREAT)!=0 );
|
assert( !isExclusive || (openFlags & O_CREAT)!=0 );
|
||||||
if( fd<0 && errno!=EISDIR && isReadWrite ){
|
if( fd<0 ){
|
||||||
|
if( isNewJrnl && errno==EACCES && osAccess(zName, F_OK) ){
|
||||||
|
/* If unable to create a journal because the directory is not
|
||||||
|
** writable, change the error code to indicate that. */
|
||||||
|
rc = SQLITE_READONLY_DIRECTORY;
|
||||||
|
}else if( errno!=EISDIR && isReadWrite ){
|
||||||
/* Failed to open the file for read/write access. Try read-only. */
|
/* Failed to open the file for read/write access. Try read-only. */
|
||||||
flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
|
flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
|
||||||
openFlags &= ~(O_RDWR|O_CREAT);
|
openFlags &= ~(O_RDWR|O_CREAT);
|
||||||
@@ -5913,11 +5918,10 @@ static int unixOpen(
|
|||||||
isReadonly = 1;
|
isReadonly = 1;
|
||||||
fd = robust_open(zName, openFlags, openMode);
|
fd = robust_open(zName, openFlags, openMode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if( fd<0 ){
|
if( fd<0 ){
|
||||||
rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
|
int rc2 = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
|
||||||
/* If unable to create a journal, change the error code to
|
if( rc==SQLITE_OK ) rc = rc2;
|
||||||
** indicate that the directory permissions are wrong. */
|
|
||||||
if( isNewJrnl && osAccess(zName, F_OK) ) rc = SQLITE_READONLY_DIRECTORY;
|
|
||||||
goto open_finished;
|
goto open_finished;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+23
-21
@@ -3865,7 +3865,6 @@ static int winOpenSharedMemory(winFile *pDbFd){
|
|||||||
struct winShm *p; /* The connection to be opened */
|
struct winShm *p; /* The connection to be opened */
|
||||||
winShmNode *pShmNode = 0; /* The underlying mmapped file */
|
winShmNode *pShmNode = 0; /* The underlying mmapped file */
|
||||||
int rc = SQLITE_OK; /* Result code */
|
int rc = SQLITE_OK; /* Result code */
|
||||||
int rc2 = SQLITE_ERROR; /* winOpen result code */
|
|
||||||
winShmNode *pNew; /* Newly allocated winShmNode */
|
winShmNode *pNew; /* Newly allocated winShmNode */
|
||||||
int nName; /* Size of zName in bytes */
|
int nName; /* Size of zName in bytes */
|
||||||
|
|
||||||
@@ -3899,6 +3898,9 @@ static int winOpenSharedMemory(winFile *pDbFd){
|
|||||||
if( pShmNode ){
|
if( pShmNode ){
|
||||||
sqlite3_free(pNew);
|
sqlite3_free(pNew);
|
||||||
}else{
|
}else{
|
||||||
|
int inFlags = SQLITE_OPEN_WAL;
|
||||||
|
int outFlags = 0;
|
||||||
|
|
||||||
pShmNode = pNew;
|
pShmNode = pNew;
|
||||||
pNew = 0;
|
pNew = 0;
|
||||||
((winFile*)(&pShmNode->hFile))->h = INVALID_HANDLE_VALUE;
|
((winFile*)(&pShmNode->hFile))->h = INVALID_HANDLE_VALUE;
|
||||||
@@ -3914,25 +3916,19 @@ static int winOpenSharedMemory(winFile *pDbFd){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( 0==sqlite3_uri_boolean(pDbFd->zPath, "readonly_shm", 0) ){
|
if( 0==sqlite3_uri_boolean(pDbFd->zPath, "readonly_shm", 0) ){
|
||||||
rc2 = winOpen(pDbFd->pVfs,
|
inFlags |= SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
|
||||||
pShmNode->zFilename,
|
}else{
|
||||||
(sqlite3_file*)&pShmNode->hFile,
|
inFlags |= SQLITE_OPEN_READONLY;
|
||||||
SQLITE_OPEN_WAL|SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE,
|
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
if( rc2!=SQLITE_OK ){
|
rc = winOpen(pDbFd->pVfs, pShmNode->zFilename,
|
||||||
rc2 = winOpen(pDbFd->pVfs,
|
|
||||||
pShmNode->zFilename,
|
|
||||||
(sqlite3_file*)&pShmNode->hFile,
|
(sqlite3_file*)&pShmNode->hFile,
|
||||||
SQLITE_OPEN_WAL|SQLITE_OPEN_READONLY,
|
inFlags, &outFlags);
|
||||||
0);
|
if( rc!=SQLITE_OK ){
|
||||||
if( rc2!=SQLITE_OK ){
|
rc = winLogError(rc, osGetLastError(), "winOpenShm",
|
||||||
rc = winLogError(rc2, osGetLastError(), "winOpenShm",
|
|
||||||
pShmNode->zFilename);
|
pShmNode->zFilename);
|
||||||
goto shm_open_err;
|
goto shm_open_err;
|
||||||
}
|
}
|
||||||
pShmNode->isReadonly = 1;
|
if( outFlags==SQLITE_OPEN_READONLY ) pShmNode->isReadonly = 1;
|
||||||
}
|
|
||||||
|
|
||||||
rc = winLockSharedMemory(pShmNode);
|
rc = winLockSharedMemory(pShmNode);
|
||||||
if( rc!=SQLITE_OK && rc!=SQLITE_READONLY_CANTINIT ) goto shm_open_err;
|
if( rc!=SQLITE_OK && rc!=SQLITE_READONLY_CANTINIT ) goto shm_open_err;
|
||||||
@@ -5118,8 +5114,10 @@ static int winOpen(
|
|||||||
&extendedParameters);
|
&extendedParameters);
|
||||||
if( h!=INVALID_HANDLE_VALUE ) break;
|
if( h!=INVALID_HANDLE_VALUE ) break;
|
||||||
if( isReadWrite ){
|
if( isReadWrite ){
|
||||||
int isRO = 0;
|
int rc2, isRO = 0;
|
||||||
int rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
|
sqlite3BeginBenignMalloc();
|
||||||
|
rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
|
||||||
|
sqlite3EndBenignMalloc();
|
||||||
if( rc2==SQLITE_OK && isRO ) break;
|
if( rc2==SQLITE_OK && isRO ) break;
|
||||||
}
|
}
|
||||||
}while( winRetryIoerr(&cnt, &lastErrno) );
|
}while( winRetryIoerr(&cnt, &lastErrno) );
|
||||||
@@ -5133,8 +5131,10 @@ static int winOpen(
|
|||||||
NULL);
|
NULL);
|
||||||
if( h!=INVALID_HANDLE_VALUE ) break;
|
if( h!=INVALID_HANDLE_VALUE ) break;
|
||||||
if( isReadWrite ){
|
if( isReadWrite ){
|
||||||
int isRO = 0;
|
int rc2, isRO = 0;
|
||||||
int rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
|
sqlite3BeginBenignMalloc();
|
||||||
|
rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
|
||||||
|
sqlite3EndBenignMalloc();
|
||||||
if( rc2==SQLITE_OK && isRO ) break;
|
if( rc2==SQLITE_OK && isRO ) break;
|
||||||
}
|
}
|
||||||
}while( winRetryIoerr(&cnt, &lastErrno) );
|
}while( winRetryIoerr(&cnt, &lastErrno) );
|
||||||
@@ -5151,8 +5151,10 @@ static int winOpen(
|
|||||||
NULL);
|
NULL);
|
||||||
if( h!=INVALID_HANDLE_VALUE ) break;
|
if( h!=INVALID_HANDLE_VALUE ) break;
|
||||||
if( isReadWrite ){
|
if( isReadWrite ){
|
||||||
int isRO = 0;
|
int rc2, isRO = 0;
|
||||||
int rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
|
sqlite3BeginBenignMalloc();
|
||||||
|
rc2 = winAccess(pVfs, zName, SQLITE_ACCESS_READ, &isRO);
|
||||||
|
sqlite3EndBenignMalloc();
|
||||||
if( rc2==SQLITE_OK && isRO ) break;
|
if( rc2==SQLITE_OK && isRO ) break;
|
||||||
}
|
}
|
||||||
}while( winRetryIoerr(&cnt, &lastErrno) );
|
}while( winRetryIoerr(&cnt, &lastErrno) );
|
||||||
|
|||||||
+4
-3
@@ -1213,7 +1213,7 @@ static int jrnlBufferSize(Pager *pPager){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
|
#ifdef SQLITE_ENABLE_BATCH_ATOMIC_WRITE
|
||||||
if( dc&SQLITE_IOCAP_BATCH_ATOMIC ){
|
if( pPager->dbSize>0 && (dc&SQLITE_IOCAP_BATCH_ATOMIC) ){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -6501,8 +6501,9 @@ int sqlite3PagerCommitPhaseOne(
|
|||||||
if( bBatch ){
|
if( bBatch ){
|
||||||
if( rc==SQLITE_OK ){
|
if( rc==SQLITE_OK ){
|
||||||
rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_COMMIT_ATOMIC_WRITE, 0);
|
rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_COMMIT_ATOMIC_WRITE, 0);
|
||||||
}else{
|
}
|
||||||
sqlite3OsFileControl(fd, SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE, 0);
|
if( rc!=SQLITE_OK ){
|
||||||
|
sqlite3OsFileControlHint(fd, SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -31,8 +31,11 @@
|
|||||||
//
|
//
|
||||||
%syntax_error {
|
%syntax_error {
|
||||||
UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
|
UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
|
||||||
assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */
|
if( TOKEN.z[0] ){
|
||||||
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
|
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
|
||||||
|
}else{
|
||||||
|
sqlite3ErrorMsg(pParse, "incomplete input");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
%stack_overflow {
|
%stack_overflow {
|
||||||
sqlite3ErrorMsg(pParse, "parser stack overflow");
|
sqlite3ErrorMsg(pParse, "parser stack overflow");
|
||||||
|
|||||||
+8
-3
@@ -2184,9 +2184,14 @@ static int multiSelectOrderBy(
|
|||||||
** on a VALUES clause.
|
** on a VALUES clause.
|
||||||
**
|
**
|
||||||
** Because the Select object originates from a VALUES clause:
|
** Because the Select object originates from a VALUES clause:
|
||||||
** (1) It has no LIMIT or OFFSET
|
** (1) There is no LIMIT or OFFSET or else there is a LIMIT of exactly 1
|
||||||
** (2) All terms are UNION ALL
|
** (2) All terms are UNION ALL
|
||||||
** (3) There is no ORDER BY clause
|
** (3) There is no ORDER BY clause
|
||||||
|
**
|
||||||
|
** The "LIMIT of exactly 1" case of condition (1) comes about when a VALUES
|
||||||
|
** clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))").
|
||||||
|
** The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case.
|
||||||
|
** Since the limit is exactly 1, we only need to evalutes the left-most VALUES.
|
||||||
*/
|
*/
|
||||||
static int multiSelectValues(
|
static int multiSelectValues(
|
||||||
Parse *pParse, /* Parsing context */
|
Parse *pParse, /* Parsing context */
|
||||||
@@ -2194,13 +2199,13 @@ static int multiSelectValues(
|
|||||||
SelectDest *pDest /* What to do with query results */
|
SelectDest *pDest /* What to do with query results */
|
||||||
){
|
){
|
||||||
Select *pPrior;
|
Select *pPrior;
|
||||||
|
Select *pRightmost = p;
|
||||||
int nRow = 1;
|
int nRow = 1;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
assert( p->selFlags & SF_MultiValue );
|
assert( p->selFlags & SF_MultiValue );
|
||||||
do{
|
do{
|
||||||
assert( p->selFlags & SF_Values );
|
assert( p->selFlags & SF_Values );
|
||||||
assert( p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0) );
|
assert( p->op==TK_ALL || (p->op==TK_SELECT && p->pPrior==0) );
|
||||||
assert( p->pLimit==0 );
|
|
||||||
assert( p->pNext==0 || p->pEList->nExpr==p->pNext->pEList->nExpr );
|
assert( p->pNext==0 || p->pEList->nExpr==p->pNext->pEList->nExpr );
|
||||||
if( p->pPrior==0 ) break;
|
if( p->pPrior==0 ) break;
|
||||||
assert( p->pPrior->pNext==p );
|
assert( p->pPrior->pNext==p );
|
||||||
@@ -2212,7 +2217,7 @@ static int multiSelectValues(
|
|||||||
p->pPrior = 0;
|
p->pPrior = 0;
|
||||||
rc = sqlite3Select(pParse, p, pDest);
|
rc = sqlite3Select(pParse, p, pDest);
|
||||||
p->pPrior = pPrior;
|
p->pPrior = pPrior;
|
||||||
if( rc ) break;
|
if( rc || pRightmost->pLimit ) break;
|
||||||
p->nSelectRow = nRow;
|
p->nSelectRow = nRow;
|
||||||
p = p->pNext;
|
p = p->pNext;
|
||||||
}
|
}
|
||||||
|
|||||||
+1288
-147
File diff suppressed because it is too large
Load Diff
+40
-5
@@ -510,7 +510,6 @@ int sqlite3_exec(
|
|||||||
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
|
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
|
||||||
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
|
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
|
||||||
#define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8))
|
#define SQLITE_CANTOPEN_CONVPATH (SQLITE_CANTOPEN | (4<<8))
|
||||||
#define SQLITE_CANTOPEN_DIRTYWAL (SQLITE_CANTOPEN | (5<<8))
|
|
||||||
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
|
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
|
||||||
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
|
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
|
||||||
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
|
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
|
||||||
@@ -2952,8 +2951,8 @@ SQLITE_DEPRECATED void *sqlite3_profile(sqlite3*,
|
|||||||
** KEYWORDS: SQLITE_TRACE
|
** KEYWORDS: SQLITE_TRACE
|
||||||
**
|
**
|
||||||
** These constants identify classes of events that can be monitored
|
** These constants identify classes of events that can be monitored
|
||||||
** using the [sqlite3_trace_v2()] tracing logic. The third argument
|
** using the [sqlite3_trace_v2()] tracing logic. The M argument
|
||||||
** to [sqlite3_trace_v2()] is an OR-ed combination of one or more of
|
** to [sqlite3_trace_v2(D,M,X,P)] is an OR-ed combination of one or more of
|
||||||
** the following constants. ^The first argument to the trace callback
|
** the following constants. ^The first argument to the trace callback
|
||||||
** is one of the following constants.
|
** is one of the following constants.
|
||||||
**
|
**
|
||||||
@@ -3660,13 +3659,13 @@ int sqlite3_limit(sqlite3*, int id, int newVal);
|
|||||||
** or [GLOB] operator or if the parameter is compared to an indexed column
|
** or [GLOB] operator or if the parameter is compared to an indexed column
|
||||||
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
|
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
|
||||||
** </li>
|
** </li>
|
||||||
|
** </ol>
|
||||||
**
|
**
|
||||||
** <p>^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having
|
** <p>^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having
|
||||||
** the extra prepFlags parameter, which is a bit array consisting of zero or
|
** the extra prepFlags parameter, which is a bit array consisting of zero or
|
||||||
** more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags. ^The
|
** more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags. ^The
|
||||||
** sqlite3_prepare_v2() interface works exactly the same as
|
** sqlite3_prepare_v2() interface works exactly the same as
|
||||||
** sqlite3_prepare_v3() with a zero prepFlags parameter.
|
** sqlite3_prepare_v3() with a zero prepFlags parameter.
|
||||||
** </ol>
|
|
||||||
*/
|
*/
|
||||||
int sqlite3_prepare(
|
int sqlite3_prepare(
|
||||||
sqlite3 *db, /* Database handle */
|
sqlite3 *db, /* Database handle */
|
||||||
@@ -4799,6 +4798,9 @@ SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
|
|||||||
** datatype of the value
|
** datatype of the value
|
||||||
** <tr><td><b>sqlite3_value_numeric_type </b>
|
** <tr><td><b>sqlite3_value_numeric_type </b>
|
||||||
** <td>→ <td>Best numeric datatype of the value
|
** <td>→ <td>Best numeric datatype of the value
|
||||||
|
** <tr><td><b>sqlite3_value_nochange </b>
|
||||||
|
** <td>→ <td>True if the column is unchanged in an UPDATE
|
||||||
|
** against a virtual table.
|
||||||
** </table></blockquote>
|
** </table></blockquote>
|
||||||
**
|
**
|
||||||
** <b>Details:</b>
|
** <b>Details:</b>
|
||||||
@@ -4847,6 +4849,19 @@ SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),
|
|||||||
** then the conversion is performed. Otherwise no conversion occurs.
|
** then the conversion is performed. Otherwise no conversion occurs.
|
||||||
** The [SQLITE_INTEGER | datatype] after conversion is returned.)^
|
** The [SQLITE_INTEGER | datatype] after conversion is returned.)^
|
||||||
**
|
**
|
||||||
|
** ^Within the [xUpdate] method of a [virtual table], the
|
||||||
|
** sqlite3_value_nochange(X) interface returns true if and only if
|
||||||
|
** the column corresponding to X is unchanged by the UPDATE operation
|
||||||
|
** that the xUpdate method call was invoked to implement and if
|
||||||
|
** and the prior [xColumn] method call that was invoked to extracted
|
||||||
|
** the value for that column returned without setting a result (probably
|
||||||
|
** because it queried [sqlite3_vtab_nochange()] and found that the column
|
||||||
|
** was unchanging). ^Within an [xUpdate] method, any value for which
|
||||||
|
** sqlite3_value_nochange(X) is true will in all other respects appear
|
||||||
|
** to be a NULL value. If sqlite3_value_nochange(X) is invoked anywhere other
|
||||||
|
** than within an [xUpdate] method call for an UPDATE statement, then
|
||||||
|
** the return value is arbitrary and meaningless.
|
||||||
|
**
|
||||||
** Please pay particular attention to the fact that the pointer returned
|
** Please pay particular attention to the fact that the pointer returned
|
||||||
** from [sqlite3_value_blob()], [sqlite3_value_text()], or
|
** from [sqlite3_value_blob()], [sqlite3_value_text()], or
|
||||||
** [sqlite3_value_text16()] can be invalidated by a subsequent call to
|
** [sqlite3_value_text16()] can be invalidated by a subsequent call to
|
||||||
@@ -4869,6 +4884,7 @@ int sqlite3_value_bytes(sqlite3_value*);
|
|||||||
int sqlite3_value_bytes16(sqlite3_value*);
|
int sqlite3_value_bytes16(sqlite3_value*);
|
||||||
int sqlite3_value_type(sqlite3_value*);
|
int sqlite3_value_type(sqlite3_value*);
|
||||||
int sqlite3_value_numeric_type(sqlite3_value*);
|
int sqlite3_value_numeric_type(sqlite3_value*);
|
||||||
|
int sqlite3_value_nochange(sqlite3_value*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Finding The Subtype Of SQL Values
|
** CAPI3REF: Finding The Subtype Of SQL Values
|
||||||
@@ -8297,11 +8313,30 @@ int sqlite3_vtab_config(sqlite3*, int op, ...);
|
|||||||
*/
|
*/
|
||||||
int sqlite3_vtab_on_conflict(sqlite3 *);
|
int sqlite3_vtab_on_conflict(sqlite3 *);
|
||||||
|
|
||||||
|
/*
|
||||||
|
** CAPI3REF: Determine If Virtual Table Column Access Is For UPDATE
|
||||||
|
**
|
||||||
|
** If the sqlite3_vtab_nochange(X) routine is called within the [xColumn]
|
||||||
|
** method of a [virtual table], then it returns true if and only if the
|
||||||
|
** column is being fetched as part of an UPDATE operation during which the
|
||||||
|
** column value will not change. Applications might use this to substitute
|
||||||
|
** a lighter-weight value to return that the corresponding [xUpdate] method
|
||||||
|
** understands as a "no-change" value.
|
||||||
|
**
|
||||||
|
** If the [xColumn] method calls sqlite3_vtab_nochange() and finds that
|
||||||
|
** the column is not changed by the UPDATE statement, they the xColumn
|
||||||
|
** method can optionally return without setting a result, without calling
|
||||||
|
** any of the [sqlite3_result_int|sqlite3_result_xxxxx() interfaces].
|
||||||
|
** In that case, [sqlite3_value_nochange(X)] will return true for the
|
||||||
|
** same column in the [xUpdate] method.
|
||||||
|
*/
|
||||||
|
int sqlite3_vtab_nochange(sqlite3_context*);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Determine The Collation For a Virtual Table Constraint
|
** CAPI3REF: Determine The Collation For a Virtual Table Constraint
|
||||||
**
|
**
|
||||||
** This function may only be called from within a call to the [xBestIndex]
|
** This function may only be called from within a call to the [xBestIndex]
|
||||||
** method of a [virtual table implementation].
|
** method of a [virtual table].
|
||||||
**
|
**
|
||||||
** The first argument must be the sqlite3_index_info object that is the
|
** The first argument must be the sqlite3_index_info object that is the
|
||||||
** first parameter to the xBestIndex() method. The second argument must be
|
** first parameter to the xBestIndex() method. The second argument must be
|
||||||
|
|||||||
@@ -292,6 +292,9 @@ struct sqlite3_api_routines {
|
|||||||
int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));
|
int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));
|
||||||
void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));
|
void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));
|
||||||
void *(*value_pointer)(sqlite3_value*,const char*);
|
void *(*value_pointer)(sqlite3_value*,const char*);
|
||||||
|
int (*vtab_nochange)(sqlite3_context*);
|
||||||
|
int (*value_nochange)(sqlite3_value*);
|
||||||
|
const char *(*vtab_collation)(sqlite3_index_info*,int);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -558,6 +561,10 @@ typedef int (*sqlite3_loadext_entry)(
|
|||||||
#define sqlite3_bind_pointer sqlite3_api->bind_pointer
|
#define sqlite3_bind_pointer sqlite3_api->bind_pointer
|
||||||
#define sqlite3_result_pointer sqlite3_api->result_pointer
|
#define sqlite3_result_pointer sqlite3_api->result_pointer
|
||||||
#define sqlite3_value_pointer sqlite3_api->value_pointer
|
#define sqlite3_value_pointer sqlite3_api->value_pointer
|
||||||
|
/* Version 3.22.0 and later */
|
||||||
|
#define sqlite3_vtab_nochange sqlite3_api->vtab_nochange
|
||||||
|
#define sqlite3_value_nochange sqlite3_api->value_nochange
|
||||||
|
#define sqlite3_vtab_collation sqlite3_api->vtab_collation
|
||||||
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
||||||
|
|
||||||
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
||||||
|
|||||||
@@ -3118,6 +3118,7 @@ struct AuthContext {
|
|||||||
#define OPFLAG_PERMUTE 0x01 /* OP_Compare: use the permutation */
|
#define OPFLAG_PERMUTE 0x01 /* OP_Compare: use the permutation */
|
||||||
#define OPFLAG_SAVEPOSITION 0x02 /* OP_Delete/Insert: save cursor pos */
|
#define OPFLAG_SAVEPOSITION 0x02 /* OP_Delete/Insert: save cursor pos */
|
||||||
#define OPFLAG_AUXDELETE 0x04 /* OP_Delete: index in a DELETE op */
|
#define OPFLAG_AUXDELETE 0x04 /* OP_Delete: index in a DELETE op */
|
||||||
|
#define OPFLAG_NOCHNG_MAGIC 0x6d /* OP_MakeRecord: serialtype 10 is ok */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Each trigger present in the database schema is stored as an instance of
|
* Each trigger present in the database schema is stored as an instance of
|
||||||
|
|||||||
@@ -64,7 +64,9 @@
|
|||||||
# define GETPID getpid
|
# define GETPID getpid
|
||||||
#elif !defined(_WIN32_WCE)
|
#elif !defined(_WIN32_WCE)
|
||||||
# ifndef SQLITE_AMALGAMATION
|
# ifndef SQLITE_AMALGAMATION
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# endif
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# endif
|
# endif
|
||||||
# define GETPID (int)GetCurrentProcessId
|
# define GETPID (int)GetCurrentProcessId
|
||||||
|
|||||||
@@ -6960,6 +6960,9 @@ static int SQLITE_TCLAPI tclLoadStaticExtensionCmd(
|
|||||||
extern int sqlite3_totype_init(sqlite3*,char**,const sqlite3_api_routines*);
|
extern int sqlite3_totype_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||||
extern int sqlite3_wholenumber_init(sqlite3*,char**,const sqlite3_api_routines*);
|
extern int sqlite3_wholenumber_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||||
extern int sqlite3_unionvtab_init(sqlite3*,char**,const sqlite3_api_routines*);
|
extern int sqlite3_unionvtab_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||||
|
#ifdef SQLITE_HAVE_ZLIB
|
||||||
|
extern int sqlite3_zipfile_init(sqlite3*,char**,const sqlite3_api_routines*);
|
||||||
|
#endif
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *zExtName;
|
const char *zExtName;
|
||||||
int (*pInit)(sqlite3*,char**,const sqlite3_api_routines*);
|
int (*pInit)(sqlite3*,char**,const sqlite3_api_routines*);
|
||||||
@@ -6981,6 +6984,9 @@ static int SQLITE_TCLAPI tclLoadStaticExtensionCmd(
|
|||||||
{ "totype", sqlite3_totype_init },
|
{ "totype", sqlite3_totype_init },
|
||||||
{ "unionvtab", sqlite3_unionvtab_init },
|
{ "unionvtab", sqlite3_unionvtab_init },
|
||||||
{ "wholenumber", sqlite3_wholenumber_init },
|
{ "wholenumber", sqlite3_wholenumber_init },
|
||||||
|
#ifdef SQLITE_HAVE_ZLIB
|
||||||
|
{ "zipfile", sqlite3_zipfile_init },
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
sqlite3 *db;
|
sqlite3 *db;
|
||||||
const char *zName;
|
const char *zName;
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(_MSC_VER)
|
#if defined(_WIN32) && defined(_MSC_VER)
|
||||||
|
|
||||||
#include "test_windirent.h"
|
#include "test_windirent.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+40
-4
@@ -13,13 +13,17 @@
|
|||||||
** POSIX functions on Win32 using the MSVCRT.
|
** POSIX functions on Win32 using the MSVCRT.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(_MSC_VER)
|
#if defined(_WIN32) && defined(_MSC_VER) && !defined(SQLITE_WINDIRENT_H)
|
||||||
|
#define SQLITE_WINDIRENT_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** We need several data types from the Windows SDK header.
|
** We need several data types from the Windows SDK header.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -37,6 +41,33 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
** We may need several defines that should have been in "sys/stat.h".
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef S_ISREG
|
||||||
|
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef S_ISDIR
|
||||||
|
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef S_ISLNK
|
||||||
|
#define S_ISLNK(mode) (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
** We may need to provide the "mode_t" type.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODE_T_DEFINED
|
||||||
|
#define MODE_T_DEFINED
|
||||||
|
typedef unsigned short mode_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** We may need to provide the "ino_t" type.
|
** We may need to provide the "ino_t" type.
|
||||||
@@ -75,22 +106,27 @@
|
|||||||
** We need to provide the necessary structures and related types.
|
** We need to provide the necessary structures and related types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef DIRENT_DEFINED
|
||||||
|
#define DIRENT_DEFINED
|
||||||
typedef struct DIRENT DIRENT;
|
typedef struct DIRENT DIRENT;
|
||||||
typedef struct DIR DIR;
|
|
||||||
typedef DIRENT *LPDIRENT;
|
typedef DIRENT *LPDIRENT;
|
||||||
typedef DIR *LPDIR;
|
|
||||||
|
|
||||||
struct DIRENT {
|
struct DIRENT {
|
||||||
ino_t d_ino; /* Sequence number, do not use. */
|
ino_t d_ino; /* Sequence number, do not use. */
|
||||||
unsigned d_attributes; /* Win32 file attributes. */
|
unsigned d_attributes; /* Win32 file attributes. */
|
||||||
char d_name[NAME_MAX + 1]; /* Name within the directory. */
|
char d_name[NAME_MAX + 1]; /* Name within the directory. */
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DIR_DEFINED
|
||||||
|
#define DIR_DEFINED
|
||||||
|
typedef struct DIR DIR;
|
||||||
|
typedef DIR *LPDIR;
|
||||||
struct DIR {
|
struct DIR {
|
||||||
intptr_t d_handle; /* Value returned by "_findfirst". */
|
intptr_t d_handle; /* Value returned by "_findfirst". */
|
||||||
DIRENT d_first; /* DIRENT constructed based on "_findfirst". */
|
DIRENT d_first; /* DIRENT constructed based on "_findfirst". */
|
||||||
DIRENT d_next; /* DIRENT constructed based on "_findnext". */
|
DIRENT d_next; /* DIRENT constructed based on "_findnext". */
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Provide a macro, for use by the implementation, to determine if a
|
** Provide a macro, for use by the implementation, to determine if a
|
||||||
|
|||||||
+1
-1
@@ -526,7 +526,7 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
|
|||||||
}else{
|
}else{
|
||||||
tokenType = TK_SEMI;
|
tokenType = TK_SEMI;
|
||||||
}
|
}
|
||||||
zSql -= n;
|
n = 0;
|
||||||
}
|
}
|
||||||
if( tokenType>=TK_SPACE ){
|
if( tokenType>=TK_SPACE ){
|
||||||
assert( tokenType==TK_SPACE || tokenType==TK_ILLEGAL );
|
assert( tokenType==TK_SPACE || tokenType==TK_ILLEGAL );
|
||||||
|
|||||||
+7
-1
@@ -807,7 +807,7 @@ static void updateVirtualTable(
|
|||||||
int bOnePass; /* True to use onepass strategy */
|
int bOnePass; /* True to use onepass strategy */
|
||||||
int addr; /* Address of OP_OpenEphemeral */
|
int addr; /* Address of OP_OpenEphemeral */
|
||||||
|
|
||||||
/* Allocate nArg registers to martial the arguments to VUpdate. Then
|
/* Allocate nArg registers in which to gather the arguments for VUpdate. Then
|
||||||
** create and open the ephemeral table in which the records created from
|
** create and open the ephemeral table in which the records created from
|
||||||
** these arguments will be temporarily stored. */
|
** these arguments will be temporarily stored. */
|
||||||
assert( v );
|
assert( v );
|
||||||
@@ -828,6 +828,7 @@ static void updateVirtualTable(
|
|||||||
sqlite3ExprCode(pParse, pChanges->a[aXRef[i]].pExpr, regArg+2+i);
|
sqlite3ExprCode(pParse, pChanges->a[aXRef[i]].pExpr, regArg+2+i);
|
||||||
}else{
|
}else{
|
||||||
sqlite3VdbeAddOp3(v, OP_VColumn, iCsr, i, regArg+2+i);
|
sqlite3VdbeAddOp3(v, OP_VColumn, iCsr, i, regArg+2+i);
|
||||||
|
sqlite3VdbeChangeP5(v, 1); /* Enable sqlite3_vtab_nochange() */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( HasRowid(pTab) ){
|
if( HasRowid(pTab) ){
|
||||||
@@ -862,6 +863,11 @@ static void updateVirtualTable(
|
|||||||
/* Create a record from the argument register contents and insert it into
|
/* Create a record from the argument register contents and insert it into
|
||||||
** the ephemeral table. */
|
** the ephemeral table. */
|
||||||
sqlite3VdbeAddOp3(v, OP_MakeRecord, regArg, nArg, regRec);
|
sqlite3VdbeAddOp3(v, OP_MakeRecord, regArg, nArg, regRec);
|
||||||
|
#ifdef SQLITE_DEBUG
|
||||||
|
/* Signal an assert() within OP_MakeRecord that it is allowed to
|
||||||
|
** accept no-change records with serial_type 10 */
|
||||||
|
sqlite3VdbeChangeP5(v, OPFLAG_NOCHNG_MAGIC);
|
||||||
|
#endif
|
||||||
sqlite3VdbeAddOp2(v, OP_NewRowid, ephemTab, regRowid);
|
sqlite3VdbeAddOp2(v, OP_NewRowid, ephemTab, regRowid);
|
||||||
sqlite3VdbeAddOp3(v, OP_Insert, ephemTab, regRec, regRowid);
|
sqlite3VdbeAddOp3(v, OP_Insert, ephemTab, regRec, regRowid);
|
||||||
}
|
}
|
||||||
|
|||||||
+21
@@ -327,6 +327,26 @@ int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
|
|||||||
** This routine only works for values of E between 1 and 341.
|
** This routine only works for values of E between 1 and 341.
|
||||||
*/
|
*/
|
||||||
static LONGDOUBLE_TYPE sqlite3Pow10(int E){
|
static LONGDOUBLE_TYPE sqlite3Pow10(int E){
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
static const LONGDOUBLE_TYPE x[] = {
|
||||||
|
1.0e+001,
|
||||||
|
1.0e+002,
|
||||||
|
1.0e+004,
|
||||||
|
1.0e+008,
|
||||||
|
1.0e+016,
|
||||||
|
1.0e+032,
|
||||||
|
1.0e+064,
|
||||||
|
1.0e+128,
|
||||||
|
1.0e+256
|
||||||
|
};
|
||||||
|
LONGDOUBLE_TYPE r = 1.0;
|
||||||
|
int i;
|
||||||
|
assert( E>=0 && E<=307 );
|
||||||
|
for(i=0; E!=0; i++, E >>=1){
|
||||||
|
if( E & 1 ) r *= x[i];
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
#else
|
||||||
LONGDOUBLE_TYPE x = 10.0;
|
LONGDOUBLE_TYPE x = 10.0;
|
||||||
LONGDOUBLE_TYPE r = 1.0;
|
LONGDOUBLE_TYPE r = 1.0;
|
||||||
while(1){
|
while(1){
|
||||||
@@ -336,6 +356,7 @@ static LONGDOUBLE_TYPE sqlite3Pow10(int E){
|
|||||||
x *= x;
|
x *= x;
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
+71
-35
@@ -464,7 +464,7 @@ static void memTracePrint(Mem *p){
|
|||||||
if( p->flags & MEM_Undefined ){
|
if( p->flags & MEM_Undefined ){
|
||||||
printf(" undefined");
|
printf(" undefined");
|
||||||
}else if( p->flags & MEM_Null ){
|
}else if( p->flags & MEM_Null ){
|
||||||
printf(" NULL");
|
printf(p->flags & MEM_Zero ? " NULL-nochng" : " NULL");
|
||||||
}else if( (p->flags & (MEM_Int|MEM_Str))==(MEM_Int|MEM_Str) ){
|
}else if( (p->flags & (MEM_Int|MEM_Str))==(MEM_Int|MEM_Str) ){
|
||||||
printf(" si:%lld", p->u.i);
|
printf(" si:%lld", p->u.i);
|
||||||
}else if( p->flags & MEM_Int ){
|
}else if( p->flags & MEM_Int ){
|
||||||
@@ -2792,9 +2792,18 @@ case OP_MakeRecord: {
|
|||||||
pRec = pLast;
|
pRec = pLast;
|
||||||
do{
|
do{
|
||||||
assert( memIsValid(pRec) );
|
assert( memIsValid(pRec) );
|
||||||
pRec->uTemp = serial_type = sqlite3VdbeSerialType(pRec, file_format, &len);
|
serial_type = sqlite3VdbeSerialType(pRec, file_format, &len);
|
||||||
if( pRec->flags & MEM_Zero ){
|
if( pRec->flags & MEM_Zero ){
|
||||||
if( nData ){
|
if( serial_type==0 ){
|
||||||
|
/* Values with MEM_Null and MEM_Zero are created by xColumn virtual
|
||||||
|
** table methods that never invoke sqlite3_result_xxxxx() while
|
||||||
|
** computing an unchanging column value in an UPDATE statement.
|
||||||
|
** Give such values a special internal-use-only serial-type of 10
|
||||||
|
** so that they can be passed through to xUpdate and have
|
||||||
|
** a true sqlite3_value_nochange(). */
|
||||||
|
assert( pOp->p5==OPFLAG_NOCHNG_MAGIC || CORRUPT_DB );
|
||||||
|
serial_type = 10;
|
||||||
|
}else if( nData ){
|
||||||
if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;
|
if( sqlite3VdbeMemExpandBlob(pRec) ) goto no_mem;
|
||||||
}else{
|
}else{
|
||||||
nZero += pRec->u.nZero;
|
nZero += pRec->u.nZero;
|
||||||
@@ -2805,6 +2814,7 @@ case OP_MakeRecord: {
|
|||||||
testcase( serial_type==127 );
|
testcase( serial_type==127 );
|
||||||
testcase( serial_type==128 );
|
testcase( serial_type==128 );
|
||||||
nHdr += serial_type<=127 ? 1 : sqlite3VarintLen(serial_type);
|
nHdr += serial_type<=127 ? 1 : sqlite3VarintLen(serial_type);
|
||||||
|
pRec->uTemp = serial_type;
|
||||||
if( pRec==pData0 ) break;
|
if( pRec==pData0 ) break;
|
||||||
pRec--;
|
pRec--;
|
||||||
}while(1);
|
}while(1);
|
||||||
@@ -4415,10 +4425,8 @@ case OP_InsertInt: {
|
|||||||
int seekResult; /* Result of prior seek or 0 if no USESEEKRESULT flag */
|
int seekResult; /* Result of prior seek or 0 if no USESEEKRESULT flag */
|
||||||
const char *zDb; /* database name - used by the update hook */
|
const char *zDb; /* database name - used by the update hook */
|
||||||
Table *pTab; /* Table structure - used by update and pre-update hooks */
|
Table *pTab; /* Table structure - used by update and pre-update hooks */
|
||||||
int op; /* Opcode for update hook: SQLITE_UPDATE or SQLITE_INSERT */
|
|
||||||
BtreePayload x; /* Payload to be inserted */
|
BtreePayload x; /* Payload to be inserted */
|
||||||
|
|
||||||
op = 0;
|
|
||||||
pData = &aMem[pOp->p2];
|
pData = &aMem[pOp->p2];
|
||||||
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
|
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
|
||||||
assert( memIsValid(pData) );
|
assert( memIsValid(pData) );
|
||||||
@@ -4446,19 +4454,21 @@ case OP_InsertInt: {
|
|||||||
zDb = db->aDb[pC->iDb].zDbSName;
|
zDb = db->aDb[pC->iDb].zDbSName;
|
||||||
pTab = pOp->p4.pTab;
|
pTab = pOp->p4.pTab;
|
||||||
assert( (pOp->p5 & OPFLAG_ISNOOP) || HasRowid(pTab) );
|
assert( (pOp->p5 & OPFLAG_ISNOOP) || HasRowid(pTab) );
|
||||||
op = ((pOp->p5 & OPFLAG_ISUPDATE) ? SQLITE_UPDATE : SQLITE_INSERT);
|
|
||||||
}else{
|
}else{
|
||||||
pTab = 0; /* Not needed. Silence a compiler warning. */
|
pTab = 0;
|
||||||
zDb = 0; /* Not needed. Silence a compiler warning. */
|
zDb = 0; /* Not needed. Silence a compiler warning. */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||||
/* Invoke the pre-update hook, if any */
|
/* Invoke the pre-update hook, if any */
|
||||||
if( db->xPreUpdateCallback
|
if( pTab ){
|
||||||
&& pOp->p4type==P4_TABLE
|
if( db->xPreUpdateCallback && !(pOp->p5 & OPFLAG_ISUPDATE) ){
|
||||||
&& !(pOp->p5 & OPFLAG_ISUPDATE)
|
sqlite3VdbePreUpdateHook(p, pC, SQLITE_INSERT, zDb, pTab, x.nKey,pOp->p2);
|
||||||
){
|
}
|
||||||
sqlite3VdbePreUpdateHook(p, pC, SQLITE_INSERT, zDb, pTab, x.nKey, pOp->p2);
|
if( db->xUpdateCallback==0 || pTab->aCol==0 ){
|
||||||
|
/* Prevent post-update hook from running in cases when it should not */
|
||||||
|
pTab = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if( pOp->p5 & OPFLAG_ISNOOP ) break;
|
if( pOp->p5 & OPFLAG_ISNOOP ) break;
|
||||||
#endif
|
#endif
|
||||||
@@ -4483,8 +4493,12 @@ case OP_InsertInt: {
|
|||||||
|
|
||||||
/* Invoke the update-hook if required. */
|
/* Invoke the update-hook if required. */
|
||||||
if( rc ) goto abort_due_to_error;
|
if( rc ) goto abort_due_to_error;
|
||||||
if( db->xUpdateCallback && op ){
|
if( pTab ){
|
||||||
db->xUpdateCallback(db->pUpdateArg, op, zDb, pTab->zName, x.nKey);
|
assert( db->xUpdateCallback!=0 );
|
||||||
|
assert( pTab->aCol!=0 );
|
||||||
|
db->xUpdateCallback(db->pUpdateArg,
|
||||||
|
(pOp->p5 & OPFLAG_ISUPDATE) ? SQLITE_UPDATE : SQLITE_INSERT,
|
||||||
|
zDb, pTab->zName, x.nKey);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -6190,12 +6204,17 @@ case OP_AggStep0: {
|
|||||||
assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) );
|
assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) );
|
||||||
assert( n==0 || (pOp->p2>0 && pOp->p2+n<=(p->nMem+1 - p->nCursor)+1) );
|
assert( n==0 || (pOp->p2>0 && pOp->p2+n<=(p->nMem+1 - p->nCursor)+1) );
|
||||||
assert( pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+n );
|
assert( pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+n );
|
||||||
pCtx = sqlite3DbMallocRawNN(db, sizeof(*pCtx) + (n-1)*sizeof(sqlite3_value*));
|
pCtx = sqlite3DbMallocRawNN(db, n*sizeof(sqlite3_value*) +
|
||||||
|
(sizeof(pCtx[0]) + sizeof(Mem) - sizeof(sqlite3_value*)));
|
||||||
if( pCtx==0 ) goto no_mem;
|
if( pCtx==0 ) goto no_mem;
|
||||||
pCtx->pMem = 0;
|
pCtx->pMem = 0;
|
||||||
|
pCtx->pOut = (Mem*)&(pCtx->argv[n]);
|
||||||
|
sqlite3VdbeMemInit(pCtx->pOut, db, MEM_Null);
|
||||||
pCtx->pFunc = pOp->p4.pFunc;
|
pCtx->pFunc = pOp->p4.pFunc;
|
||||||
pCtx->iOp = (int)(pOp - aOp);
|
pCtx->iOp = (int)(pOp - aOp);
|
||||||
pCtx->pVdbe = p;
|
pCtx->pVdbe = p;
|
||||||
|
pCtx->skipFlag = 0;
|
||||||
|
pCtx->isError = 0;
|
||||||
pCtx->argc = n;
|
pCtx->argc = n;
|
||||||
pOp->p4type = P4_FUNCCTX;
|
pOp->p4type = P4_FUNCCTX;
|
||||||
pOp->p4.pCtx = pCtx;
|
pOp->p4.pCtx = pCtx;
|
||||||
@@ -6206,7 +6225,6 @@ case OP_AggStep: {
|
|||||||
int i;
|
int i;
|
||||||
sqlite3_context *pCtx;
|
sqlite3_context *pCtx;
|
||||||
Mem *pMem;
|
Mem *pMem;
|
||||||
Mem t;
|
|
||||||
|
|
||||||
assert( pOp->p4type==P4_FUNCCTX );
|
assert( pOp->p4type==P4_FUNCCTX );
|
||||||
pCtx = pOp->p4.pCtx;
|
pCtx = pOp->p4.pCtx;
|
||||||
@@ -6229,26 +6247,28 @@ case OP_AggStep: {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
pMem->n++;
|
pMem->n++;
|
||||||
sqlite3VdbeMemInit(&t, db, MEM_Null);
|
assert( pCtx->pOut->flags==MEM_Null );
|
||||||
pCtx->pOut = &t;
|
assert( pCtx->isError==0 );
|
||||||
pCtx->fErrorOrAux = 0;
|
assert( pCtx->skipFlag==0 );
|
||||||
pCtx->skipFlag = 0;
|
|
||||||
(pCtx->pFunc->xSFunc)(pCtx,pCtx->argc,pCtx->argv); /* IMP: R-24505-23230 */
|
(pCtx->pFunc->xSFunc)(pCtx,pCtx->argc,pCtx->argv); /* IMP: R-24505-23230 */
|
||||||
if( pCtx->fErrorOrAux ){
|
|
||||||
if( pCtx->isError ){
|
if( pCtx->isError ){
|
||||||
sqlite3VdbeError(p, "%s", sqlite3_value_text(&t));
|
if( pCtx->isError>0 ){
|
||||||
|
sqlite3VdbeError(p, "%s", sqlite3_value_text(pCtx->pOut));
|
||||||
rc = pCtx->isError;
|
rc = pCtx->isError;
|
||||||
}
|
}
|
||||||
sqlite3VdbeMemRelease(&t);
|
|
||||||
if( rc ) goto abort_due_to_error;
|
|
||||||
}else{
|
|
||||||
assert( t.flags==MEM_Null );
|
|
||||||
}
|
|
||||||
if( pCtx->skipFlag ){
|
if( pCtx->skipFlag ){
|
||||||
assert( pOp[-1].opcode==OP_CollSeq );
|
assert( pOp[-1].opcode==OP_CollSeq );
|
||||||
i = pOp[-1].p1;
|
i = pOp[-1].p1;
|
||||||
if( i ) sqlite3VdbeMemSetInt64(&aMem[i], 1);
|
if( i ) sqlite3VdbeMemSetInt64(&aMem[i], 1);
|
||||||
|
pCtx->skipFlag = 0;
|
||||||
}
|
}
|
||||||
|
sqlite3VdbeMemRelease(pCtx->pOut);
|
||||||
|
pCtx->pOut->flags = MEM_Null;
|
||||||
|
pCtx->isError = 0;
|
||||||
|
if( rc ) goto abort_due_to_error;
|
||||||
|
}
|
||||||
|
assert( pCtx->pOut->flags==MEM_Null );
|
||||||
|
assert( pCtx->skipFlag==0 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6693,12 +6713,18 @@ case OP_VFilter: { /* jump */
|
|||||||
#endif /* SQLITE_OMIT_VIRTUALTABLE */
|
#endif /* SQLITE_OMIT_VIRTUALTABLE */
|
||||||
|
|
||||||
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
#ifndef SQLITE_OMIT_VIRTUALTABLE
|
||||||
/* Opcode: VColumn P1 P2 P3 * *
|
/* Opcode: VColumn P1 P2 P3 * P5
|
||||||
** Synopsis: r[P3]=vcolumn(P2)
|
** Synopsis: r[P3]=vcolumn(P2)
|
||||||
**
|
**
|
||||||
** Store the value of the P2-th column of
|
** Store in register P3 the value of the P2-th column of
|
||||||
** the row of the virtual-table that the
|
** the current row of the virtual-table of cursor P1.
|
||||||
** P1 cursor is pointing to into register P3.
|
**
|
||||||
|
** If the VColumn opcode is being used to fetch the value of
|
||||||
|
** an unchanging column during an UPDATE operation, then the P5
|
||||||
|
** value is 1. Otherwise, P5 is 0. The P5 value is returned
|
||||||
|
** by sqlite3_vtab_nochange() routine can can be used
|
||||||
|
** by virtual table implementations to return special "no-change"
|
||||||
|
** marks which can be more efficient, depending on the virtual table.
|
||||||
*/
|
*/
|
||||||
case OP_VColumn: {
|
case OP_VColumn: {
|
||||||
sqlite3_vtab *pVtab;
|
sqlite3_vtab *pVtab;
|
||||||
@@ -6720,10 +6746,16 @@ case OP_VColumn: {
|
|||||||
assert( pModule->xColumn );
|
assert( pModule->xColumn );
|
||||||
memset(&sContext, 0, sizeof(sContext));
|
memset(&sContext, 0, sizeof(sContext));
|
||||||
sContext.pOut = pDest;
|
sContext.pOut = pDest;
|
||||||
|
if( pOp->p5 ){
|
||||||
|
sqlite3VdbeMemSetNull(pDest);
|
||||||
|
pDest->flags = MEM_Null|MEM_Zero;
|
||||||
|
pDest->u.nZero = 0;
|
||||||
|
}else{
|
||||||
MemSetTypeFlag(pDest, MEM_Null);
|
MemSetTypeFlag(pDest, MEM_Null);
|
||||||
|
}
|
||||||
rc = pModule->xColumn(pCur->uc.pVCur, &sContext, pOp->p2);
|
rc = pModule->xColumn(pCur->uc.pVCur, &sContext, pOp->p2);
|
||||||
sqlite3VtabImportErrmsg(p, pVtab);
|
sqlite3VtabImportErrmsg(p, pVtab);
|
||||||
if( sContext.isError ){
|
if( sContext.isError>0 ){
|
||||||
rc = sContext.isError;
|
rc = sContext.isError;
|
||||||
}
|
}
|
||||||
sqlite3VdbeChangeEncoding(pDest, encoding);
|
sqlite3VdbeChangeEncoding(pDest, encoding);
|
||||||
@@ -6988,6 +7020,7 @@ case OP_Function0: {
|
|||||||
pCtx->pFunc = pOp->p4.pFunc;
|
pCtx->pFunc = pOp->p4.pFunc;
|
||||||
pCtx->iOp = (int)(pOp - aOp);
|
pCtx->iOp = (int)(pOp - aOp);
|
||||||
pCtx->pVdbe = p;
|
pCtx->pVdbe = p;
|
||||||
|
pCtx->isError = 0;
|
||||||
pCtx->argc = n;
|
pCtx->argc = n;
|
||||||
pOp->p4type = P4_FUNCCTX;
|
pOp->p4type = P4_FUNCCTX;
|
||||||
pOp->p4.pCtx = pCtx;
|
pOp->p4.pCtx = pCtx;
|
||||||
@@ -7022,16 +7055,17 @@ case OP_Function: {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
MemSetTypeFlag(pOut, MEM_Null);
|
MemSetTypeFlag(pOut, MEM_Null);
|
||||||
pCtx->fErrorOrAux = 0;
|
assert( pCtx->isError==0 );
|
||||||
(*pCtx->pFunc->xSFunc)(pCtx, pCtx->argc, pCtx->argv);/* IMP: R-24505-23230 */
|
(*pCtx->pFunc->xSFunc)(pCtx, pCtx->argc, pCtx->argv);/* IMP: R-24505-23230 */
|
||||||
|
|
||||||
/* If the function returned an error, throw an exception */
|
/* If the function returned an error, throw an exception */
|
||||||
if( pCtx->fErrorOrAux ){
|
|
||||||
if( pCtx->isError ){
|
if( pCtx->isError ){
|
||||||
|
if( pCtx->isError>0 ){
|
||||||
sqlite3VdbeError(p, "%s", sqlite3_value_text(pOut));
|
sqlite3VdbeError(p, "%s", sqlite3_value_text(pOut));
|
||||||
rc = pCtx->isError;
|
rc = pCtx->isError;
|
||||||
}
|
}
|
||||||
sqlite3VdbeDeleteAuxData(db, &p->pAuxData, pCtx->iOp, pOp->p1);
|
sqlite3VdbeDeleteAuxData(db, &p->pAuxData, pCtx->iOp, pOp->p1);
|
||||||
|
pCtx->isError = 0;
|
||||||
if( rc ) goto abort_due_to_error;
|
if( rc ) goto abort_due_to_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7073,8 +7107,10 @@ case OP_Function: {
|
|||||||
*/
|
*/
|
||||||
case OP_Trace:
|
case OP_Trace:
|
||||||
case OP_Init: { /* jump */
|
case OP_Init: { /* jump */
|
||||||
char *zTrace;
|
|
||||||
int i;
|
int i;
|
||||||
|
#ifndef SQLITE_OMIT_TRACE
|
||||||
|
char *zTrace;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If the P4 argument is not NULL, then it must be an SQL comment string.
|
/* If the P4 argument is not NULL, then it must be an SQL comment string.
|
||||||
** The "--" string is broken up to prevent false-positives with srcck1.c.
|
** The "--" string is broken up to prevent false-positives with srcck1.c.
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ typedef struct VdbeOpList VdbeOpList;
|
|||||||
#define P4_INT64 (-14) /* P4 is a 64-bit signed integer */
|
#define P4_INT64 (-14) /* P4 is a 64-bit signed integer */
|
||||||
#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
|
#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
|
||||||
#define P4_FUNCCTX (-16) /* P4 is a pointer to an sqlite3_context object */
|
#define P4_FUNCCTX (-16) /* P4 is a pointer to an sqlite3_context object */
|
||||||
|
#define P4_DYNBLOB (-17) /* Pointer to memory from sqliteMalloc() */
|
||||||
|
|
||||||
/* Error message codes for OP_Halt */
|
/* Error message codes for OP_Halt */
|
||||||
#define P5_ConstraintNotNull 1
|
#define P5_ConstraintNotNull 1
|
||||||
|
|||||||
@@ -317,7 +317,6 @@ struct sqlite3_context {
|
|||||||
int iOp; /* Instruction number of OP_Function */
|
int iOp; /* Instruction number of OP_Function */
|
||||||
int isError; /* Error code returned by the function. */
|
int isError; /* Error code returned by the function. */
|
||||||
u8 skipFlag; /* Skip accumulator loading if true */
|
u8 skipFlag; /* Skip accumulator loading if true */
|
||||||
u8 fErrorOrAux; /* isError!=0 or pVdbe->pAuxData modified */
|
|
||||||
u8 argc; /* Number of arguments */
|
u8 argc; /* Number of arguments */
|
||||||
sqlite3_value *argv[1]; /* Argument set */
|
sqlite3_value *argv[1]; /* Argument set */
|
||||||
};
|
};
|
||||||
|
|||||||
+26
-10
@@ -268,6 +268,11 @@ int sqlite3_value_type(sqlite3_value* pVal){
|
|||||||
return aType[pVal->flags&MEM_AffMask];
|
return aType[pVal->flags&MEM_AffMask];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return true if a parameter to xUpdate represents an unchanged column */
|
||||||
|
int sqlite3_value_nochange(sqlite3_value *pVal){
|
||||||
|
return (pVal->flags&(MEM_Null|MEM_Zero))==(MEM_Null|MEM_Zero);
|
||||||
|
}
|
||||||
|
|
||||||
/* Make a copy of an sqlite3_value object
|
/* Make a copy of an sqlite3_value object
|
||||||
*/
|
*/
|
||||||
sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){
|
sqlite3_value *sqlite3_value_dup(const sqlite3_value *pOrig){
|
||||||
@@ -367,14 +372,12 @@ void sqlite3_result_double(sqlite3_context *pCtx, double rVal){
|
|||||||
void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
|
void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
|
||||||
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
||||||
pCtx->isError = SQLITE_ERROR;
|
pCtx->isError = SQLITE_ERROR;
|
||||||
pCtx->fErrorOrAux = 1;
|
|
||||||
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
|
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
|
||||||
}
|
}
|
||||||
#ifndef SQLITE_OMIT_UTF16
|
#ifndef SQLITE_OMIT_UTF16
|
||||||
void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
|
void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
|
||||||
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
||||||
pCtx->isError = SQLITE_ERROR;
|
pCtx->isError = SQLITE_ERROR;
|
||||||
pCtx->fErrorOrAux = 1;
|
|
||||||
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
|
sqlite3VdbeMemSetStr(pCtx->pOut, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -480,8 +483,7 @@ int sqlite3_result_zeroblob64(sqlite3_context *pCtx, u64 n){
|
|||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
|
void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
|
||||||
pCtx->isError = errCode;
|
pCtx->isError = errCode ? errCode : -1;
|
||||||
pCtx->fErrorOrAux = 1;
|
|
||||||
#ifdef SQLITE_DEBUG
|
#ifdef SQLITE_DEBUG
|
||||||
if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
|
if( pCtx->pVdbe ) pCtx->pVdbe->rcApp = errCode;
|
||||||
#endif
|
#endif
|
||||||
@@ -495,7 +497,6 @@ void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
|
|||||||
void sqlite3_result_error_toobig(sqlite3_context *pCtx){
|
void sqlite3_result_error_toobig(sqlite3_context *pCtx){
|
||||||
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
||||||
pCtx->isError = SQLITE_TOOBIG;
|
pCtx->isError = SQLITE_TOOBIG;
|
||||||
pCtx->fErrorOrAux = 1;
|
|
||||||
sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
|
sqlite3VdbeMemSetStr(pCtx->pOut, "string or blob too big", -1,
|
||||||
SQLITE_UTF8, SQLITE_STATIC);
|
SQLITE_UTF8, SQLITE_STATIC);
|
||||||
}
|
}
|
||||||
@@ -505,7 +506,6 @@ void sqlite3_result_error_nomem(sqlite3_context *pCtx){
|
|||||||
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
assert( sqlite3_mutex_held(pCtx->pOut->db->mutex) );
|
||||||
sqlite3VdbeMemSetNull(pCtx->pOut);
|
sqlite3VdbeMemSetNull(pCtx->pOut);
|
||||||
pCtx->isError = SQLITE_NOMEM_BKPT;
|
pCtx->isError = SQLITE_NOMEM_BKPT;
|
||||||
pCtx->fErrorOrAux = 1;
|
|
||||||
sqlite3OomFault(pCtx->pOut->db);
|
sqlite3OomFault(pCtx->pOut->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -745,6 +745,25 @@ sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
|
|||||||
return p->pOut->db;
|
return p->pOut->db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
** If this routine is invoked from within an xColumn method of a virtual
|
||||||
|
** table, then it returns true if and only if the the call is during an
|
||||||
|
** UPDATE operation and the value of the column will not be modified
|
||||||
|
** by the UPDATE.
|
||||||
|
**
|
||||||
|
** If this routine is called from any context other than within the
|
||||||
|
** xColumn method of a virtual table, then the return value is meaningless
|
||||||
|
** and arbitrary.
|
||||||
|
**
|
||||||
|
** Virtual table implements might use this routine to optimize their
|
||||||
|
** performance by substituting a NULL result, or some other light-weight
|
||||||
|
** value, as a signal to the xUpdate routine that the column is unchanged.
|
||||||
|
*/
|
||||||
|
int sqlite3_vtab_nochange(sqlite3_context *p){
|
||||||
|
assert( p );
|
||||||
|
return sqlite3_value_nochange(p->pOut);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Return the current time for a statement. If the current time
|
** Return the current time for a statement. If the current time
|
||||||
** is requested more than once within the same run of a single prepared
|
** is requested more than once within the same run of a single prepared
|
||||||
@@ -893,10 +912,7 @@ void sqlite3_set_auxdata(
|
|||||||
pAuxData->iAuxArg = iArg;
|
pAuxData->iAuxArg = iArg;
|
||||||
pAuxData->pNextAux = pVdbe->pAuxData;
|
pAuxData->pNextAux = pVdbe->pAuxData;
|
||||||
pVdbe->pAuxData = pAuxData;
|
pVdbe->pAuxData = pAuxData;
|
||||||
if( pCtx->fErrorOrAux==0 ){
|
if( pCtx->isError==0 ) pCtx->isError = -1;
|
||||||
pCtx->isError = 0;
|
|
||||||
pCtx->fErrorOrAux = 1;
|
|
||||||
}
|
|
||||||
}else if( pAuxData->xDeleteAux ){
|
}else if( pAuxData->xDeleteAux ){
|
||||||
pAuxData->xDeleteAux(pAuxData->pAux);
|
pAuxData->xDeleteAux(pAuxData->pAux);
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-1
@@ -866,6 +866,7 @@ static void freeP4(sqlite3 *db, int p4type, void *p4){
|
|||||||
case P4_REAL:
|
case P4_REAL:
|
||||||
case P4_INT64:
|
case P4_INT64:
|
||||||
case P4_DYNAMIC:
|
case P4_DYNAMIC:
|
||||||
|
case P4_DYNBLOB:
|
||||||
case P4_INTARRAY: {
|
case P4_INTARRAY: {
|
||||||
sqlite3DbFree(db, p4);
|
sqlite3DbFree(db, p4);
|
||||||
break;
|
break;
|
||||||
@@ -1407,6 +1408,7 @@ static char *displayP4(Op *pOp, char *zTemp, int nTemp){
|
|||||||
sqlite3XPrintf(&x, "program");
|
sqlite3XPrintf(&x, "program");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case P4_DYNBLOB:
|
||||||
case P4_ADVANCE: {
|
case P4_ADVANCE: {
|
||||||
zTemp[0] = 0;
|
zTemp[0] = 0;
|
||||||
break;
|
break;
|
||||||
@@ -3452,7 +3454,13 @@ u32 sqlite3VdbeSerialGet(
|
|||||||
Mem *pMem /* Memory cell to write value into */
|
Mem *pMem /* Memory cell to write value into */
|
||||||
){
|
){
|
||||||
switch( serial_type ){
|
switch( serial_type ){
|
||||||
case 10: /* Reserved for future use */
|
case 10: { /* Internal use only: NULL with virtual table
|
||||||
|
** UPDATE no-change flag set */
|
||||||
|
pMem->flags = MEM_Null|MEM_Zero;
|
||||||
|
pMem->n = 0;
|
||||||
|
pMem->u.nZero = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 11: /* Reserved for future use */
|
case 11: /* Reserved for future use */
|
||||||
case 0: { /* Null */
|
case 0: { /* Null */
|
||||||
/* EVIDENCE-OF: R-24078-09375 Value is a NULL. */
|
/* EVIDENCE-OF: R-24078-09375 Value is a NULL. */
|
||||||
|
|||||||
+14
-2
@@ -43,7 +43,7 @@ int sqlite3VdbeCheckMemInvariants(Mem *p){
|
|||||||
if( p->flags & MEM_Null ){
|
if( p->flags & MEM_Null ){
|
||||||
/* Cannot be both MEM_Null and some other type */
|
/* Cannot be both MEM_Null and some other type */
|
||||||
assert( (p->flags & (MEM_Int|MEM_Real|MEM_Str|MEM_Blob
|
assert( (p->flags & (MEM_Int|MEM_Real|MEM_Str|MEM_Blob
|
||||||
|MEM_RowSet|MEM_Frame|MEM_Agg|MEM_Zero))==0 );
|
|MEM_RowSet|MEM_Frame|MEM_Agg))==0 );
|
||||||
|
|
||||||
/* If MEM_Null is set, then either the value is a pure NULL (the usual
|
/* If MEM_Null is set, then either the value is a pure NULL (the usual
|
||||||
** case) or it is a pointer set using sqlite3_bind_pointer() or
|
** case) or it is a pointer set using sqlite3_bind_pointer() or
|
||||||
@@ -582,6 +582,18 @@ int sqlite3VdbeMemRealify(Mem *pMem){
|
|||||||
return SQLITE_OK;
|
return SQLITE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Compare a floating point value to an integer. Return true if the two
|
||||||
|
** values are the same within the precision of the floating point value.
|
||||||
|
**
|
||||||
|
** For some versions of GCC on 32-bit machines, if you do the more obvious
|
||||||
|
** comparison of "r1==(double)i" you sometimes get an answer of false even
|
||||||
|
** though the r1 and (double)i values are bit-for-bit the same.
|
||||||
|
*/
|
||||||
|
static int sqlite3RealSameAsInt(double r1, sqlite3_int64 i){
|
||||||
|
double r2 = (double)i;
|
||||||
|
return memcmp(&r1, &r2, sizeof(r1))==0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Convert pMem so that it has types MEM_Real or MEM_Int or both.
|
** Convert pMem so that it has types MEM_Real or MEM_Int or both.
|
||||||
** Invalidate any prior representations.
|
** Invalidate any prior representations.
|
||||||
@@ -601,7 +613,7 @@ int sqlite3VdbeMemNumerify(Mem *pMem){
|
|||||||
}else{
|
}else{
|
||||||
i64 i = pMem->u.i;
|
i64 i = pMem->u.i;
|
||||||
sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);
|
sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);
|
||||||
if( rc==1 && pMem->u.r==(double)i ){
|
if( rc==1 && sqlite3RealSameAsInt(pMem->u.r, i) ){
|
||||||
pMem->u.i = i;
|
pMem->u.i = i;
|
||||||
MemSetTypeFlag(pMem, MEM_Int);
|
MemSetTypeFlag(pMem, MEM_Int);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
+21
-4
@@ -4801,15 +4801,32 @@ WhereInfo *sqlite3WhereBegin(
|
|||||||
|
|
||||||
/* If the caller is an UPDATE or DELETE statement that is requesting
|
/* If the caller is an UPDATE or DELETE statement that is requesting
|
||||||
** to use a one-pass algorithm, determine if this is appropriate.
|
** to use a one-pass algorithm, determine if this is appropriate.
|
||||||
|
**
|
||||||
|
** A one-pass approach can be used if the caller has requested one
|
||||||
|
** and either (a) the scan visits at most one row or (b) each
|
||||||
|
** of the following are true:
|
||||||
|
**
|
||||||
|
** * the caller has indicated that a one-pass approach can be used
|
||||||
|
** with multiple rows (by setting WHERE_ONEPASS_MULTIROW), and
|
||||||
|
** * the table is not a virtual table, and
|
||||||
|
** * either the scan does not use the OR optimization or the caller
|
||||||
|
** is a DELETE operation (WHERE_DUPLICATES_OK is only specified
|
||||||
|
** for DELETE).
|
||||||
|
**
|
||||||
|
** The last qualification is because an UPDATE statement uses
|
||||||
|
** WhereInfo.aiCurOnePass[1] to determine whether or not it really can
|
||||||
|
** use a one-pass approach, and this is not set accurately for scans
|
||||||
|
** that use the OR optimization.
|
||||||
*/
|
*/
|
||||||
assert( (wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1 );
|
assert( (wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1 );
|
||||||
if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 ){
|
if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 ){
|
||||||
int wsFlags = pWInfo->a[0].pWLoop->wsFlags;
|
int wsFlags = pWInfo->a[0].pWLoop->wsFlags;
|
||||||
int bOnerow = (wsFlags & WHERE_ONEROW)!=0;
|
int bOnerow = (wsFlags & WHERE_ONEROW)!=0;
|
||||||
if( bOnerow
|
if( bOnerow || (
|
||||||
|| ((wctrlFlags & WHERE_ONEPASS_MULTIROW)!=0
|
0!=(wctrlFlags & WHERE_ONEPASS_MULTIROW)
|
||||||
&& 0==(wsFlags & WHERE_VIRTUALTABLE))
|
&& 0==(wsFlags & WHERE_VIRTUALTABLE)
|
||||||
){
|
&& (0==(wsFlags & WHERE_MULTI_OR) || (wctrlFlags & WHERE_DUPLICATES_OK))
|
||||||
|
)){
|
||||||
pWInfo->eOnePass = bOnerow ? ONEPASS_SINGLE : ONEPASS_MULTI;
|
pWInfo->eOnePass = bOnerow ? ONEPASS_SINGLE : ONEPASS_MULTI;
|
||||||
if( HasRowid(pTabList->a[0].pTab) && (wsFlags & WHERE_IDX_ONLY) ){
|
if( HasRowid(pTabList->a[0].pTab) && (wsFlags & WHERE_IDX_ONLY) ){
|
||||||
if( wctrlFlags & WHERE_ONEPASS_MULTIROW ){
|
if( wctrlFlags & WHERE_ONEPASS_MULTIROW ){
|
||||||
|
|||||||
@@ -2170,6 +2170,12 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
|||||||
WO_EQ|WO_IN|WO_IS, 0);
|
WO_EQ|WO_IN|WO_IS, 0);
|
||||||
if( pAlt==0 ) continue;
|
if( pAlt==0 ) continue;
|
||||||
if( pAlt->wtFlags & (TERM_CODED) ) continue;
|
if( pAlt->wtFlags & (TERM_CODED) ) continue;
|
||||||
|
if( (pAlt->eOperator & WO_IN)
|
||||||
|
&& (pAlt->pExpr->flags & EP_xIsSelect)
|
||||||
|
&& (pAlt->pExpr->x.pSelect->pEList->nExpr>1)
|
||||||
|
){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
testcase( pAlt->eOperator & WO_EQ );
|
testcase( pAlt->eOperator & WO_EQ );
|
||||||
testcase( pAlt->eOperator & WO_IS );
|
testcase( pAlt->eOperator & WO_IS );
|
||||||
testcase( pAlt->eOperator & WO_IN );
|
testcase( pAlt->eOperator & WO_IN );
|
||||||
|
|||||||
+1
-1
@@ -163,7 +163,7 @@ do_test capi2-3.2 {
|
|||||||
sqlite3_prepare $DB {select bogus from } -1 TAIL
|
sqlite3_prepare $DB {select bogus from } -1 TAIL
|
||||||
} msg]
|
} msg]
|
||||||
lappend rc $msg $TAIL
|
lappend rc $msg $TAIL
|
||||||
} {1 {(1) near " ": syntax error} {}}
|
} {1 {(1) incomplete input} {}}
|
||||||
do_test capi2-3.3 {
|
do_test capi2-3.3 {
|
||||||
set rc [catch {
|
set rc [catch {
|
||||||
sqlite3_prepare $DB {;;;;select bogus from sqlite_master} -1 TAIL
|
sqlite3_prepare $DB {;;;;select bogus from sqlite_master} -1 TAIL
|
||||||
|
|||||||
@@ -649,6 +649,18 @@ do_test capi3-5.33 {
|
|||||||
sqlite3_finalize $STMT
|
sqlite3_finalize $STMT
|
||||||
} SQLITE_OK
|
} SQLITE_OK
|
||||||
|
|
||||||
|
# 2018-01-09: If a column is the last token if a string, the column name
|
||||||
|
# was not being set correctly, due to changes in check-in
|
||||||
|
# https://sqlite.org/src/info/0fdf97efe5df7455
|
||||||
|
#
|
||||||
|
# This problem was detected by the community during beta-testing.
|
||||||
|
#
|
||||||
|
do_test capi3-5.34 {
|
||||||
|
set STMT [sqlite3_prepare $DB {SELECT :a, :b} -1 TAIL]
|
||||||
|
sqlite3_column_count $STMT
|
||||||
|
} 2
|
||||||
|
check_header $STMT capi-5.35 {:a :b} {{} {}}
|
||||||
|
sqlite3_finalize $STMT
|
||||||
|
|
||||||
set ::ENC [execsql {pragma encoding}]
|
set ::ENC [execsql {pragma encoding}]
|
||||||
db close
|
db close
|
||||||
|
|||||||
+4
-2
@@ -393,10 +393,12 @@ do_execsql_test colname-9.300 {
|
|||||||
do_test colname-9.310 {
|
do_test colname-9.310 {
|
||||||
execsql2 {SELECT BBb FROM (SELECT aaa AS Bbb FROM t1)}
|
execsql2 {SELECT BBb FROM (SELECT aaa AS Bbb FROM t1)}
|
||||||
} {Bbb 123}
|
} {Bbb 123}
|
||||||
do_execsql_test colname-9.320 {
|
ifcapable vtab {
|
||||||
|
do_execsql_test colname-9.320 {
|
||||||
CREATE TABLE t2 AS SELECT BBb FROM (SELECT aaa AS Bbb FROM t1);
|
CREATE TABLE t2 AS SELECT BBb FROM (SELECT aaa AS Bbb FROM t1);
|
||||||
SELECT name FROM pragma_table_info('t2');
|
SELECT name FROM pragma_table_info('t2');
|
||||||
} {Bbb}
|
} {Bbb}
|
||||||
|
}
|
||||||
|
|
||||||
# Issue detected by OSSFuzz on 2017-12-24 (Christmas Eve)
|
# Issue detected by OSSFuzz on 2017-12-24 (Christmas Eve)
|
||||||
# caused by check-in https://sqlite.org/src/info/6b2ff26c25
|
# caused by check-in https://sqlite.org/src/info/6b2ff26c25
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ proc write_file {zFile zData} {
|
|||||||
# b) Less than 512, or
|
# b) Less than 512, or
|
||||||
# c) Greater than SQLITE_MAX_PAGE_SIZE
|
# c) Greater than SQLITE_MAX_PAGE_SIZE
|
||||||
#
|
#
|
||||||
|
if {[atomic_batch_write test.db]==0} {
|
||||||
do_test crash8-3.1 {
|
do_test crash8-3.1 {
|
||||||
list [file exists test.db-joural] [file exists test.db]
|
list [file exists test.db-joural] [file exists test.db]
|
||||||
} {0 1}
|
} {0 1}
|
||||||
@@ -228,6 +229,7 @@ do_test crash8-3.11 {
|
|||||||
PRAGMA integrity_check
|
PRAGMA integrity_check
|
||||||
}
|
}
|
||||||
} {6 ok}
|
} {6 ok}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# If a connection running in persistent-journal mode is part of a
|
# If a connection running in persistent-journal mode is part of a
|
||||||
@@ -266,8 +268,12 @@ ifcapable pragma {
|
|||||||
UPDATE aux.ab SET b = randstr(1000,1000) WHERE a>=1;
|
UPDATE aux.ab SET b = randstr(1000,1000) WHERE a>=1;
|
||||||
UPDATE ab SET b = randstr(1000,1000) WHERE a>=1;
|
UPDATE ab SET b = randstr(1000,1000) WHERE a>=1;
|
||||||
}
|
}
|
||||||
|
} {persist persist}
|
||||||
|
if {[atomic_batch_write test.db]==0} {
|
||||||
|
do_test crash8.4.1.1 {
|
||||||
list [file exists test.db-journal] [file exists test2.db-journal]
|
list [file exists test.db-journal] [file exists test2.db-journal]
|
||||||
} {1 1}
|
} {1 1}
|
||||||
|
}
|
||||||
|
|
||||||
do_test crash8-4.2 {
|
do_test crash8-4.2 {
|
||||||
execsql {
|
execsql {
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ set testdir [file dirname $argv0]
|
|||||||
source $testdir/tester.tcl
|
source $testdir/tester.tcl
|
||||||
set testprefix delete_db
|
set testprefix delete_db
|
||||||
|
|
||||||
|
if {[atomic_batch_write test.db]} {
|
||||||
|
finish_test
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
proc delete_all {} {
|
proc delete_all {} {
|
||||||
foreach f [glob -nocomplain test2*] { file delete $f }
|
foreach f [glob -nocomplain test2*] { file delete $f }
|
||||||
foreach f [glob -nocomplain test3*] { file delete $f }
|
foreach f [glob -nocomplain test3*] { file delete $f }
|
||||||
|
|||||||
+6
-1
@@ -252,7 +252,9 @@ db2 close
|
|||||||
# opens the journal file for exclusive access, preventing its contents
|
# opens the journal file for exclusive access, preventing its contents
|
||||||
# from being inspected externally.
|
# from being inspected externally.
|
||||||
#
|
#
|
||||||
if {$tcl_platform(platform) != "windows"} {
|
if {$tcl_platform(platform) != "windows"
|
||||||
|
&& [atomic_batch_write test.db]==0
|
||||||
|
} {
|
||||||
|
|
||||||
# Return a list of two booleans (either 0 or 1). The first is true
|
# Return a list of two booleans (either 0 or 1). The first is true
|
||||||
# if the named file exists. The second is true only if the file
|
# if the named file exists. The second is true only if the file
|
||||||
@@ -391,6 +393,7 @@ do_test exclusive-4.5 {
|
|||||||
# Tests exclusive-5.X - test that statement journals are truncated
|
# Tests exclusive-5.X - test that statement journals are truncated
|
||||||
# instead of deleted when in exclusive access mode.
|
# instead of deleted when in exclusive access mode.
|
||||||
#
|
#
|
||||||
|
if {[atomic_batch_write test.db]==0} {
|
||||||
|
|
||||||
# Close and reopen the database so that the temp database is no
|
# Close and reopen the database so that the temp database is no
|
||||||
# longer active.
|
# longer active.
|
||||||
@@ -508,4 +511,6 @@ do_execsql_test exclusive-6.5 {
|
|||||||
SELECT * FROM sqlite_master;
|
SELECT * FROM sqlite_master;
|
||||||
} {exclusive}
|
} {exclusive}
|
||||||
|
|
||||||
|
} ;# atomic_batch_write==0
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ do_test fallocate-1.7 {
|
|||||||
execsql { BEGIN; INSERT INTO t1 VALUES(1, 2); }
|
execsql { BEGIN; INSERT INTO t1 VALUES(1, 2); }
|
||||||
if {[permutation] != "inmemory_journal"
|
if {[permutation] != "inmemory_journal"
|
||||||
&& [permutation] != "atomic-batch-write"
|
&& [permutation] != "atomic-batch-write"
|
||||||
|
&& [atomic_batch_write test.db]==0
|
||||||
} {
|
} {
|
||||||
hexio_get_int [hexio_read test.db-journal 16 4]
|
hexio_get_int [hexio_read test.db-journal 16 4]
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+6
-4
@@ -174,16 +174,18 @@ do_catchsql_test fkey1-5.2 {
|
|||||||
# Make sure sqlite3_trace() output works with triggers used to implement
|
# Make sure sqlite3_trace() output works with triggers used to implement
|
||||||
# FK constraints
|
# FK constraints
|
||||||
#
|
#
|
||||||
proc sqltrace {txt} {
|
ifcapable trace {
|
||||||
|
proc sqltrace {txt} {
|
||||||
global traceoutput
|
global traceoutput
|
||||||
lappend traceoutput $txt
|
lappend traceoutput $txt
|
||||||
}
|
}
|
||||||
do_test fkey1-5.2.1 {
|
do_test fkey1-5.2.1 {
|
||||||
unset -nocomplain traceoutput
|
unset -nocomplain traceoutput
|
||||||
db trace sqltrace
|
db trace sqltrace
|
||||||
catch {db eval {INSERT OR REPLACE INTO t11 VALUES(2,3);}}
|
catch {db eval {INSERT OR REPLACE INTO t11 VALUES(2,3);}}
|
||||||
set traceoutput
|
set traceoutput
|
||||||
} {{INSERT OR REPLACE INTO t11 VALUES(2,3);} {INSERT OR REPLACE INTO t11 VALUES(2,3);} {INSERT OR REPLACE INTO t11 VALUES(2,3);}}
|
} {{INSERT OR REPLACE INTO t11 VALUES(2,3);} {INSERT OR REPLACE INTO t11 VALUES(2,3);} {INSERT OR REPLACE INTO t11 VALUES(2,3);}}
|
||||||
|
}
|
||||||
|
|
||||||
# A similar test to the above.
|
# A similar test to the above.
|
||||||
do_execsql_test fkey1-5.3 {
|
do_execsql_test fkey1-5.3 {
|
||||||
|
|||||||
+9
-4
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
set testdir [file dirname $argv0]
|
set testdir [file dirname $argv0]
|
||||||
source $testdir/tester.tcl
|
source $testdir/tester.tcl
|
||||||
set testprefix fts3expr5
|
set testprefix fts3rank
|
||||||
|
|
||||||
# If SQLITE_ENABLE_FTS3 is defined, omit this file.
|
# If SQLITE_ENABLE_FTS3 is defined, omit this file.
|
||||||
ifcapable !fts3 {
|
ifcapable !fts3 {
|
||||||
@@ -56,9 +56,14 @@ do_catchsql_test 1.4 {
|
|||||||
SELECT * FROM t1 ORDER BY rank(x'0000000000000000') DESC, rowid
|
SELECT * FROM t1 ORDER BY rank(x'0000000000000000') DESC, rowid
|
||||||
} {0 {{one two} one {one two} three {one two} two}}
|
} {0 {{one two} one {one two} three {one two} two}}
|
||||||
|
|
||||||
do_catchsql_test 1.5 {
|
if {$tcl_platform(byteOrder)=="littleEndian"} {
|
||||||
|
do_catchsql_test 1.5le {
|
||||||
SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
|
SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
|
||||||
} {1 {invalid matchinfo blob passed to function rank()}}
|
} {1 {invalid matchinfo blob passed to function rank()}}
|
||||||
|
} else {
|
||||||
|
do_catchsql_test 1.5be {
|
||||||
|
SELECT * FROM t1 ORDER BY rank(x'0000000100000001') DESC, rowid
|
||||||
|
} {1 {invalid matchinfo blob passed to function rank()}}
|
||||||
|
}
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|
||||||
|
|||||||
+20
-20
@@ -9,7 +9,7 @@
|
|||||||
#
|
#
|
||||||
#*************************************************************************
|
#*************************************************************************
|
||||||
#
|
#
|
||||||
# Test cases for the sqlite_unsupported_offset() function.
|
# Test cases for the sqlite_offset() function.
|
||||||
#
|
#
|
||||||
# Some of the tests in this file depend on the exact placement of content
|
# Some of the tests in this file depend on the exact placement of content
|
||||||
# within b-tree pages. Such placement is at the implementations discretion,
|
# within b-tree pages. Such placement is at the implementations discretion,
|
||||||
@@ -34,51 +34,51 @@ do_execsql_test func6-100 {
|
|||||||
INSERT INTO t2(x,y) SELECT a, b FROM t1;
|
INSERT INTO t2(x,y) SELECT a, b FROM t1;
|
||||||
}
|
}
|
||||||
do_execsql_test func6-110 {
|
do_execsql_test func6-110 {
|
||||||
SELECT a, sqlite_unsupported_offset(d)/4096 + 1,
|
SELECT a, sqlite_offset(d)/4096 + 1,
|
||||||
sqlite_unsupported_offset(d)%4096 FROM t1
|
sqlite_offset(d)%4096 FROM t1
|
||||||
ORDER BY rowid LIMIT 2;
|
ORDER BY rowid LIMIT 2;
|
||||||
} {abc001 2 4084 abc002 2 4069}
|
} {abc001 2 4084 abc002 2 4069}
|
||||||
do_execsql_test func6-120 {
|
do_execsql_test func6-120 {
|
||||||
SELECT a, typeof(sqlite_unsupported_offset(+a)) FROM t1
|
SELECT a, typeof(sqlite_offset(+a)) FROM t1
|
||||||
ORDER BY rowid LIMIT 2;
|
ORDER BY rowid LIMIT 2;
|
||||||
} {abc001 null abc002 null}
|
} {abc001 null abc002 null}
|
||||||
do_execsql_test func6-130 {
|
do_execsql_test func6-130 {
|
||||||
SELECT a, sqlite_unsupported_offset(a)/4096+1,
|
SELECT a, sqlite_offset(a)/4096+1,
|
||||||
sqlite_unsupported_offset(a)%4096
|
sqlite_offset(a)%4096
|
||||||
FROM t1
|
FROM t1
|
||||||
ORDER BY a LIMIT 2;
|
ORDER BY a LIMIT 2;
|
||||||
} {abc001 3 4087 abc002 3 4076}
|
} {abc001 3 4087 abc002 3 4076}
|
||||||
do_execsql_test func6-140 {
|
do_execsql_test func6-140 {
|
||||||
SELECT a, sqlite_unsupported_offset(d)/4096+1,
|
SELECT a, sqlite_offset(d)/4096+1,
|
||||||
sqlite_unsupported_offset(d)%4096
|
sqlite_offset(d)%4096
|
||||||
FROM t1
|
FROM t1
|
||||||
ORDER BY a LIMIT 2;
|
ORDER BY a LIMIT 2;
|
||||||
} {abc001 2 4084 abc002 2 4069}
|
} {abc001 2 4084 abc002 2 4069}
|
||||||
do_execsql_test func6-150 {
|
do_execsql_test func6-150 {
|
||||||
SELECT a,
|
SELECT a,
|
||||||
sqlite_unsupported_offset(a)/4096+1,
|
sqlite_offset(a)/4096+1,
|
||||||
sqlite_unsupported_offset(a)%4096,
|
sqlite_offset(a)%4096,
|
||||||
sqlite_unsupported_offset(d)/4096+1,
|
sqlite_offset(d)/4096+1,
|
||||||
sqlite_unsupported_offset(d)%4096
|
sqlite_offset(d)%4096
|
||||||
FROM t1
|
FROM t1
|
||||||
ORDER BY a LIMIT 2;
|
ORDER BY a LIMIT 2;
|
||||||
} {abc001 3 4087 2 4084 abc002 3 4076 2 4069}
|
} {abc001 3 4087 2 4084 abc002 3 4076 2 4069}
|
||||||
do_execsql_test func6-160 {
|
do_execsql_test func6-160 {
|
||||||
SELECT b,
|
SELECT b,
|
||||||
sqlite_unsupported_offset(b)/4096+1,
|
sqlite_offset(b)/4096+1,
|
||||||
sqlite_unsupported_offset(b)%4096,
|
sqlite_offset(b)%4096,
|
||||||
sqlite_unsupported_offset(c)/4096+1,
|
sqlite_offset(c)/4096+1,
|
||||||
sqlite_unsupported_offset(c)%4096,
|
sqlite_offset(c)%4096,
|
||||||
sqlite_unsupported_offset(d)/4096+1,
|
sqlite_offset(d)/4096+1,
|
||||||
sqlite_unsupported_offset(d)%4096
|
sqlite_offset(d)%4096
|
||||||
FROM t1
|
FROM t1
|
||||||
ORDER BY b LIMIT 2;
|
ORDER BY b LIMIT 2;
|
||||||
} {1 4 4090 4 4090 2 4084 2 4 4081 4 4081 2 4069}
|
} {1 4 4090 4 4090 2 4084 2 4 4081 4 4081 2 4069}
|
||||||
|
|
||||||
|
|
||||||
do_execsql_test func6-200 {
|
do_execsql_test func6-200 {
|
||||||
SELECT y, sqlite_unsupported_offset(y)/4096+1,
|
SELECT y, sqlite_offset(y)/4096+1,
|
||||||
sqlite_unsupported_offset(y)%4096
|
sqlite_offset(y)%4096
|
||||||
FROM t2
|
FROM t2
|
||||||
ORDER BY x LIMIT 2;
|
ORDER BY x LIMIT 2;
|
||||||
} {1 5 4087 2 5 4076}
|
} {1 5 4087 2 5 4076}
|
||||||
|
|||||||
@@ -906,5 +906,56 @@ do_preupdate_test 10.3 {
|
|||||||
DELETE FROM t3 WHERE b=1
|
DELETE FROM t3 WHERE b=1
|
||||||
} {DELETE main t3 1 1 0 {} 1}
|
} {DELETE main t3 1 1 0 {} 1}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
# Test that the "update" hook is not fired for operations on the
|
||||||
|
# sqlite_stat1 table performed by ANALYZE, even if a pre-update hook is
|
||||||
|
# registered.
|
||||||
|
ifcapable analyze {
|
||||||
|
reset_db
|
||||||
|
do_execsql_test 11.1 {
|
||||||
|
CREATE TABLE t1(a, b);
|
||||||
|
CREATE INDEX idx1 ON t1(a);
|
||||||
|
CREATE INDEX idx2 ON t1(b);
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES(1, 2);
|
||||||
|
INSERT INTO t1 VALUES(3, 4);
|
||||||
|
INSERT INTO t1 VALUES(5, 6);
|
||||||
|
INSERT INTO t1 VALUES(7, 8);
|
||||||
|
}
|
||||||
|
|
||||||
|
db preupdate hook preupdate_cb
|
||||||
|
db update_hook update_cb
|
||||||
|
|
||||||
|
proc preupdate_cb {args} { lappend ::res "preupdate" $args }
|
||||||
|
proc update_cb {args} { lappend ::res "update" $args }
|
||||||
|
|
||||||
|
set ::res [list]
|
||||||
|
do_test 11.2 {
|
||||||
|
execsql ANALYZE
|
||||||
|
set ::res
|
||||||
|
} [list {*}{
|
||||||
|
preupdate {INSERT main sqlite_stat1 1 1}
|
||||||
|
preupdate {INSERT main sqlite_stat1 2 2}
|
||||||
|
}]
|
||||||
|
|
||||||
|
do_execsql_test 11.3 {
|
||||||
|
INSERT INTO t1 VALUES(9, 10);
|
||||||
|
INSERT INTO t1 VALUES(11, 12);
|
||||||
|
INSERT INTO t1 VALUES(13, 14);
|
||||||
|
INSERT INTO t1 VALUES(15, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
set ::res [list]
|
||||||
|
do_test 11.4 {
|
||||||
|
execsql ANALYZE
|
||||||
|
set ::res
|
||||||
|
} [list {*}{
|
||||||
|
preupdate {DELETE main sqlite_stat1 1 1}
|
||||||
|
preupdate {DELETE main sqlite_stat1 2 2}
|
||||||
|
preupdate {INSERT main sqlite_stat1 1 1}
|
||||||
|
preupdate {INSERT main sqlite_stat1 2 2}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|||||||
+2
-2
@@ -138,8 +138,8 @@ ifcapable icu {
|
|||||||
do_catchsql_test icu-5.4 {
|
do_catchsql_test icu-5.4 {
|
||||||
SELECT 'abc' REGEXP 'a[abc]c.*'
|
SELECT 'abc' REGEXP 'a[abc]c.*'
|
||||||
} {0 1}
|
} {0 1}
|
||||||
do_catchsql_test icu-5.4 {SELECT 'abc' REGEXP } {1 {near " ": syntax error}}
|
do_catchsql_test icu-5.5 {SELECT 'abc' REGEXP } {1 {incomplete input}}
|
||||||
do_catchsql_test icu-5.5 {SELECT 'abc' REGEXP, 1} {1 {near ",": syntax error}}
|
do_catchsql_test icu-5.6 {SELECT 'abc' REGEXP, 1} {1 {near ",": syntax error}}
|
||||||
|
|
||||||
do_malloc_test icu-6.10 -sqlbody {
|
do_malloc_test icu-6.10 -sqlbody {
|
||||||
SELECT upper(char(0xfb04,0xdf,0xfb04,0xe8,0xfb04));
|
SELECT upper(char(0xfb04,0xdf,0xfb04,0xe8,0xfb04));
|
||||||
|
|||||||
@@ -413,4 +413,16 @@ do_execsql_test indexexpr1-1500 {
|
|||||||
SELECT * FROM t1500;
|
SELECT * FROM t1500;
|
||||||
} {1 3}
|
} {1 3}
|
||||||
|
|
||||||
|
# 2018-01-03 OSSFuzz discovers another test case for the same problem
|
||||||
|
# above.
|
||||||
|
#
|
||||||
|
do_execsql_test indexexpr-1510 {
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
CREATE TABLE t1(a PRIMARY KEY,b UNIQUE);
|
||||||
|
REPLACE INTO t1 VALUES(2, 1);
|
||||||
|
REPLACE INTO t1 SELECT 6,1;
|
||||||
|
CREATE INDEX t1aa ON t1(a-a);
|
||||||
|
REPLACE INTO t1 SELECT a, randomblob(a) FROM t1
|
||||||
|
} {}
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|||||||
+2
-2
@@ -172,7 +172,7 @@ ifcapable crashtest&&attach {
|
|||||||
# These tests can't be run on windows because the windows version of
|
# These tests can't be run on windows because the windows version of
|
||||||
# SQLite holds a mandatory exclusive lock on journal files it has open.
|
# SQLite holds a mandatory exclusive lock on journal files it has open.
|
||||||
#
|
#
|
||||||
if {$tcl_platform(platform)!="windows"} {
|
if {$tcl_platform(platform)!="windows" && ![atomic_batch_write test.db]} {
|
||||||
do_ioerr_test ioerr-7 -tclprep {
|
do_ioerr_test ioerr-7 -tclprep {
|
||||||
db close
|
db close
|
||||||
sqlite3 db2 test2.db
|
sqlite3 db2 test2.db
|
||||||
@@ -211,7 +211,7 @@ do_ioerr_test ioerr-8 -ckrefcount true -tclprep {
|
|||||||
|
|
||||||
# For test coverage: Cause an IO error whilst reading the master-journal
|
# For test coverage: Cause an IO error whilst reading the master-journal
|
||||||
# name from a journal file.
|
# name from a journal file.
|
||||||
if {$tcl_platform(platform)=="unix"} {
|
if {$tcl_platform(platform)=="unix" && [atomic_batch_write test.db]==0} {
|
||||||
do_ioerr_test ioerr-9 -ckrefcount true -tclprep {
|
do_ioerr_test ioerr-9 -ckrefcount true -tclprep {
|
||||||
execsql {
|
execsql {
|
||||||
CREATE TABLE t1(a,b,c);
|
CREATE TABLE t1(a,b,c);
|
||||||
|
|||||||
+6
-1
@@ -22,7 +22,12 @@ source $testdir/tester.tcl
|
|||||||
# These tests will not work on windows because windows uses
|
# These tests will not work on windows because windows uses
|
||||||
# manditory file locking which breaks the copy_file command.
|
# manditory file locking which breaks the copy_file command.
|
||||||
#
|
#
|
||||||
if {$tcl_platform(platform)=="windows"} {
|
# Or with atomic_batch_write systems, as journal files are
|
||||||
|
# not created.
|
||||||
|
#
|
||||||
|
if {$tcl_platform(platform)=="windows"
|
||||||
|
|| [atomic_batch_write test.db]
|
||||||
|
} {
|
||||||
finish_test
|
finish_test
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -20,7 +20,9 @@ source $testdir/malloc_common.tcl
|
|||||||
# If a connection is required to create a journal file, it creates it with
|
# If a connection is required to create a journal file, it creates it with
|
||||||
# the same file-system permissions as the database file itself. Test this.
|
# the same file-system permissions as the database file itself. Test this.
|
||||||
#
|
#
|
||||||
if {$::tcl_platform(platform) == "unix"} {
|
if {$::tcl_platform(platform) == "unix"
|
||||||
|
&& [atomic_batch_write test.db]==0
|
||||||
|
} {
|
||||||
|
|
||||||
# Changed on 2012-02-13: umask is deliberately ignored for -wal, -journal,
|
# Changed on 2012-02-13: umask is deliberately ignored for -wal, -journal,
|
||||||
# and -shm files.
|
# and -shm files.
|
||||||
|
|||||||
@@ -302,6 +302,7 @@ ifcapable autovacuum&&pragma {
|
|||||||
# The following test caes, jrnlmode-5.*, test the journal_size_limit
|
# The following test caes, jrnlmode-5.*, test the journal_size_limit
|
||||||
# pragma.
|
# pragma.
|
||||||
ifcapable pragma {
|
ifcapable pragma {
|
||||||
|
if {[atomic_batch_write test.db]==0} {
|
||||||
db close
|
db close
|
||||||
forcedelete test.db test2.db test3.db
|
forcedelete test.db test2.db test3.db
|
||||||
sqlite3 db test.db
|
sqlite3 db test.db
|
||||||
@@ -454,8 +455,10 @@ ifcapable pragma {
|
|||||||
list [file exists test.db-journal] [file size test.db-journal]
|
list [file exists test.db-journal] [file size test.db-journal]
|
||||||
} {1 0}
|
} {1 0}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ifcapable pragma {
|
ifcapable pragma {
|
||||||
|
if {[atomic_batch_write test.db]==0} {
|
||||||
# These tests are not run as part of the "journaltest" permutation,
|
# These tests are not run as part of the "journaltest" permutation,
|
||||||
# as the test_journal.c layer is incompatible with in-memory journaling.
|
# as the test_journal.c layer is incompatible with in-memory journaling.
|
||||||
if {[permutation] ne "journaltest"} {
|
if {[permutation] ne "journaltest"} {
|
||||||
@@ -507,6 +510,7 @@ ifcapable pragma {
|
|||||||
} {0}
|
} {0}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ifcapable pragma {
|
ifcapable pragma {
|
||||||
catch { db close }
|
catch { db close }
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ ifcapable {!pager_pragmas} {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if {[atomic_batch_write test.db]} {
|
||||||
|
finish_test
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
# The tests in this file check that the following two bugs (both now fixed)
|
# The tests in this file check that the following two bugs (both now fixed)
|
||||||
# do not reappear.
|
# do not reappear.
|
||||||
|
|||||||
@@ -17,6 +17,14 @@
|
|||||||
set testdir [file dirname $argv0]
|
set testdir [file dirname $argv0]
|
||||||
source $testdir/tester.tcl
|
source $testdir/tester.tcl
|
||||||
|
|
||||||
|
if {[atomic_batch_write test.db]} {
|
||||||
|
# This test uses two processes, one of which blocks until the other
|
||||||
|
# creates a *-journal file. Which doesn't work if atomic writes are
|
||||||
|
# available.
|
||||||
|
finish_test
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
do_not_use_codec
|
do_not_use_codec
|
||||||
|
|
||||||
# Initialize the test.db database so that it is non-empty
|
# Initialize the test.db database so that it is non-empty
|
||||||
|
|||||||
+2
-2
@@ -434,7 +434,7 @@ do_test main-3.2.28 {
|
|||||||
} {0 246}
|
} {0 246}
|
||||||
do_test main-3.2.29 {
|
do_test main-3.2.29 {
|
||||||
catchsql {select 123/}
|
catchsql {select 123/}
|
||||||
} {1 {near "/": syntax error}}
|
} {1 {incomplete input}}
|
||||||
do_test main-3.2.30 {
|
do_test main-3.2.30 {
|
||||||
catchsql {select 123--5}
|
catchsql {select 123--5}
|
||||||
} {0 123}
|
} {0 123}
|
||||||
@@ -467,7 +467,7 @@ do_test main-3.4 {
|
|||||||
do_test main-3.5 {
|
do_test main-3.5 {
|
||||||
set v [catch {execsql {create}} msg]
|
set v [catch {execsql {create}} msg]
|
||||||
lappend v $msg
|
lappend v $msg
|
||||||
} {1 {near "create": syntax error}}
|
} {1 {incomplete input}}
|
||||||
do_test main-3.6 {
|
do_test main-3.6 {
|
||||||
catchsql {SELECT 'abc' + #9}
|
catchsql {SELECT 'abc' + #9}
|
||||||
} {1 {near "#9": syntax error}}
|
} {1 {near "#9": syntax error}}
|
||||||
|
|||||||
+1
-1
@@ -329,7 +329,7 @@ ifcapable crashtest&&attach {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if {$tcl_platform(platform)!="windows"} {
|
if {$tcl_platform(platform)!="windows" && [atomic_batch_write test.db]==0} {
|
||||||
do_malloc_test 14 -tclprep {
|
do_malloc_test 14 -tclprep {
|
||||||
catch {db close}
|
catch {db close}
|
||||||
sqlite3 db2 test2.db
|
sqlite3 db2 test2.db
|
||||||
|
|||||||
@@ -27,6 +27,17 @@ if {!$MEMDEBUG} {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Do not run these tests if F2FS batch writes are supported. In this case,
|
||||||
|
# it is possible for a single DML statement in an implicit transaction
|
||||||
|
# to fail with SQLITE_NOMEM, but for the transaction to still end up
|
||||||
|
# committed to disk. Which confuses the tests in this module.
|
||||||
|
#
|
||||||
|
if {[atomic_batch_write test.db]} {
|
||||||
|
puts "Skipping malloc3 tests: atomic-batch support"
|
||||||
|
finish_test
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Do not run these tests with an in-memory journal.
|
# Do not run these tests with an in-memory journal.
|
||||||
#
|
#
|
||||||
|
|||||||
+43
-5
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
set testdir [file dirname $argv0]
|
set testdir [file dirname $argv0]
|
||||||
source $testdir/tester.tcl
|
source $testdir/tester.tcl
|
||||||
|
set testprefix misc7
|
||||||
|
|
||||||
if {[clang_sanitize_address]==0} {
|
if {[clang_sanitize_address]==0} {
|
||||||
do_test misc7-1-misuse {
|
do_test misc7-1-misuse {
|
||||||
@@ -42,15 +43,17 @@ do_test misc7-4 {
|
|||||||
|
|
||||||
# Try to open a file with a directory where its journal file should be.
|
# Try to open a file with a directory where its journal file should be.
|
||||||
#
|
#
|
||||||
do_test misc7-5 {
|
if {[atomic_batch_write test.db]==0} {
|
||||||
|
do_test misc7-5 {
|
||||||
delete_file mydir
|
delete_file mydir
|
||||||
file mkdir mydir-journal
|
file mkdir mydir-journal
|
||||||
sqlite3 db2 ./mydir
|
sqlite3 db2 ./mydir
|
||||||
catchsql {
|
catchsql {
|
||||||
CREATE TABLE abc(a, b, c);
|
CREATE TABLE abc(a, b, c);
|
||||||
} db2
|
} db2
|
||||||
} {1 {unable to open database file}}
|
} {1 {unable to open database file}}
|
||||||
db2 close
|
db2 close
|
||||||
|
}
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# The following tests, misc7-6.* test the libraries behaviour when
|
# The following tests, misc7-6.* test the libraries behaviour when
|
||||||
@@ -518,8 +521,43 @@ do_test misc7-22.3 {
|
|||||||
do_test misc7-22.4 {
|
do_test misc7-22.4 {
|
||||||
sqlite3_extended_errcode db
|
sqlite3_extended_errcode db
|
||||||
} SQLITE_READONLY_ROLLBACK
|
} SQLITE_READONLY_ROLLBACK
|
||||||
|
catch { db close }
|
||||||
db close
|
|
||||||
forcedelete test.db
|
forcedelete test.db
|
||||||
|
|
||||||
|
if {$::tcl_platform(platform)=="unix"
|
||||||
|
&& [atomic_batch_write test.db]==0
|
||||||
|
} {
|
||||||
|
reset_db
|
||||||
|
do_execsql_test 23.0 {
|
||||||
|
CREATE TABLE t1(x, y);
|
||||||
|
INSERT INTO t1 VALUES(1, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
do_test 23.1 {
|
||||||
|
db close
|
||||||
|
forcedelete tst
|
||||||
|
file mkdir tst
|
||||||
|
forcecopy test.db tst/test.db
|
||||||
|
file attributes tst -permissions r-xr-xr-x
|
||||||
|
} {}
|
||||||
|
|
||||||
|
sqlite3 db tst/test.db
|
||||||
|
do_execsql_test 23.2 {
|
||||||
|
SELECT * FROM t1;
|
||||||
|
} {1 2}
|
||||||
|
|
||||||
|
do_catchsql_test 23.3 {
|
||||||
|
INSERT INTO t1 VALUES(3, 4);
|
||||||
|
} {1 {attempt to write a readonly database}}
|
||||||
|
|
||||||
|
do_test 23.4 {
|
||||||
|
sqlite3_extended_errcode db
|
||||||
|
} {SQLITE_READONLY_DIRECTORY}
|
||||||
|
|
||||||
|
do_test 23.5 {
|
||||||
|
db close
|
||||||
|
forcedelete tst
|
||||||
|
} {}
|
||||||
|
}
|
||||||
|
|
||||||
finish_test
|
finish_test
|
||||||
|
|||||||
@@ -160,6 +160,9 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|||||||
/* Run the SQL. The sqlite_exec() interface expects a zero-terminated
|
/* Run the SQL. The sqlite_exec() interface expects a zero-terminated
|
||||||
** string, so make a copy. */
|
** string, so make a copy. */
|
||||||
zSql = sqlite3_mprintf("%.*s", (int)size, data);
|
zSql = sqlite3_mprintf("%.*s", (int)size, data);
|
||||||
|
#ifndef SQLITE_OMIT_COMPLETE
|
||||||
|
sqlite3_complete(zSql);
|
||||||
|
#endif
|
||||||
sqlite3_exec(cx.db, zSql, exec_handler, (void*)&execCnt, &zErrMsg);
|
sqlite3_exec(cx.db, zSql, exec_handler, (void*)&execCnt, &zErrMsg);
|
||||||
|
|
||||||
/* Show any errors */
|
/* Show any errors */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user