Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 64679fee8e |
@@ -1,6 +0,0 @@
|
||||
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.
|
||||
+3
-3
@@ -1149,10 +1149,10 @@ fts3_write.lo: $(TOP)/ext/fts3/fts3_write.c $(HDR) $(EXTHDR)
|
||||
rtree.lo: $(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
|
||||
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
|
||||
|
||||
userauth.lo: $(TOP)/ext/userauth/userauth.c $(HDR) $(EXTHDR)
|
||||
sqlite3session.lo: $(TOP)/ext/userauth/userauth.c $(HDR) $(EXTHDR)
|
||||
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/userauth/userauth.c
|
||||
|
||||
sqlite3session.lo: $(TOP)/ext/session/sqlite3session.c $(HDR) $(EXTHDR)
|
||||
userauth.lo: $(TOP)/ext/session/sqlite3session.c $(HDR) $(EXTHDR)
|
||||
$(LTCOMPILE) -DSQLITE_CORE -c $(TOP)/ext/session/sqlite3session.c
|
||||
|
||||
json1.lo: $(TOP)/ext/misc/json1.c
|
||||
@@ -1424,7 +1424,7 @@ install: sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_instal
|
||||
$(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(pkgconfigdir)
|
||||
|
||||
pkgIndex.tcl:
|
||||
echo 'package ifneeded sqlite3 $(RELEASE) [list load [file join $$dir libtclsqlite3[info sharedlibextension]] sqlite3]' > $@
|
||||
echo 'package ifneeded sqlite3 $(RELEASE) [list load $(TCLLIBDIR)/libtclsqlite3$(SHLIB_SUFFIX) sqlite3]' > $@
|
||||
tcl_install: lib_install libtclsqlite3.la pkgIndex.tcl
|
||||
$(INSTALL) -d $(DESTDIR)$(TCLLIBDIR)
|
||||
$(LTINSTALL) libtclsqlite3.la $(DESTDIR)$(TCLLIBDIR)
|
||||
|
||||
+8
-44
@@ -320,13 +320,6 @@ SQLITETCLH = sqlite_tcl.h
|
||||
SQLITETCLDECLSH = sqlite_tclDecls.h
|
||||
!ENDIF
|
||||
|
||||
# This is the name to use for the dynamic link library (DLL) containing the
|
||||
# Tcl bindings for SQLite.
|
||||
#
|
||||
!IFNDEF SQLITE3TCLDLL
|
||||
SQLITE3TCLDLL = tclsqlite3.dll
|
||||
!ENDIF
|
||||
|
||||
# These are the additional targets that the targets that integrate with the
|
||||
# Tcl library should depend on when compiling, etc.
|
||||
#
|
||||
@@ -502,9 +495,9 @@ UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
|
||||
# will run on the platform that is doing the build.
|
||||
#
|
||||
!IF $(USE_FULLWARN)!=0
|
||||
BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
|
||||
BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
|
||||
!ELSE
|
||||
BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
|
||||
BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
|
||||
!ENDIF
|
||||
|
||||
# Check if assembly code listings should be generated for the source
|
||||
@@ -860,14 +853,6 @@ RCC = $(RCC) -DSQLITE_WIN32_MALLOC_VALIDATE=1
|
||||
# prior to running nmake in order to match the actual installed location and
|
||||
# version on this machine.
|
||||
#
|
||||
!IFNDEF TCLVERSION
|
||||
TCLVERSION = 86
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF TCLSUFFIX
|
||||
TCLSUFFIX =
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF TCLDIR
|
||||
TCLDIR = $(TOP)\compat\tcl
|
||||
!ENDIF
|
||||
@@ -881,11 +866,11 @@ TCLLIBDIR = $(TCLDIR)\lib
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF LIBTCL
|
||||
LIBTCL = tcl$(TCLVERSION)$(TCLSUFFIX).lib
|
||||
LIBTCL = tcl86.lib
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF LIBTCLSTUB
|
||||
LIBTCLSTUB = tclstub$(TCLVERSION)$(TCLSUFFIX).lib
|
||||
LIBTCLSTUB = tclstub86.lib
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF LIBTCLPATH
|
||||
@@ -1078,7 +1063,7 @@ RCC = $(RCC) -I$(ICUINCDIR)
|
||||
# Command line prefixes for compiling code, compiling resources,
|
||||
# linking, etc.
|
||||
#
|
||||
LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb
|
||||
LTCOMPILE = $(TCC) -Fo$@
|
||||
LTRCOMPILE = $(RCC) -r
|
||||
LTLIB = lib.exe
|
||||
LTLINK = $(TCC) -Fe$@
|
||||
@@ -1096,11 +1081,6 @@ LTLIBS = $(LTLIBS) rpcrt4.lib
|
||||
!IFDEF PLATFORM
|
||||
LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
|
||||
LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
|
||||
!ELSEIF "$(VISUALSTUDIOVERSION)"=="12.0" || \
|
||||
"$(VISUALSTUDIOVERSION)"=="14.0" || \
|
||||
"$(VISUALSTUDIOVERSION)"=="15.0"
|
||||
LTLINKOPTS = /NOLOGO /MACHINE:x86
|
||||
LTLIBOPTS = /NOLOGO /MACHINE:x86
|
||||
!ELSE
|
||||
LTLINKOPTS = /NOLOGO
|
||||
LTLIBOPTS = /NOLOGO
|
||||
@@ -1685,7 +1665,7 @@ TESTOPTS = --verbose=file --output=test-out.txt
|
||||
# Extra targets for the "all" target that require Tcl.
|
||||
#
|
||||
!IF $(NO_TCL)==0
|
||||
ALL_TCL_TARGETS = $(SQLITE3TCLDLL)
|
||||
ALL_TCL_TARGETS = libtclsqlite3.lib
|
||||
!ELSE
|
||||
ALL_TCL_TARGETS =
|
||||
!ENDIF
|
||||
@@ -1717,22 +1697,7 @@ libsqlite3.lib: $(LIBOBJ)
|
||||
$(LTLIB) $(LTLIBOPTS) /OUT:$@ $(LIBOBJ) $(TLIBS)
|
||||
|
||||
libtclsqlite3.lib: tclsqlite.lo libsqlite3.lib
|
||||
$(LTLIB) $(LTLIBOPTS) $(TCLLIBPATHS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
|
||||
|
||||
tclsqlite3.def: tclsqlite.lo
|
||||
echo EXPORTS > tclsqlite3.def
|
||||
dumpbin /all tclsqlite.lo \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+/EXPORT:_?((?:Sqlite3|Tclsqlite3)_[^@]*)(?:@\d+)?$$" \1 \
|
||||
| sort >> tclsqlite3.def
|
||||
|
||||
pkgIndex.tcl: $(TOP)\VERSION
|
||||
for /F %%V in ('type "$(TOP)\VERSION"') do ( \
|
||||
echo package ifneeded sqlite3 @version@ [list load [file join $$dir $(SQLITE3TCLDLL)] sqlite3] \
|
||||
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact @version@ %%V > pkgIndex.tcl \
|
||||
)
|
||||
|
||||
$(SQLITE3TCLDLL): libtclsqlite3.lib $(LIBRESOBJS) tclsqlite3.def pkgIndex.tcl
|
||||
$(LD) $(LDFLAGS) $(LTLINKOPTS) $(LTLIBPATHS) /DLL /DEF:tclsqlite3.def /OUT:$@ libtclsqlite3.lib $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
|
||||
$(LTLIB) $(LTLIBOPTS) $(LTLIBPATHS) /OUT:$@ tclsqlite.lo libsqlite3.lib $(LIBTCLSTUB) $(TLIBS)
|
||||
# <</mark>>
|
||||
|
||||
$(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
|
||||
@@ -1872,7 +1837,7 @@ opcodes.lo: opcodes.c
|
||||
#
|
||||
!IF $(USE_RC)!=0
|
||||
# <<block1>>
|
||||
$(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H) $(TOP)\VERSION
|
||||
$(LIBRESOBJS): $(TOP)\src\sqlite3.rc $(SQLITE3H)
|
||||
echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
|
||||
for /F %%V in ('type "$(TOP)\VERSION"') do ( \
|
||||
echo #define SQLITE_RESOURCE_VERSION %%V \
|
||||
@@ -2549,7 +2514,6 @@ clean:
|
||||
del /Q *.bsc *.def *.cod *.da *.bb *.bbg *.vc gmon.out 2>NUL
|
||||
del /Q $(SQLITE3EXE) $(SQLITE3DLL) Replace.exe 2>NUL
|
||||
# <<mark>>
|
||||
del /Q $(SQLITE3TCLDLL) pkgIndex.tcl 2>NUL
|
||||
del /Q opcodes.c opcodes.h 2>NUL
|
||||
del /Q lemon.* lempar.c parse.* 2>NUL
|
||||
del /Q mksourceid.* mkkeywordhash.* keywordhash.h 2>NUL
|
||||
|
||||
@@ -5,28 +5,16 @@ This repository contains the complete source code for the
|
||||
are also included. However, many other test scripts
|
||||
and most of the documentation are managed separately.
|
||||
|
||||
## Version Control
|
||||
|
||||
SQLite sources are managed using the
|
||||
[Fossil](https://www.fossil-scm.org/), a distributed version control system
|
||||
that was specifically designed and written to support SQLite development.
|
||||
The [Fossil repository](https://sqlite.org/src/timeline) contains the urtext.
|
||||
|
||||
If you are reading this on GitHub or some other Git repository or service,
|
||||
then you are looking at a mirror. The names of check-ins and
|
||||
other artifacts in a Git mirror are different from the official
|
||||
names for those objects. The offical names for check-ins are
|
||||
found in a footer on the check-in comment for authorized mirrors.
|
||||
The official check-in name can also be seen in the `manifest.uuid` file
|
||||
in the root of the tree. Always use the official name, not the
|
||||
Git-name, when communicating about an SQLite check-in.
|
||||
|
||||
If you pulled your SQLite source code from a secondary source and want to
|
||||
verify its integrity, there are hints on how to do that in the
|
||||
[Verifying Code Authenticity](#vauth) section below.
|
||||
SQLite [does not use Git](https://sqlite.org/whynotgit.html).
|
||||
If you are reading this on GitHub, then you are looking at an
|
||||
unofficial mirror. See <https://sqlite.org/src> for the official
|
||||
repository.
|
||||
|
||||
## Obtaining The Code
|
||||
|
||||
SQLite sources are managed using the
|
||||
[Fossil](https://www.fossil-scm.org/), a distributed version control system
|
||||
that was specifically designed to support SQLite development.
|
||||
If you do not want to use Fossil, you can download tarballs or ZIP
|
||||
archives or [SQLite archives](https://sqlite.org/cli.html#sqlar) as follows:
|
||||
|
||||
@@ -41,7 +29,7 @@ archives or [SQLite archives](https://sqlite.org/cli.html#sqlar) as follows:
|
||||
[SQLite-archive](https://www.sqlite.org/src/sqlar/sqlite.sqlar?r=release).
|
||||
|
||||
* For other check-ins, substitute an appropriate branch name or
|
||||
tag or hash prefix in place of "release" in the URLs of the previous
|
||||
tag or hash prefix for "release" in the URLs of the previous
|
||||
bullet. Or browse the [timeline](https://www.sqlite.org/src/timeline)
|
||||
to locate the check-in desired, click on its information page link,
|
||||
then click on the "Tarball" or "ZIP Archive" links on the information
|
||||
@@ -306,42 +294,10 @@ Key files:
|
||||
There are many other source files. Each has a succinct header comment that
|
||||
describes its purpose and role within the larger system.
|
||||
|
||||
<a name="vauth"></a>
|
||||
## Verifying Code Authenticity
|
||||
|
||||
If you obtained an SQLite source tree from a secondary source, such as a
|
||||
GitHub mirror, and you want to verify that it has not been altered, there
|
||||
are a couple of ways to do that.
|
||||
|
||||
If you have a release version of SQLite, and you are using the
|
||||
`sqlite3.c` amalgamation, then SHA3-256 hashes for the amalgamation are
|
||||
available in the [change log](https://www.sqlite.org/changes.html) on
|
||||
the official website. After building the `sqlite3.c` file, you can check
|
||||
that it is authentic by comparing the hash. This does not ensure that the
|
||||
test scripts are unaltered, but it does validate the deliverable part of
|
||||
the code and the verification process only involves computing and
|
||||
comparing a single hash.
|
||||
|
||||
For versions other than an official release, or if you are building the
|
||||
`sqlite3.c` amalgamation using non-standard build options, the verification
|
||||
process is a little more involved. The `manifest` file at the root directory
|
||||
of the source tree
|
||||
contains either a SHA3-256 hash (for newer files) or a SHA1 hash (for
|
||||
older files) for every source file in the repository. You can write a script
|
||||
to extracts hashes from `manifest` and verifies the hashes against the
|
||||
corresponding files in the source tree. The SHA3-256 hash of the `manifest`
|
||||
file itself is the official name of the version of the source tree that you
|
||||
have. The `manifest.uuid` file should contain the SHA3-256 hash of the
|
||||
`manifest` file. If all of the above hash comparisons are correct, then
|
||||
you can be confident that your source tree is authentic and unadulterated.
|
||||
|
||||
The format of the `manifest` file should be mostly self-explanatory, but
|
||||
if you want details, they are available
|
||||
[here](https://fossil-scm.org/fossil/doc/trunk/www/fileformat.wiki#manifest).
|
||||
|
||||
## Contacts
|
||||
|
||||
The main SQLite website is [http://www.sqlite.org/](http://www.sqlite.org/)
|
||||
The main SQLite webpage is [http://www.sqlite.org/](http://www.sqlite.org/)
|
||||
with geographically distributed backups at
|
||||
[http://www2.sqlite.org/](http://www2.sqlite.org) and
|
||||
[http://www3.sqlite.org/](http://www3.sqlite.org).
|
||||
|
||||
@@ -433,9 +433,9 @@ UCRTLIBPATH = $(UCRTLIBPATH:\\=\)
|
||||
# will run on the platform that is doing the build.
|
||||
#
|
||||
!IF $(USE_FULLWARN)!=0
|
||||
BCC = $(NCC) -nologo -W4 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
|
||||
BCC = $(NCC) -nologo -W4 $(CCOPTS) $(BCCOPTS)
|
||||
!ELSE
|
||||
BCC = $(NCC) -nologo -W3 -Fd$*.pdb $(CCOPTS) $(BCCOPTS)
|
||||
BCC = $(NCC) -nologo -W3 $(CCOPTS) $(BCCOPTS)
|
||||
!ENDIF
|
||||
|
||||
# Check if assembly code listings should be generated for the source
|
||||
@@ -808,7 +808,7 @@ BCC = $(BCC) -Zi
|
||||
# Command line prefixes for compiling code, compiling resources,
|
||||
# linking, etc.
|
||||
#
|
||||
LTCOMPILE = $(TCC) -Fo$@ -Fd$*.pdb
|
||||
LTCOMPILE = $(TCC) -Fo$@
|
||||
LTRCOMPILE = $(RCC) -r
|
||||
LTLIB = lib.exe
|
||||
LTLINK = $(TCC) -Fe$@
|
||||
@@ -826,11 +826,6 @@ LTLIBS = $(LTLIBS) rpcrt4.lib
|
||||
!IFDEF PLATFORM
|
||||
LTLINKOPTS = /NOLOGO /MACHINE:$(PLATFORM)
|
||||
LTLIBOPTS = /NOLOGO /MACHINE:$(PLATFORM)
|
||||
!ELSEIF "$(VISUALSTUDIOVERSION)"=="12.0" || \
|
||||
"$(VISUALSTUDIOVERSION)"=="14.0" || \
|
||||
"$(VISUALSTUDIOVERSION)"=="15.0"
|
||||
LTLINKOPTS = /NOLOGO /MACHINE:x86
|
||||
LTLIBOPTS = /NOLOGO /MACHINE:x86
|
||||
!ELSE
|
||||
LTLINKOPTS = /NOLOGO
|
||||
LTLIBOPTS = /NOLOGO
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for sqlite 3.28.0.
|
||||
# Generated by GNU Autoconf 2.69 for sqlite 3.27.0.
|
||||
#
|
||||
#
|
||||
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
|
||||
@@ -726,8 +726,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='sqlite'
|
||||
PACKAGE_TARNAME='sqlite'
|
||||
PACKAGE_VERSION='3.28.0'
|
||||
PACKAGE_STRING='sqlite 3.28.0'
|
||||
PACKAGE_VERSION='3.27.0'
|
||||
PACKAGE_STRING='sqlite 3.27.0'
|
||||
PACKAGE_BUGREPORT=''
|
||||
PACKAGE_URL=''
|
||||
|
||||
@@ -863,7 +863,6 @@ infodir
|
||||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
@@ -965,7 +964,6 @@ datadir='${datarootdir}'
|
||||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
@@ -1218,15 +1216,6 @@ do
|
||||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
@@ -1364,7 +1353,7 @@ fi
|
||||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir runstatedir
|
||||
libdir localedir mandir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
@@ -1477,7 +1466,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures sqlite 3.28.0 to adapt to many kinds of systems.
|
||||
\`configure' configures sqlite 3.27.0 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1517,7 +1506,6 @@ Fine tuning of the installation directories:
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
@@ -1543,7 +1531,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of sqlite 3.28.0:";;
|
||||
short | recursive ) echo "Configuration of sqlite 3.27.0:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1669,7 +1657,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
sqlite configure 3.28.0
|
||||
sqlite configure 3.27.0
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2088,7 +2076,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by sqlite $as_me 3.28.0, which was
|
||||
It was created by sqlite $as_me 3.27.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -3946,13 +3934,13 @@ if ${lt_cv_nm_interface+:} false; then :
|
||||
else
|
||||
lt_cv_nm_interface="BSD nm"
|
||||
echo "int some_variable = 0;" > conftest.$ac_ext
|
||||
(eval echo "\"\$as_me:3949: $ac_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:3937: $ac_compile\"" >&5)
|
||||
(eval "$ac_compile" 2>conftest.err)
|
||||
cat conftest.err >&5
|
||||
(eval echo "\"\$as_me:3952: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval echo "\"\$as_me:3940: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
||||
cat conftest.err >&5
|
||||
(eval echo "\"\$as_me:3955: output\"" >&5)
|
||||
(eval echo "\"\$as_me:3943: output\"" >&5)
|
||||
cat conftest.out >&5
|
||||
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
||||
lt_cv_nm_interface="MS dumpbin"
|
||||
@@ -5158,7 +5146,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 5161 "configure"' > conftest.$ac_ext
|
||||
echo '#line 5149 "configure"' > conftest.$ac_ext
|
||||
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@@ -6683,11 +6671,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:6686: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:6674: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:6690: \$? = $ac_status" >&5
|
||||
echo "$as_me:6678: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@@ -7022,11 +7010,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7025: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7013: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:7029: \$? = $ac_status" >&5
|
||||
echo "$as_me:7017: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
@@ -7127,11 +7115,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7130: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7118: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:7134: \$? = $ac_status" >&5
|
||||
echo "$as_me:7122: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@@ -7182,11 +7170,11 @@ else
|
||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:7185: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:7173: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:7189: \$? = $ac_status" >&5
|
||||
echo "$as_me:7177: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@@ -9562,7 +9550,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 9565 "configure"
|
||||
#line 9553 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -9658,7 +9646,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 9661 "configure"
|
||||
#line 9649 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -10007,7 +9995,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -10053,7 +10041,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -10077,7 +10065,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -10122,7 +10110,7 @@ else
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -10146,7 +10134,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
We can't simply define LARGE_OFF_T to be 9223372036854775807,
|
||||
since some C++ compilers masquerading as C compilers
|
||||
incorrectly reject 9223372036854775807. */
|
||||
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
|
||||
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
|
||||
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
|
||||
&& LARGE_OFF_T % 2147483647 == 1)
|
||||
? 1 : -1];
|
||||
@@ -12244,7 +12232,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by sqlite $as_me 3.28.0, which was
|
||||
This file was extended by sqlite $as_me 3.27.0, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -12310,7 +12298,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
sqlite config.status 3.28.0
|
||||
sqlite config.status 3.27.0
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@@ -52,10 +52,8 @@
|
||||
|
||||
SECURITY: If the fts3 extension is used in an environment where potentially
|
||||
malicious users may execute arbitrary SQL (i.e. gears), they should be
|
||||
prevented from invoking the fts3_tokenizer() function. The
|
||||
fts3_tokenizer() function is disabled by default. It is only enabled
|
||||
by SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER. Do not enable it in
|
||||
security sensitive environments.
|
||||
prevented from invoking the fts3_tokenizer() function, possibly using the
|
||||
authorisation callback.
|
||||
|
||||
See "Sample code" below for an example of calling the fts3_tokenizer()
|
||||
function from C code.
|
||||
|
||||
+1
-1
@@ -1873,7 +1873,7 @@ static int fts3ScanInteriorNode(
|
||||
zCsr += fts3GetVarint32(zCsr, &nSuffix);
|
||||
|
||||
assert( nPrefix>=0 && nSuffix>=0 );
|
||||
if( nPrefix>zCsr-zNode || nSuffix>zEnd-zCsr || nSuffix==0 ){
|
||||
if( nPrefix>zCsr-zNode || nSuffix>zEnd-zCsr ){
|
||||
rc = FTS_CORRUPT_VTAB;
|
||||
goto finish_scan;
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ static void fts3SnippetDetails(
|
||||
char *pCsr = pPhrase->pTail;
|
||||
int iCsr = pPhrase->iTail;
|
||||
|
||||
while( iCsr<(iStart+pIter->nSnippet) && iCsr>=iStart ){
|
||||
while( iCsr<(iStart+pIter->nSnippet) ){
|
||||
int j;
|
||||
u64 mPhrase = (u64)1 << i;
|
||||
u64 mPos = (u64)1 << (iCsr - iStart);
|
||||
@@ -1543,7 +1543,7 @@ static int fts3ExprTermOffsetInit(Fts3Expr *pExpr, int iPhrase, void *ctx){
|
||||
nTerm = pExpr->pPhrase->nToken;
|
||||
if( pList ){
|
||||
fts3GetDeltaPosition(&pList, &iPos);
|
||||
assert_fts3_nc( iPos>=0 );
|
||||
assert( iPos>=0 );
|
||||
}
|
||||
|
||||
for(iTerm=0; iTerm<nTerm; iTerm++){
|
||||
@@ -1653,7 +1653,7 @@ void sqlite3Fts3Offsets(
|
||||
/* All offsets for this column have been gathered. */
|
||||
rc = SQLITE_DONE;
|
||||
}else{
|
||||
assert_fts3_nc( iCurrent<=iMinPos );
|
||||
assert( iCurrent<=iMinPos );
|
||||
if( 0==(0xFE&*pTerm->pList) ){
|
||||
pTerm->pList = 0;
|
||||
}else{
|
||||
|
||||
@@ -98,7 +98,7 @@ static int fts3termConnectMethod(
|
||||
nByte = sizeof(Fts3termTable) + sizeof(Fts3Table) + nDb + nFts3 + 2;
|
||||
p = (Fts3termTable *)sqlite3_malloc64(nByte);
|
||||
if( !p ) return SQLITE_NOMEM;
|
||||
memset(p, 0, (size_t)nByte);
|
||||
memset(p, 0, nByte);
|
||||
|
||||
p->pFts3Tab = (Fts3Table *)&p[1];
|
||||
p->pFts3Tab->zDb = (char *)&p->pFts3Tab[1];
|
||||
|
||||
@@ -106,9 +106,7 @@ static void fts3TokenizerFunc(
|
||||
return;
|
||||
}
|
||||
}
|
||||
if( fts3TokenizerEnabled(context) ){
|
||||
sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
|
||||
}
|
||||
sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
int sqlite3Fts3IsIdChar(char c){
|
||||
|
||||
@@ -1348,9 +1348,7 @@ static int fts3SegReaderNext(
|
||||
|
||||
/* If iCurrentBlock>=iLeafEndBlock, this is an EOF condition. All leaf
|
||||
** blocks have already been traversed. */
|
||||
#ifdef CORRUPT_DB
|
||||
assert( pReader->iCurrentBlock<=pReader->iLeafEndBlock || CORRUPT_DB );
|
||||
#endif
|
||||
assert( pReader->iCurrentBlock<=pReader->iLeafEndBlock );
|
||||
if( pReader->iCurrentBlock>=pReader->iLeafEndBlock ){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
@@ -3237,10 +3235,8 @@ static int fts3SegmentMerge(
|
||||
if( rc!=SQLITE_OK ) goto finished;
|
||||
|
||||
assert( csr.nSegment>0 );
|
||||
assert_fts3_nc( iNewLevel>=getAbsoluteLevel(p, iLangid, iIndex, 0) );
|
||||
assert_fts3_nc(
|
||||
iNewLevel<getAbsoluteLevel(p, iLangid, iIndex,FTS3_SEGDIR_MAXLEVEL)
|
||||
);
|
||||
assert( iNewLevel>=getAbsoluteLevel(p, iLangid, iIndex, 0) );
|
||||
assert( iNewLevel<getAbsoluteLevel(p, iLangid, iIndex,FTS3_SEGDIR_MAXLEVEL) );
|
||||
|
||||
memset(&filter, 0, sizeof(Fts3SegFilter));
|
||||
filter.flags = FTS3_SEGMENT_REQUIRE_POS;
|
||||
|
||||
@@ -738,7 +738,7 @@ proc print_categories {lMap} {
|
||||
int bToken = aArray[ aFts5UnicodeData[iTbl] & 0x1F ];
|
||||
int n = (aFts5UnicodeData[iTbl] >> 5) + i;
|
||||
for(; i<128 && i<n; i++){
|
||||
aAscii[i] = (u8)bToken;
|
||||
aAscii[i] = bToken;
|
||||
}
|
||||
iTbl++;
|
||||
}
|
||||
|
||||
+2
-2
@@ -162,7 +162,7 @@ struct Fts5PhraseIter {
|
||||
** Save the pointer passed as the second argument as the extension functions
|
||||
** "auxiliary data". The pointer may then be retrieved by the current or any
|
||||
** future invocation of the same fts5 extension function made as part of
|
||||
** the same MATCH query using the xGetAuxdata() API.
|
||||
** of the same MATCH query using the xGetAuxdata() API.
|
||||
**
|
||||
** Each extension function is allocated a single auxiliary data slot for
|
||||
** each FTS query (MATCH expression). If the extension function is invoked
|
||||
@@ -177,7 +177,7 @@ struct Fts5PhraseIter {
|
||||
** The xDelete callback, if one is specified, is also invoked on the
|
||||
** auxiliary data pointer after the FTS5 query has finished.
|
||||
**
|
||||
** If an error (e.g. an OOM condition) occurs within this function,
|
||||
** If an error (e.g. an OOM condition) occurs within this function, an
|
||||
** the auxiliary data is set to NULL and an error code returned. If the
|
||||
** xDelete parameter was not NULL, it is invoked on the auxiliary data
|
||||
** pointer before returning.
|
||||
|
||||
+1
-2
@@ -583,9 +583,8 @@ void sqlite3Fts5HashClear(Fts5Hash*);
|
||||
|
||||
int sqlite3Fts5HashQuery(
|
||||
Fts5Hash*, /* Hash table to query */
|
||||
int nPre,
|
||||
const char *pTerm, int nTerm, /* Query term */
|
||||
void **ppObj, /* OUT: Pointer to doclist for pTerm */
|
||||
const u8 **ppDoclist, /* OUT: Pointer to doclist for pTerm */
|
||||
int *pnDoclist /* OUT: Size of doclist in bytes */
|
||||
);
|
||||
|
||||
|
||||
+2
-2
@@ -353,7 +353,7 @@ static int fts5SnippetScore(
|
||||
sqlite3_int64 iAdj = iFirst - (nToken - (iLast-iFirst)) / 2;
|
||||
if( (iAdj+nToken)>nDocsize ) iAdj = nDocsize - nToken;
|
||||
if( iAdj<0 ) iAdj = 0;
|
||||
*piPos = (int)iAdj;
|
||||
*piPos = iAdj;
|
||||
}
|
||||
|
||||
return rc;
|
||||
@@ -581,7 +581,7 @@ static int fts5Bm25GetData(
|
||||
if( p==0 ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
memset(p, 0, (size_t)nByte);
|
||||
memset(p, 0, nByte);
|
||||
p->nPhrase = nPhrase;
|
||||
p->aIDF = (double*)&p[1];
|
||||
p->aFreq = &p->aIDF[nPhrase];
|
||||
|
||||
@@ -27,7 +27,7 @@ int sqlite3Fts5BufferSize(int *pRc, Fts5Buffer *pBuf, u32 nByte){
|
||||
*pRc = SQLITE_NOMEM;
|
||||
return 1;
|
||||
}else{
|
||||
pBuf->nSpace = (int)nNew;
|
||||
pBuf->nSpace = nNew;
|
||||
pBuf->p = pNew;
|
||||
}
|
||||
}
|
||||
@@ -251,7 +251,7 @@ void *sqlite3Fts5MallocZero(int *pRc, sqlite3_int64 nByte){
|
||||
if( pRet==0 ){
|
||||
if( nByte>0 ) *pRc = SQLITE_NOMEM;
|
||||
}else{
|
||||
memset(pRet, 0, (size_t)nByte);
|
||||
memset(pRet, 0, nByte);
|
||||
}
|
||||
}
|
||||
return pRet;
|
||||
|
||||
@@ -325,7 +325,7 @@ static int fts5ConfigParseSpecial(
|
||||
rc = SQLITE_ERROR;
|
||||
}else{
|
||||
rc = sqlite3Fts5GetTokenizer(pGlobal,
|
||||
(const char**)azArg, (int)nArg, &pConfig->pTok, &pConfig->pTokApi,
|
||||
(const char**)azArg, nArg, &pConfig->pTok, &pConfig->pTokApi,
|
||||
pzErr
|
||||
);
|
||||
}
|
||||
@@ -435,7 +435,7 @@ static const char *fts5ConfigGobbleWord(
|
||||
if( zOut==0 ){
|
||||
*pRc = SQLITE_NOMEM;
|
||||
}else{
|
||||
memcpy(zOut, zIn, (size_t)(nIn+1));
|
||||
memcpy(zOut, zIn, nIn+1);
|
||||
if( fts5_isopenquote(zOut[0]) ){
|
||||
int ii = fts5Dequote(zOut);
|
||||
zRet = &zIn[ii];
|
||||
|
||||
@@ -1487,7 +1487,7 @@ Fts5ExprNearset *sqlite3Fts5ParseNearset(
|
||||
if( pRet==0 ){
|
||||
pParse->rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
memset(pRet, 0, (size_t)nByte);
|
||||
memset(pRet, 0, nByte);
|
||||
}
|
||||
}else if( (pNear->nPhrase % SZALLOC)==0 ){
|
||||
int nNew = pNear->nPhrase + SZALLOC;
|
||||
@@ -1563,7 +1563,7 @@ static int fts5ParseTokenize(
|
||||
if( pSyn==0 ){
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
memset(pSyn, 0, (size_t)nByte);
|
||||
memset(pSyn, 0, nByte);
|
||||
pSyn->zTerm = ((char*)pSyn) + sizeof(Fts5ExprTerm) + sizeof(Fts5Buffer);
|
||||
memcpy(pSyn->zTerm, pToken, nToken);
|
||||
pSyn->pSynonym = pPhrase->aTerm[pPhrase->nTerm-1].pSynonym;
|
||||
@@ -1723,7 +1723,7 @@ int sqlite3Fts5ExprClonePhrase(
|
||||
nByte = sizeof(Fts5Colset) + (pColsetOrig->nCol-1) * sizeof(int);
|
||||
pColset = (Fts5Colset*)sqlite3Fts5MallocZero(&rc, nByte);
|
||||
if( pColset ){
|
||||
memcpy(pColset, pColsetOrig, (size_t)nByte);
|
||||
memcpy(pColset, pColsetOrig, nByte);
|
||||
}
|
||||
pNew->pRoot->pNear->pColset = pColset;
|
||||
}
|
||||
@@ -1940,7 +1940,7 @@ static Fts5Colset *fts5CloneColset(int *pRc, Fts5Colset *pOrig){
|
||||
sqlite3_int64 nByte = sizeof(Fts5Colset) + (pOrig->nCol-1) * sizeof(int);
|
||||
pRet = (Fts5Colset*)sqlite3Fts5MallocZero(pRc, nByte);
|
||||
if( pRet ){
|
||||
memcpy(pRet, pOrig, (size_t)nByte);
|
||||
memcpy(pRet, pOrig, nByte);
|
||||
}
|
||||
}else{
|
||||
pRet = 0;
|
||||
|
||||
+20
-43
@@ -103,7 +103,7 @@ int sqlite3Fts5HashNew(Fts5Config *pConfig, Fts5Hash **ppNew, int *pnByte){
|
||||
*ppNew = 0;
|
||||
rc = SQLITE_NOMEM;
|
||||
}else{
|
||||
memset(pNew->aSlot, 0, (size_t)nByte);
|
||||
memset(pNew->aSlot, 0, nByte);
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
@@ -187,25 +187,19 @@ static int fts5HashResize(Fts5Hash *pHash){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
static int fts5HashAddPoslistSize(
|
||||
Fts5Hash *pHash,
|
||||
Fts5HashEntry *p,
|
||||
Fts5HashEntry *p2
|
||||
){
|
||||
int nRet = 0;
|
||||
static void fts5HashAddPoslistSize(Fts5Hash *pHash, Fts5HashEntry *p){
|
||||
if( p->iSzPoslist ){
|
||||
u8 *pPtr = p2 ? (u8*)p2 : (u8*)p;
|
||||
int nData = p->nData;
|
||||
u8 *pPtr = (u8*)p;
|
||||
if( pHash->eDetail==FTS5_DETAIL_NONE ){
|
||||
assert( nData==p->iSzPoslist );
|
||||
assert( p->nData==p->iSzPoslist );
|
||||
if( p->bDel ){
|
||||
pPtr[nData++] = 0x00;
|
||||
pPtr[p->nData++] = 0x00;
|
||||
if( p->bContent ){
|
||||
pPtr[nData++] = 0x00;
|
||||
pPtr[p->nData++] = 0x00;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
int nSz = (nData - p->iSzPoslist - 1); /* Size in bytes */
|
||||
int nSz = (p->nData - p->iSzPoslist - 1); /* Size in bytes */
|
||||
int nPos = nSz*2 + p->bDel; /* Value of nPos field */
|
||||
|
||||
assert( p->bDel==0 || p->bDel==1 );
|
||||
@@ -215,19 +209,14 @@ static int fts5HashAddPoslistSize(
|
||||
int nByte = sqlite3Fts5GetVarintLen((u32)nPos);
|
||||
memmove(&pPtr[p->iSzPoslist + nByte], &pPtr[p->iSzPoslist + 1], nSz);
|
||||
sqlite3Fts5PutVarint(&pPtr[p->iSzPoslist], nPos);
|
||||
nData += (nByte-1);
|
||||
p->nData += (nByte-1);
|
||||
}
|
||||
}
|
||||
|
||||
nRet = nData - p->nData;
|
||||
if( p2==0 ){
|
||||
p->iSzPoslist = 0;
|
||||
p->bDel = 0;
|
||||
p->bContent = 0;
|
||||
p->nData = nData;
|
||||
}
|
||||
p->iSzPoslist = 0;
|
||||
p->bDel = 0;
|
||||
p->bContent = 0;
|
||||
}
|
||||
return nRet;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -284,7 +273,7 @@ int sqlite3Fts5HashWrite(
|
||||
p = (Fts5HashEntry*)sqlite3_malloc64(nByte);
|
||||
if( !p ) return SQLITE_NOMEM;
|
||||
memset(p, 0, sizeof(Fts5HashEntry));
|
||||
p->nAlloc = (int)nByte;
|
||||
p->nAlloc = nByte;
|
||||
zKey = fts5EntryKey(p);
|
||||
zKey[0] = bByte;
|
||||
memcpy(&zKey[1], pToken, nToken);
|
||||
@@ -339,7 +328,7 @@ int sqlite3Fts5HashWrite(
|
||||
/* If this is a new rowid, append the 4-byte size field for the previous
|
||||
** entry, and the new rowid for this entry. */
|
||||
if( iRowid!=p->iRowid ){
|
||||
fts5HashAddPoslistSize(pHash, p, 0);
|
||||
fts5HashAddPoslistSize(pHash, p);
|
||||
p->nData += sqlite3Fts5PutVarint(&pPtr[p->nData], iRowid - p->iRowid);
|
||||
p->iRowid = iRowid;
|
||||
bNew = 1;
|
||||
@@ -456,9 +445,7 @@ static int fts5HashEntrySort(
|
||||
for(iSlot=0; iSlot<pHash->nSlot; iSlot++){
|
||||
Fts5HashEntry *pIter;
|
||||
for(pIter=pHash->aSlot[iSlot]; pIter; pIter=pIter->pHashNext){
|
||||
if( pTerm==0
|
||||
|| (pIter->nKey+1>=nTerm && 0==memcmp(fts5EntryKey(pIter), pTerm, nTerm))
|
||||
){
|
||||
if( pTerm==0 || 0==memcmp(fts5EntryKey(pIter), pTerm, nTerm) ){
|
||||
Fts5HashEntry *pEntry = pIter;
|
||||
pEntry->pScanNext = 0;
|
||||
for(i=0; ap[i]; i++){
|
||||
@@ -486,9 +473,8 @@ static int fts5HashEntrySort(
|
||||
*/
|
||||
int sqlite3Fts5HashQuery(
|
||||
Fts5Hash *pHash, /* Hash table to query */
|
||||
int nPre,
|
||||
const char *pTerm, int nTerm, /* Query term */
|
||||
void **ppOut, /* OUT: Pointer to new object */
|
||||
const u8 **ppDoclist, /* OUT: Pointer to doclist for pTerm */
|
||||
int *pnDoclist /* OUT: Size of doclist in bytes */
|
||||
){
|
||||
unsigned int iHash = fts5HashKey(pHash->nSlot, (const u8*)pTerm, nTerm);
|
||||
@@ -502,20 +488,11 @@ int sqlite3Fts5HashQuery(
|
||||
}
|
||||
|
||||
if( p ){
|
||||
int nHashPre = sizeof(Fts5HashEntry) + nTerm + 1;
|
||||
int nList = p->nData - nHashPre;
|
||||
u8 *pRet = (u8*)(*ppOut = sqlite3_malloc64(nPre + nList + 10));
|
||||
if( pRet ){
|
||||
Fts5HashEntry *pFaux = (Fts5HashEntry*)&pRet[nPre-nHashPre];
|
||||
memcpy(&pRet[nPre], &((u8*)p)[nHashPre], nList);
|
||||
nList += fts5HashAddPoslistSize(pHash, p, pFaux);
|
||||
*pnDoclist = nList;
|
||||
}else{
|
||||
*pnDoclist = 0;
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
fts5HashAddPoslistSize(pHash, p);
|
||||
*ppDoclist = (const u8*)&zKey[nTerm+1];
|
||||
*pnDoclist = p->nData - (sizeof(Fts5HashEntry) + nTerm + 1);
|
||||
}else{
|
||||
*ppOut = 0;
|
||||
*ppDoclist = 0;
|
||||
*pnDoclist = 0;
|
||||
}
|
||||
|
||||
@@ -548,7 +525,7 @@ void sqlite3Fts5HashScanEntry(
|
||||
if( (p = pHash->pScan) ){
|
||||
char *zKey = fts5EntryKey(p);
|
||||
int nTerm = (int)strlen(zKey);
|
||||
fts5HashAddPoslistSize(pHash, p, 0);
|
||||
fts5HashAddPoslistSize(pHash, p);
|
||||
*pzTerm = zKey;
|
||||
*ppDoclist = (const u8*)&zKey[nTerm+1];
|
||||
*pnDoclist = p->nData - (sizeof(Fts5HashEntry) + nTerm + 1);
|
||||
|
||||
+11
-21
@@ -2457,40 +2457,31 @@ static void fts5SegIterHashInit(
|
||||
int flags, /* Mask of FTS5INDEX_XXX flags */
|
||||
Fts5SegIter *pIter /* Object to populate */
|
||||
){
|
||||
const u8 *pList = 0;
|
||||
int nList = 0;
|
||||
const u8 *z = 0;
|
||||
int n = 0;
|
||||
Fts5Data *pLeaf = 0;
|
||||
|
||||
assert( p->pHash );
|
||||
assert( p->rc==SQLITE_OK );
|
||||
|
||||
if( pTerm==0 || (flags & FTS5INDEX_QUERY_SCAN) ){
|
||||
const u8 *pList = 0;
|
||||
|
||||
p->rc = sqlite3Fts5HashScanInit(p->pHash, (const char*)pTerm, nTerm);
|
||||
sqlite3Fts5HashScanEntry(p->pHash, (const char**)&z, &pList, &nList);
|
||||
n = (z ? (int)strlen((const char*)z) : 0);
|
||||
if( pList ){
|
||||
pLeaf = fts5IdxMalloc(p, sizeof(Fts5Data));
|
||||
if( pLeaf ){
|
||||
pLeaf->p = (u8*)pList;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
p->rc = sqlite3Fts5HashQuery(p->pHash, sizeof(Fts5Data),
|
||||
(const char*)pTerm, nTerm, (void**)&pLeaf, &nList
|
||||
);
|
||||
if( pLeaf ){
|
||||
pLeaf->p = (u8*)&pLeaf[1];
|
||||
}
|
||||
pIter->flags |= FTS5_SEGITER_ONETERM;
|
||||
sqlite3Fts5HashQuery(p->pHash, (const char*)pTerm, nTerm, &pList, &nList);
|
||||
z = pTerm;
|
||||
n = nTerm;
|
||||
pIter->flags |= FTS5_SEGITER_ONETERM;
|
||||
}
|
||||
|
||||
if( pLeaf ){
|
||||
if( pList ){
|
||||
Fts5Data *pLeaf;
|
||||
sqlite3Fts5BufferSet(&p->rc, &pIter->term, n, z);
|
||||
pLeaf = fts5IdxMalloc(p, sizeof(Fts5Data));
|
||||
if( pLeaf==0 ) return;
|
||||
pLeaf->p = (u8*)pList;
|
||||
pLeaf->nn = pLeaf->szLeaf = nList;
|
||||
pIter->pLeaf = pLeaf;
|
||||
pIter->iLeafOffset = fts5GetVarint(pLeaf->p, (u64*)&pIter->iRowid);
|
||||
@@ -4178,14 +4169,13 @@ static void fts5TrimSegments(Fts5Index *p, Fts5Iter *pIter){
|
||||
/* Set up the new page-index array */
|
||||
fts5BufferAppendVarint(&p->rc, &buf, 4);
|
||||
if( pSeg->iLeafPgno==pSeg->iTermLeafPgno
|
||||
&& pSeg->iEndofDoclist<pData->szLeaf
|
||||
&& pSeg->iPgidxOff<=pData->nn
|
||||
){
|
||||
&& pSeg->iEndofDoclist<pData->szLeaf
|
||||
){
|
||||
int nDiff = pData->szLeaf - pSeg->iEndofDoclist;
|
||||
fts5BufferAppendVarint(&p->rc, &buf, buf.n - 1 - nDiff - 4);
|
||||
fts5BufferAppendBlob(&p->rc, &buf,
|
||||
pData->nn - pSeg->iPgidxOff, &pData->p[pSeg->iPgidxOff]
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
pSeg->pSeg->pgnoFirst = pSeg->iTermLeafPgno;
|
||||
|
||||
@@ -633,7 +633,7 @@ static int fts5OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
|
||||
pCsr = (Fts5Cursor*)sqlite3_malloc64(nByte);
|
||||
if( pCsr ){
|
||||
Fts5Global *pGlobal = pTab->pGlobal;
|
||||
memset(pCsr, 0, (size_t)nByte);
|
||||
memset(pCsr, 0, nByte);
|
||||
pCsr->aColumnSize = (int*)&pCsr[1];
|
||||
pCsr->pNext = pGlobal->pCsr;
|
||||
pGlobal->pCsr = pCsr;
|
||||
@@ -914,7 +914,7 @@ static int fts5CursorFirstSorted(
|
||||
nByte = sizeof(Fts5Sorter) + sizeof(int) * (nPhrase-1);
|
||||
pSorter = (Fts5Sorter*)sqlite3_malloc64(nByte);
|
||||
if( pSorter==0 ) return SQLITE_NOMEM;
|
||||
memset(pSorter, 0, (size_t)nByte);
|
||||
memset(pSorter, 0, nByte);
|
||||
pSorter->nIdx = nPhrase;
|
||||
|
||||
/* TODO: It would be better to have some system for reusing statement
|
||||
|
||||
@@ -289,7 +289,7 @@ int sqlite3Fts5StorageOpen(
|
||||
*pp = p = (Fts5Storage*)sqlite3_malloc64(nByte);
|
||||
if( !p ) return SQLITE_NOMEM;
|
||||
|
||||
memset(p, 0, (size_t)nByte);
|
||||
memset(p, 0, nByte);
|
||||
p->aTotalSize = (i64*)&p[1];
|
||||
p->pConfig = pConfig;
|
||||
p->pIndex = pIndex;
|
||||
|
||||
@@ -769,7 +769,7 @@ void sqlite3Fts5UnicodeAscii(u8 *aArray, u8 *aAscii){
|
||||
int bToken = aArray[ aFts5UnicodeData[iTbl] & 0x1F ];
|
||||
int n = (aFts5UnicodeData[iTbl] >> 5) + i;
|
||||
for(; i<128 && i<n; i++){
|
||||
aAscii[i] = (u8)bToken;
|
||||
aAscii[i] = bToken;
|
||||
}
|
||||
iTbl++;
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ proc funk {} {
|
||||
db eval { UPDATE n1_config SET v=50 WHERE k='version' }
|
||||
set fd [db incrblob main n1_data block 10]
|
||||
fconfigure $fd -encoding binary -translation binary
|
||||
# puts -nonewline $fd "\x44\x45"
|
||||
puts -nonewline $fd "\x44\x45"
|
||||
close $fd
|
||||
}
|
||||
db func funk funk
|
||||
@@ -603,38 +603,6 @@ do_execsql_test 23.2 {
|
||||
SELECT * FROM t11, t10 WHERE t10.rowid IS NULL;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
do_execsql_test 24.0 {
|
||||
CREATE VIRTUAL TABLE t12 USING fts5(x, detail=%DETAIL%);
|
||||
INSERT INTO t12 VALUES('aaaa');
|
||||
}
|
||||
do_execsql_test 24.1 {
|
||||
BEGIN;
|
||||
DELETE FROM t12 WHERE rowid=1;
|
||||
SELECT * FROM t12('aaaa');
|
||||
INSERT INTO t12 VALUES('aaaa');
|
||||
END;
|
||||
}
|
||||
do_execsql_test 24.2 {
|
||||
INSERT INTO t12(t12) VALUES('integrity-check');
|
||||
}
|
||||
do_execsql_test 24.3 {
|
||||
SELECT * FROM t12('aaaa');
|
||||
} {aaaa}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
do_execsql_test 25.0 {
|
||||
CREATE VIRTUAL TABLE t13 USING fts5(x, detail=%DETAIL%);
|
||||
}
|
||||
do_execsql_test 25.1 {
|
||||
BEGIN;
|
||||
INSERT INTO t13 VALUES('AAAA');
|
||||
SELECT * FROM t13('BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB*');
|
||||
|
||||
END;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
expand_all_sql db
|
||||
|
||||
@@ -275,37 +275,6 @@ do_execsql_test 9.3 {
|
||||
9 10
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Test that aux. functions may not be used in aggregate queries.
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test 10.0 {
|
||||
CREATE VIRTUAL TABLE t1 USING fts5(x, y, z);
|
||||
INSERT INTO t1 VALUES('a', 'one two', 1);
|
||||
INSERT INTO t1 VALUES('b', 'two three', 2);
|
||||
INSERT INTO t1 VALUES('c', 'three four', 1);
|
||||
INSERT INTO t1 VALUES('d', 'four five', 2);
|
||||
INSERT INTO t1 VALUES('e', 'five six', 1);
|
||||
INSERT INTO t1 VALUES('f', 'six seven', 2);
|
||||
}
|
||||
|
||||
proc firstcol {cmd} { $cmd xColumnText 0 }
|
||||
sqlite3_fts5_create_function db firstcol firstcol
|
||||
|
||||
do_execsql_test 10.1.1 {
|
||||
SELECT firstcol(t1) FROM t1
|
||||
} {a b c d e f}
|
||||
do_execsql_test 10.1.2 {
|
||||
SELECT group_concat(x, '.') FROM t1
|
||||
} {a.b.c.d.e.f}
|
||||
|
||||
do_catchsql_test 10.1.3 {
|
||||
SELECT group_concat(firstcol(t1), '.') FROM t1
|
||||
} {1 {unable to use function firstcol in the requested context}}
|
||||
|
||||
do_catchsql_test 10.1.4 {
|
||||
SELECT group_concat(firstcol(t1), '.') FROM t1 GROUP BY rowid
|
||||
} {1 {unable to use function firstcol in the requested context}}
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
@@ -7781,224 +7781,6 @@ do_execsql_test 55.2 {
|
||||
ROLLBACK TO one;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_test 56.0 {
|
||||
sqlite3 db {}
|
||||
db deserialize [decode_hexdb {
|
||||
.open --hexdb
|
||||
| size 24576 pagesize 4096 filename crash-2acc487d09f033.db
|
||||
| page 1 offset 0
|
||||
| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
|
||||
| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 06 .....@ ........
|
||||
| 32: 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 04 ................
|
||||
| 48: 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ................
|
||||
| 96: 00 00 00 00 0d 00 00 00 06 0e 0f 00 0f aa 0f 53 ...............S
|
||||
| 112: 0e e8 0e 8b 0e 33 0e 0f 00 00 00 00 00 00 00 00 .....3..........
|
||||
| 3584: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 ................
|
||||
| 3600: 06 06 17 11 11 01 31 74 61 62 6c 65 62 62 62 62 ......1tablebbbb
|
||||
| 3616: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 62 62 .CREATE TABLE bb
|
||||
| 3632: 28 61 29 56 05 06 17 1f 1f 01 7d 74 61 62 6c 65 (a)V.......table
|
||||
| 3648: 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 6f 6e 66 t1_configt1_conf
|
||||
| 3664: 69 67 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 ig.CREATE TABLE
|
||||
| 3680: 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b 20 50 52 't1_config'(k PR
|
||||
| 3696: 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 20 57 49 IMARY KEY, v) WI
|
||||
| 3712: 54 48 4f 55 54 20 52 4f 57 49 44 5b 04 07 17 21 THOUT ROWID[...!
|
||||
| 3728: 21 01 81 01 74 61 62 6c 65 74 31 5f 64 6f 63 73 !...tablet1_docs
|
||||
| 3744: 69 7a 65 74 31 4f 64 6f 63 73 69 7a 65 04 43 52 izet1Odocsize.CR
|
||||
| 3760: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 64 EATE TABLE 't1_d
|
||||
| 3776: 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 54 45 47 ocsize'(id INTEG
|
||||
| 3792: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
|
||||
| 3808: 73 7a 20 42 4c 4f 42 29 69 03 07 17 19 19 01 81 sz BLOB)i.......
|
||||
| 3824: 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 31 5f 69 -tablet1_idxt1_i
|
||||
| 3840: 64 78 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 dx.CREATE TABLE
|
||||
| 3856: 27 74 31 5f 69 64 78 27 28 73 65 67 69 64 2c 20 't1_idx'(segid,
|
||||
| 3872: 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 52 49 4d term, pgno, PRIM
|
||||
| 3888: 41 52 59 20 4b 45 59 28 73 65 67 69 64 2c 20 74 ARY KEY(segid, t
|
||||
| 3904: 65 72 6d 29 29 20 57 49 54 48 4f 55 54 20 52 4f erm)) WITHOUT RO
|
||||
| 3920: 57 49 44 55 02 07 17 1b 1b 01 81 01 74 61 62 6c WIDU........tabl
|
||||
| 3936: 65 74 31 5f 64 61 74 61 74 31 5f 64 61 74 61 02 et1_datat1_data.
|
||||
| 3952: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
|
||||
| 3968: 5f 64 61 74 61 27 28 69 64 20 49 4e 54 45 47 45 _data'(id INTEGE
|
||||
| 3984: 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 R PRIMARY KEY, b
|
||||
| 4000: 6c 6f 63 6b 20 42 4c 4f 42 29 54 01 07 17 11 11 lock BLOB)T.....
|
||||
| 4016: 08 81 15 74 61 62 6c 65 74 31 74 31 43 52 45 41 ...tablet1t1CREA
|
||||
| 4032: 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 TE VIRTUAL TABLE
|
||||
| 4048: 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 28 61 t1 USING fts5(a
|
||||
| 4064: 2c 62 2c 70 72 65 66 69 78 3d 22 32 2c 32 2c 33 ,b,prefix=.2,2,3
|
||||
| 4080: 2c 34 22 2c 20 63 6f 6e 74 65 6e 74 3d 22 22 29 ,4., content=..)
|
||||
| page 2 offset 4096
|
||||
| 0: 0d 0b 6a 00 37 09 4c 02 0f e7 09 4c 0f c6 0f a4 ..j.7.L....L....
|
||||
| 16: 0f 88 0f 6d 0f 4b 0f 2c 0f 0e 0e ec 0e cd 0e ad ...m.K.,........
|
||||
| 32: 0e 8e 0e 6c 0e 4b 0e 29 0e 08 0d e6 0d c4 0d b5 ...l.K.)........
|
||||
| 48: 0d 97 0d 76 0d 54 0d 31 0d 15 0c f3 0c d3 0c b5 ...v.T.1........
|
||||
| 64: 0c 95 0c 73 0c 54 0c 32 0c 10 0b ee 0b cc 0b b0 ...s.T.2........
|
||||
| 80: 0b 8d 0b 7e 0b 48 0b 2e 0b 0b 0a ef 0a cc 0a ad ...~.H..........
|
||||
| 96: 0a 8c 0a 6d 0a 4d 0a 2b 0a 0c 09 ec 09 ca 09 a8 ...m.M.+........
|
||||
| 112: 09 86 09 63 0f f1 00 00 00 00 00 00 00 00 00 00 ...c............
|
||||
| 2368: 00 00 00 00 00 00 00 00 00 00 00 00 15 0a 03 00 ................
|
||||
| 2384: 30 00 00 00 01 01 03 35 00 03 01 01 12 02 01 12 0......5........
|
||||
| 2400: 03 01 11 1c 8c 80 80 80 80 10 03 00 3e 00 00 00 ............>...
|
||||
| 2416: 17 01 05 05 34 74 61 62 6c 03 02 03 01 04 77 68 ....4tabl.....wh
|
||||
| 2432: 65 72 03 02 06 09 1b 8c 80 80 80 80 0f 03 00 3c er.............<
|
||||
| 2448: 00 00 00 16 05 34 66 74 73 34 03 02 02 01 04 6e .....4fts4.....n
|
||||
| 2464: 75 6d 62 03 06 01 04 09 1b 8c 80 80 80 80 0e 03 umb.............
|
||||
| 2480: 00 3c 00 00 00 16 04 33 74 68 65 03 06 01 01 04 .<.....3the.....
|
||||
| 2496: 01 03 77 68 65 03 02 04 04 0a 1b 8c 80 80 80 80 ..whe...........
|
||||
| 2512: 0d 03 00 3c 00 00 00 16 04 33 6e 75 6d 03 06 01 ...<.....3num...
|
||||
| 2528: 01 05 01 03 74 61 62 03 02 03 04 0a 19 8c 80 80 ....tab.........
|
||||
| 2544: 80 80 0c 03 00 38 00 00 00 14 03 32 77 68 03 02 .....8.....2wh..
|
||||
| 2560: 04 00 04 33 66 74 73 03 02 02 04 07 18 8c 80 80 ...3fts.........
|
||||
| 2576: 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 03 02 .....6.....2ta..
|
||||
| 2592: 03 02 01 68 03 06 01 01 04 04 07 1b 8c 80 80 80 ...h............
|
||||
| 2608: 80 09 03 00 3c 00 00 00 16 03 32 6e 75 03 06 01 ....<.....2nu...
|
||||
| 2624: 01 05 01 02 6f 66 03 3b 01 01 06 04 09 19 8c 80 ....of.;........
|
||||
| 2640: 80 80 80 09 03 00 38 00 00 00 14 03 32 66 74 03 ......8.....2ft.
|
||||
| 2656: 02 02 01 02 69 73 03 06 01 01 03 04 07 18 8c 80 ....is..........
|
||||
| 2672: 80 80 80 08 03 00 36 00 00 00 13 02 31 74 03 08 ......6.....1t..
|
||||
| 2688: 03 01 01 04 01 01 77 03 02 04 04 09 1a 8c 80 80 ......w.........
|
||||
| 2704: 80 80 07 03 00 3a ff 00 00 15 02 31 6e 03 08 01 .....:.....1n...
|
||||
| 2720: 01 02 05 01 01 6f 03 06 01 01 06 04 09 18 8c 80 .....o..........
|
||||
| 2736: 80 80 80 06 03 00 36 00 00 00 13 04 02 31 66 03 ......6......1f.
|
||||
| 2752: 02 02 01 01 69 03 06 01 01 03 05 06 1c 8c 80 80 ....i...........
|
||||
| 2768: 80 80 05 03 00 3e 00 00 00 17 04 30 74 68 65 03 .....>.....0the.
|
||||
| 2784: 06 00 f1 04 01 05 77 68 65 72 65 03 02 04 0a 15 ......where.....
|
||||
| 2800: 8c 80 80 80 80 04 03 00 30 00 00 00 11 01 01 06 ........0.......
|
||||
| 2816: 06 30 74 61 62 6c 65 03 02 03 07 1c 8c 80 80 80 .0table.........
|
||||
| 2832: 80 03 03 00 3e 00 00 00 17 07 30 6e 75 6d 62 65 ....>.....0numbe
|
||||
| 2848: 72 03 06 01 01 05 01 02 6f 66 03 06 04 0d 13 8c r.......of......
|
||||
| 2864: 80 80 80 80 02 03 00 2c 00 00 00 0f 01 01 03 02 .......,........
|
||||
| 2880: 30 6e 03 06 01 01 02 07 1b 8c 80 80 80 80 01 03 0n..............
|
||||
| 2896: 00 3c 00 00 00 16 08 30 66 74 73 34 61 75 78 03 .<.....0fts4aux.
|
||||
| 2912: 02 02 01 02 69 73 03 06 04 0c 00 00 00 14 2a 00 ....is........*.
|
||||
| 2928: 00 00 01 01 02 24 00 02 01 01 12 02 01 12 08 88 .....$..........
|
||||
| 2944: 80 80 80 80 12 03 00 16 00 00 00 05 02 1c 88 80 ................
|
||||
| 2960: 80 80 80 11 03 00 3e 00 00 00 17 05 34 72 6f 77 ......>.....4row
|
||||
| 2976: 73 02 06 01 01 05 01 04 74 68 65 72 02 02 04 0b s.......ther....
|
||||
| 2992: 15 88 80 80 80 80 10 03 00 30 00 00 00 11 02 01 .........0......
|
||||
| 3008: 01 07 05 34 62 65 74 77 02 02 04 08 1b 88 80 80 ...4betw........
|
||||
| 3024: 80 80 0f 03 00 3c 00 00 00 16 04 04 33 72 6f 77 .....<......3row
|
||||
| 3040: 02 06 01 01 05 01 03 74 68 65 02 08 05 0a 1b 88 .......the......
|
||||
| 3056: 80 80 80 80 0e 03 00 3c 00 00 00 16 01 01 02 04 .......<........
|
||||
| 3072: 33 61 72 65 02 02 03 01 03 62 65 74 02 02 07 08 3are.....bet....
|
||||
| 3088: 1b 88 80 80 80 80 0d 03 00 3c 00 00 00 16 03 32 .........<.....2
|
||||
| 3104: 74 68 02 08 02 01 01 07 00 04 33 61 6e 64 02 06 th........3and..
|
||||
| 3120: 04 0a 1b 88 80 80 80 80 0c 03 00 3c 00 00 00 16 ...........<....
|
||||
| 3136: 03 32 69 6e 02 06 01 01 06 01 02 72 6f 02 06 01 .2in.......ro...
|
||||
| 3152: 01 05 04 09 18 88 80 80 80 80 0b 03 00 36 00 00 .............6..
|
||||
| 3168: 00 13 02 03 32 61 72 02 02 03 01 02 62 65 02 02 ....2ar.....be..
|
||||
| 3184: 04 05 07 1b 88 80 80 80 80 0a 03 00 3c 00 00 00 ............<...
|
||||
| 3200: 16 02 31 74 02 08 02 01 01 07 00 03 32 61 6e 02 ..1t........2an.
|
||||
| 3216: 06 01 01 04 09 19 88 80 80 80 80 09 03 00 38 00 ..............8.
|
||||
| 3232: 00 00 14 02 31 6e 02 06 01 01 03 01 01 72 02 06 ....1n.......r..
|
||||
| 3248: 01 01 05 04 08 17 88 80 80 80 80 08 03 00 34 00 ..............4.
|
||||
| 3264: 00 00 12 02 31 62 02 02 04 01 01 69 02 06 01 01 ....1b.....i....
|
||||
| 3280: 06 04 06 19 88 80 80 80 80 07 03 00 38 00 00 00 ............8...
|
||||
| 3296: 14 04 02 31 32 02 02 05 01 01 61 02 08 03 01 01 ...12.....a.....
|
||||
| 3312: 02 05 06 1b 88 80 80 80 80 06 03 00 3c 00 00 00 ............<...
|
||||
| 3328: 16 06 30 74 68 65 72 65 02 02 02 00 02 31 31 02 ..0there.....11.
|
||||
| 3344: 06 01 01 04 0a 15 88 80 80 80 80 05 03 00 30 00 ..............0.
|
||||
| 3360: 00 00 11 01 01 05 04 30 74 68 65 02 06 01 01 07 .......0the.....
|
||||
| 3376: 07 1c 88 80 80 80 80 04 03 00 3e 00 00 00 17 01 ..........>.....
|
||||
| 3392: 01 06 02 30 6e 02 06 01 01 03 01 04 72 6f 77 73 ...0n.......rows
|
||||
| 3408: 02 06 07 08 1b 88 80 80 80 80 03 03 00 3c 00 00 .............<..
|
||||
| 3424: 00 16 08 30 62 65 74 77 65 65 6e 02 02 04 01 02 ...0between.....
|
||||
| 3440: 69 6e 02 06 04 0c 1a 88 80 80 80 80 02 03 00 3a in.............:
|
||||
| 3456: 00 00 00 15 04 30 61 6e 64 02 06 01 01 02 02 02 .....0and.......
|
||||
| 3472: 72 65 02 02 03 04 0a 17 88 80 80 80 80 01 03 00 re..............
|
||||
| 3488: 34 00 00 00 12 02 30 31 02 06 01 01 04 01 01 32 4.....01.......2
|
||||
| 3504: 02 02 05 04 08 08 84 80 80 80 81 12 03 00 16 00 ................
|
||||
| 3520: 00 00 05 04 1b 84 61 80 80 80 11 03 00 3c 00 00 ......a......<..
|
||||
| 3536: 00 16 05 34 74 61 62 6c 01 06 01 01 05 02 03 65 ...4tabl.......e
|
||||
| 3552: 72 6d 01 02 04 0b 1b 84 80 80 80 80 10 03 00 3c rm.............<
|
||||
| 3568: 00 00 00 16 05 34 65 61 63 68 01 02 03 01 04 70 .....4each.....p
|
||||
| 3584: 72 65 73 01 02 05 04 09 1a 84 80 80 80 80 0f 03 res.............
|
||||
| 3600: 00 3a 00 00 00 15 04 33 74 65 72 01 02 04 02 02 .:.....3ter.....
|
||||
| 3616: 68 65 01 06 01 01 03 04 08 1b 84 80 80 80 80 0e he..............
|
||||
| 3632: 03 00 3c 00 00 00 16 04 33 70 72 65 01 02 05 01 ..<.....3pre....
|
||||
| 3648: 03 74 61 62 01 06 01 01 05 14 08 1a 84 80 80 80 .tab............
|
||||
| 3664: 80 0d 03 00 3a 00 00 00 15 04 33 66 6f 72 01 02 ....:.....3for..
|
||||
| 3680: 02 02 02 74 73 01 06 01 01 04 04 08 1b 84 80 80 ...ts...........
|
||||
| 3696: 80 80 0c 03 00 3c 00 00 00 16 03 32 74 68 01 06 .....<.....2th..
|
||||
| 3712: 01 01 03 00 04 33 65 61 63 01 02 03 04 09 18 84 .....3eac.......
|
||||
| 3728: 80 80 80 80 0b 03 00 36 00 00 00 13 03 32 74 71 .......6.....2tq
|
||||
| 3744: 01 06 01 01 05 02 01 65 01 02 04 04 09 19 84 80 .......e........
|
||||
| 3760: 80 80 80 0a 03 00 38 00 00 00 14 03 32 69 6e 01 ......8.....2in.
|
||||
| 3776: 06 01 01 02 01 02 70 72 01 02 05 0b 89 18 84 80 ......pr........
|
||||
| 3792: 80 80 80 09 03 00 36 00 00 00 13 03 32 66 6f 01 ......6.....2fo.
|
||||
| 3808: 02 02 02 01 74 01 06 01 01 04 04 07 1b 84 80 80 ....t...........
|
||||
| 3824: 80 80 08 03 00 3c 00 00 00 16 02 31 74 01 0a 04 .....<.....1t...
|
||||
| 3840: 01 01 03 04 00 03 32 65 61 01 02 03 04 0a 17 84 ......2ea.......
|
||||
| 3856: 80 80 80 80 07 03 00 34 00 00 00 12 02 31 69 01 .......4.....1i.
|
||||
| 3872: 06 01 01 02 01 01 70 01 02 05 04 08 18 84 80 80 ......p.........
|
||||
| 3888: 80 80 06 03 00 36 00 00 00 13 02 31 65 01 02 03 .....6.....1e...
|
||||
| 3904: 01 01 66 01 08 02 01 01 04 04 06 1b 84 80 80 80 ..f.............
|
||||
| 3920: 80 05 03 00 3c 00 00 00 16 05 30 74 65 72 6d 01 ....<.....0term.
|
||||
| 3936: 02 04 02 02 68 65 01 06 01 01 03 04 09 14 84 80 ....he..........
|
||||
| 3952: 80 80 80 04 03 00 2e 00 00 00 10 06 30 74 61 62 ............0tab
|
||||
| 3968: 6c 65 01 06 01 01 05 04 15 84 80 80 80 80 03 03 le..............
|
||||
| 3984: 00 30 00 00 00 11 02 08 30 70 72 65 73 65 6e 74 .0......0present
|
||||
| 4000: 01 02 05 05 1b 84 80 80 80 80 02 03 00 3c 00 00 .............<..
|
||||
| 4016: 00 16 04 30 66 74 73 01 06 01 01 04 01 02 69 6e ...0fts.......in
|
||||
| 4032: 01 06 01 01 04 0a 1a 84 80 80 80 80 01 03 00 3a ...............:
|
||||
| 4048: 00 00 00 15 05 30 65 61 63 f4 01 02 03 01 03 66 .....0eac......f
|
||||
| 4064: 6f 72 01 02 02 04 09 06 01 03 00 12 03 0b 0f 00 or..............
|
||||
| 4080: 00 08 8c 80 80 80 80 11 03 00 16 00 00 00 05 04 ................
|
||||
| page 3 offset 8192
|
||||
| 0: 0a 00 00 00 32 0e 4f 00 0f fa 0f f1 0f e9 0f e1 ....2.O.........
|
||||
| 16: 0f d8 0f d1 0f c9 0f c1 0f b9 0f b1 0f a9 0f a0 ................
|
||||
| 32: 0f 98 0f 90 0f 87 0f 80 0f 78 0f 71 0f 68 0f 5f .........x.q.h._
|
||||
| 48: 0f 56 0f 4d 0f 41 0f 38 0f 2f 0f 26 0f 1d 0f 13 .V.M.A.8./.&....
|
||||
| 64: 0f 0a 0f 01 0e f7 0e ee 0e e6 0e dd 0e d6 0e cd ................
|
||||
| 80: 0e c3 0e ba 0e b0 0e a8 0e 9f 0e 96 0e 8e 0e 85 ................
|
||||
| 96: 0e 7c 0e 73 0e 6a 0e 60 0e 58 0e 4f 00 00 00 00 .|.s.j.`.X.O....
|
||||
| 3648: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 ................
|
||||
| 3664: 04 01 10 01 03 34 74 20 07 04 01 0e 01 03 34 1e .....4t ......4.
|
||||
| 3680: 09 04 01 12 01 03 33 74 68 1c 08 04 01 10 01 03 ......3th.......
|
||||
| 3696: 33 6e 1a 08 04 01 10 01 03 32 77 18 08 04 01 10 3n.......2w.....
|
||||
| 3712: 01 03 32 74 16 08 04 01 10 01 03 32 6e 14 07 04 ..2t.......2n...
|
||||
| 3728: 01 0e 01 03 32 12 08 04 01 10 01 03 31 74 10 08 ....2.......1t..
|
||||
| 3744: 04 01 10 01 03 31 6e 0e 07 04 01 0e 01 03 31 0c .....1n.......1.
|
||||
| 3760: 09 04 01 12 01 03 30 74 68 0a 08 04 01 10 01 03 ......0th.......
|
||||
| 3776: 30 74 08 09 04 01 12 01 03 30 6e 75 06 08 04 01 0t.......0nu....
|
||||
| 3792: 10 01 03 30 6e 04 06 04 01 0c 01 03 02 08 04 01 ...0n...........
|
||||
| 3808: 10 01 02 34 72 22 07 04 01 0e 01 02 34 20 08 04 ...4r.......4 ..
|
||||
| 3824: 01 10 01 02 33 72 1e 09 04 01 12 01 02 33 61 72 ....3r.......3ar
|
||||
| 3840: 1c 08 04 01 10 01 02 32 74 1a 08 04 01 10 b3 02 .......2t.......
|
||||
| 3856: 32 69 18 09 04 01 12 01 02 32 61 72 16 08 04 01 2i.......2ar....
|
||||
| 3872: 10 01 02 31 74 14 08 04 01 10 01 02 31 6e 12 08 ...1t.......1n..
|
||||
| 3888: 04 01 10 01 02 31 62 10 08 04 01 10 01 02 31 32 .....1b.......12
|
||||
| 3904: 0e 0b 04 01 16 01 02 30 74 68 65 72 0c 08 04 01 .......0ther....
|
||||
| 3920: 10 01 02 30 74 0a 08 04 01 10 01 02 30 6e 08 08 ...0t.......0n..
|
||||
| 3936: 04 01 10 01 02 30 62 06 08 04 01 10 01 02 30 61 .....0b.......0a
|
||||
| 3952: 05 06 04 01 0c 01 02 02 07 04 09 10 01 34 74 22 .............4t.
|
||||
| 3968: 06 04 09 0e 01 34 20 08 04 09 12 01 33 74 65 1e .....4 .....3te.
|
||||
| 3984: 07 04 09 10 01 33 70 1c 07 04 09 10 01 33 66 1a .....3p......3f.
|
||||
| 4000: 08 04 09 12 01 32 74 68 18 07 04 09 10 01 32 2d .....2th......2-
|
||||
| 4016: 16 07 04 09 10 01 32 69 14 07 04 09 10 01 32 66 ......2i......2f
|
||||
| 4032: 12 07 04 09 10 01 31 74 10 07 04 09 10 01 31 69 ......1t......1i
|
||||
| 4048: 0e 06 04 09 0e 01 31 0c 08 04 09 12 01 30 74 65 ......1......0te
|
||||
| 4064: 0a 07 04 09 10 01 30 74 08 07 04 09 10 01 30 70 ......0t......0p
|
||||
| 4080: 06 08 04 09 12 01 30 66 74 04 05 04 09 0c 01 02 ......0ft.......
|
||||
| page 4 offset 12288
|
||||
| 0: 0d 00 00 00 03 0f eb 00 0f f9 0f f2 0f eb 00 00 ................
|
||||
| 4064: 00 00 00 00 00 00 00 00 00 00 00 05 03 03 00 10 ................
|
||||
| 4080: 03 05 05 02 03 00 10 04 06 05 01 03 00 10 04 03 ................
|
||||
| page 5 offset 16384
|
||||
| 0: 0a 00 00 00 02 0f eb 00 0f eb 0f f4 00 00 00 00 ................
|
||||
| 4064: 00 00 00 00 00 00 00 00 00 00 00 08 03 15 01 70 ...............p
|
||||
| 4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04 gsz.....version.
|
||||
| page 6 offset 20480
|
||||
| 0: 0d 00 00 00 03 0f f2 00 0f fc 0f f7 0f f2 00 00 ................
|
||||
| 4080: 00 00 03 03 02 01 03 03 02 02 01 02 02 01 02 09 ................
|
||||
| end crash-2acc487d09f033.db
|
||||
}]} {}
|
||||
|
||||
do_catchsql_test 56.1 {
|
||||
INSERT INTO t1(b) VALUES(randomblob(250));
|
||||
INSERT INTO t1(b) VALUES(randomblob(250));
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
sqlite3_fts5_may_be_corrupt 0
|
||||
finish_test
|
||||
|
||||
|
||||
+1
-1
@@ -747,7 +747,7 @@ static char *amatchDequote(const char *zIn){
|
||||
char q = zIn[0]; /* Quote character (if any ) */
|
||||
|
||||
if( q!='[' && q!= '\'' && q!='"' && q!='`' ){
|
||||
memcpy(zOut, zIn, (size_t)(nIn+1));
|
||||
memcpy(zOut, zIn, nIn+1);
|
||||
}else{
|
||||
int iOut = 0; /* Index of next byte to write to output */
|
||||
int iIn; /* Index of next byte to read from input */
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
/*
|
||||
** 2019-03-30
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
******************************************************************************
|
||||
**
|
||||
** An SQL function that uses the incremental BLOB I/O mechanism of SQLite
|
||||
** to read or write part of a blob. This is intended for debugging use
|
||||
** in the CLI.
|
||||
**
|
||||
** readblob(SCHEMA,TABLE,COLUMN,ROWID,OFFSET,N)
|
||||
**
|
||||
** Returns N bytes of the blob starting at OFFSET.
|
||||
**
|
||||
** writeblob(SCHEMA,TABLE,COLUMN,ROWID,OFFSET,NEWDATA)
|
||||
**
|
||||
** NEWDATA must be a blob. The content of NEWDATA overwrites the
|
||||
** existing BLOB data at SCHEMA.TABLE.COLUMN for row ROWID beginning
|
||||
** at OFFSET bytes into the blob.
|
||||
*/
|
||||
#include "sqlite3ext.h"
|
||||
SQLITE_EXTENSION_INIT1
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
static void readblobFunc(
|
||||
sqlite3_context *context,
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
){
|
||||
sqlite3_blob *pBlob = 0;
|
||||
const char *zSchema;
|
||||
const char *zTable;
|
||||
const char *zColumn;
|
||||
sqlite3_int64 iRowid;
|
||||
int iOfst;
|
||||
unsigned char *aData;
|
||||
int nData;
|
||||
sqlite3 *db;
|
||||
int rc;
|
||||
|
||||
zSchema = (const char*)sqlite3_value_text(argv[0]);
|
||||
zTable = (const char*)sqlite3_value_text(argv[1]);
|
||||
if( zTable==0 ){
|
||||
sqlite3_result_error(context, "bad table name", -1);
|
||||
return;
|
||||
}
|
||||
zColumn = (const char*)sqlite3_value_text(argv[2]);
|
||||
if( zTable==0 ){
|
||||
sqlite3_result_error(context, "bad column name", -1);
|
||||
return;
|
||||
}
|
||||
iRowid = sqlite3_value_int64(argv[3]);
|
||||
iOfst = sqlite3_value_int(argv[4]);
|
||||
nData = sqlite3_value_int(argv[5]);
|
||||
if( nData<=0 ) return;
|
||||
aData = sqlite3_malloc64( nData+1 );
|
||||
if( aData==0 ){
|
||||
sqlite3_result_error_nomem(context);
|
||||
return;
|
||||
}
|
||||
db = sqlite3_context_db_handle(context);
|
||||
rc = sqlite3_blob_open(db, zSchema, zTable, zColumn, iRowid, 0, &pBlob);
|
||||
if( rc ){
|
||||
sqlite3_free(aData);
|
||||
sqlite3_result_error(context, "cannot open BLOB pointer", -1);
|
||||
return;
|
||||
}
|
||||
rc = sqlite3_blob_read(pBlob, aData, nData, iOfst);
|
||||
sqlite3_blob_close(pBlob);
|
||||
if( rc ){
|
||||
sqlite3_free(aData);
|
||||
sqlite3_result_error(context, "BLOB write failed", -1);
|
||||
}else{
|
||||
sqlite3_result_blob(context, aData, nData, sqlite3_free);
|
||||
}
|
||||
}
|
||||
|
||||
static void writeblobFunc(
|
||||
sqlite3_context *context,
|
||||
int argc,
|
||||
sqlite3_value **argv
|
||||
){
|
||||
sqlite3_blob *pBlob = 0;
|
||||
const char *zSchema;
|
||||
const char *zTable;
|
||||
const char *zColumn;
|
||||
sqlite3_int64 iRowid;
|
||||
int iOfst;
|
||||
unsigned char *aData;
|
||||
int nData;
|
||||
sqlite3 *db;
|
||||
int rc;
|
||||
|
||||
zSchema = (const char*)sqlite3_value_text(argv[0]);
|
||||
zTable = (const char*)sqlite3_value_text(argv[1]);
|
||||
if( zTable==0 ){
|
||||
sqlite3_result_error(context, "bad table name", -1);
|
||||
return;
|
||||
}
|
||||
zColumn = (const char*)sqlite3_value_text(argv[2]);
|
||||
if( zTable==0 ){
|
||||
sqlite3_result_error(context, "bad column name", -1);
|
||||
return;
|
||||
}
|
||||
iRowid = sqlite3_value_int64(argv[3]);
|
||||
iOfst = sqlite3_value_int(argv[4]);
|
||||
if( sqlite3_value_type(argv[5])!=SQLITE_BLOB ){
|
||||
sqlite3_result_error(context, "6th argument must be a BLOB", -1);
|
||||
return;
|
||||
}
|
||||
nData = sqlite3_value_bytes(argv[5]);
|
||||
aData = (unsigned char *)sqlite3_value_blob(argv[5]);
|
||||
db = sqlite3_context_db_handle(context);
|
||||
rc = sqlite3_blob_open(db, zSchema, zTable, zColumn, iRowid, 1, &pBlob);
|
||||
if( rc ){
|
||||
sqlite3_result_error(context, "cannot open BLOB pointer", -1);
|
||||
return;
|
||||
}
|
||||
rc = sqlite3_blob_write(pBlob, aData, nData, iOfst);
|
||||
sqlite3_blob_close(pBlob);
|
||||
if( rc ){
|
||||
sqlite3_result_error(context, "BLOB write failed", -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
int sqlite3_blobio_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, "readblob", 6, SQLITE_UTF8, 0,
|
||||
readblobFunc, 0, 0);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3_create_function(db, "writeblob", 6, SQLITE_UTF8, 0,
|
||||
writeblobFunc, 0, 0);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
+1
-1
@@ -431,7 +431,7 @@ static char *closureDequote(const char *zIn){
|
||||
char q = zIn[0]; /* Quote character (if any ) */
|
||||
|
||||
if( q!='[' && q!= '\'' && q!='"' && q!='`' ){
|
||||
memcpy(zOut, zIn, (size_t)(nIn+1));
|
||||
memcpy(zOut, zIn, nIn+1);
|
||||
}else{
|
||||
int iOut = 0; /* Index of next byte to write to output */
|
||||
int iIn; /* Index of next byte to read from input */
|
||||
|
||||
+7
-7
@@ -152,13 +152,13 @@ static void readFileContents(sqlite3_context *ctx, const char *zName){
|
||||
fclose(in);
|
||||
return;
|
||||
}
|
||||
pBuf = sqlite3_malloc64( nIn ? nIn : 1 );
|
||||
pBuf = sqlite3_malloc64( nIn );
|
||||
if( pBuf==0 ){
|
||||
sqlite3_result_error_nomem(ctx);
|
||||
fclose(in);
|
||||
return;
|
||||
}
|
||||
if( nIn==(sqlite3_int64)fread(pBuf, 1, (size_t)nIn, in) ){
|
||||
if( 1==fread(pBuf, nIn, 1, in) ){
|
||||
sqlite3_result_blob64(ctx, pBuf, nIn, sqlite3_free);
|
||||
}else{
|
||||
sqlite3_result_error_code(ctx, SQLITE_IOERR);
|
||||
@@ -293,15 +293,15 @@ static int fileLinkStat(
|
||||
** 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 in accordance
|
||||
** with the current umask.
|
||||
** 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
|
||||
const char *zFile,
|
||||
mode_t mode
|
||||
){
|
||||
char *zCopy = sqlite3_mprintf("%s", zFile);
|
||||
int rc = SQLITE_OK;
|
||||
@@ -322,7 +322,7 @@ static int makeDirectory(
|
||||
|
||||
rc2 = fileStat(zCopy, &sStat);
|
||||
if( rc2!=0 ){
|
||||
if( mkdir(zCopy, 0777) ) rc = SQLITE_ERROR;
|
||||
if( mkdir(zCopy, mode & 0777) ) rc = SQLITE_ERROR;
|
||||
}else{
|
||||
if( !S_ISDIR(sStat.st_mode) ) rc = SQLITE_ERROR;
|
||||
}
|
||||
@@ -480,7 +480,7 @@ static void writefileFunc(
|
||||
|
||||
res = writeFile(context, zFile, argv[1], mode, mtime);
|
||||
if( res==1 && errno==ENOENT ){
|
||||
if( makeDirectory(zFile)==SQLITE_OK ){
|
||||
if( makeDirectory(zFile, mode)==SQLITE_OK ){
|
||||
res = writeFile(context, zFile, argv[1], mode, mtime);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -456,7 +456,7 @@ static char *fuzzerDequote(const char *zIn){
|
||||
char q = zIn[0]; /* Quote character (if any ) */
|
||||
|
||||
if( q!='[' && q!= '\'' && q!='"' && q!='`' ){
|
||||
memcpy(zOut, zIn, (size_t)(nIn+1));
|
||||
memcpy(zOut, zIn, nIn+1);
|
||||
}else{
|
||||
int iOut = 0; /* Index of next byte to write to output */
|
||||
int iIn; /* Index of next byte to read from input */
|
||||
@@ -524,7 +524,7 @@ static int fuzzerConnect(
|
||||
|
||||
memset(pNew, 0, sizeof(*pNew));
|
||||
pNew->zClassName = (char*)&pNew[1];
|
||||
memcpy(pNew->zClassName, zModule, (size_t)(nModule+1));
|
||||
memcpy(pNew->zClassName, zModule, nModule+1);
|
||||
|
||||
zTab = fuzzerDequote(argv[3]);
|
||||
if( zTab==0 ){
|
||||
|
||||
@@ -108,8 +108,8 @@ static void percentStep(sqlite3_context *pCtx, int argc, sqlite3_value **argv){
|
||||
/* Requirement 3: P must be a number between 0 and 100 */
|
||||
eType = sqlite3_value_numeric_type(argv[1]);
|
||||
rPct = sqlite3_value_double(argv[1]);
|
||||
if( (eType!=SQLITE_INTEGER && eType!=SQLITE_FLOAT)
|
||||
|| rPct<0.0 || rPct>100.0 ){
|
||||
if( (eType!=SQLITE_INTEGER && eType!=SQLITE_FLOAT) ||
|
||||
((rPct = sqlite3_value_double(argv[1]))<0.0 || rPct>100.0) ){
|
||||
sqlite3_result_error(pCtx, "2nd argument to percentile() is not "
|
||||
"a number between 0.0 and 100.0", -1);
|
||||
return;
|
||||
|
||||
@@ -256,7 +256,7 @@ static void *unionMalloc(int *pRc, sqlite3_int64 nByte){
|
||||
if( *pRc==SQLITE_OK ){
|
||||
pRet = sqlite3_malloc64(nByte);
|
||||
if( pRet ){
|
||||
memset(pRet, 0, (size_t)nByte);
|
||||
memset(pRet, 0, nByte);
|
||||
}else{
|
||||
*pRc = SQLITE_NOMEM;
|
||||
}
|
||||
@@ -279,7 +279,7 @@ static char *unionStrdup(int *pRc, const char *zIn){
|
||||
sqlite3_int64 nByte = strlen(zIn) + 1;
|
||||
zRet = unionMalloc(pRc, nByte);
|
||||
if( zRet ){
|
||||
memcpy(zRet, zIn, (size_t)nByte);
|
||||
memcpy(zRet, zIn, nByte);
|
||||
}
|
||||
}
|
||||
return zRet;
|
||||
|
||||
+3
-6
@@ -783,8 +783,8 @@ static sqlite3_module VfsStatModule = {
|
||||
*/
|
||||
static int vstatRegister(
|
||||
sqlite3 *db,
|
||||
char **pzErrMsg,
|
||||
const sqlite3_api_routines *pThunk
|
||||
const char **pzErrMsg,
|
||||
const struct sqlite3_api_routines *pThunk
|
||||
){
|
||||
return sqlite3_create_module(db, "vfsstat", &VfsStatModule, 0);
|
||||
}
|
||||
@@ -809,10 +809,7 @@ int sqlite3_vfsstat_init(
|
||||
vstat_vfs.base.szOsFile = sizeof(VStatFile) + vstat_vfs.pVfs->szOsFile;
|
||||
rc = sqlite3_vfs_register(&vstat_vfs.base, 1);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = vstatRegister(db, pzErrMsg, pApi);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = sqlite3_auto_extension(vstatRegister);
|
||||
}
|
||||
rc = sqlite3_auto_extension(vstatRegister);
|
||||
}
|
||||
if( rc==SQLITE_OK ) rc = SQLITE_OK_LOAD_PERMANENTLY;
|
||||
return rc;
|
||||
|
||||
@@ -684,7 +684,6 @@ static void rbuFossilDeltaFunc(
|
||||
}else{
|
||||
nOut2 = rbuDeltaApply(aOrig, nOrig, aDelta, nDelta, aOut);
|
||||
if( nOut2!=nOut ){
|
||||
sqlite3_free(aOut);
|
||||
sqlite3_result_error(context, "corrupt fossil delta", -1);
|
||||
}else{
|
||||
sqlite3_result_blob(context, aOut, nOut, sqlite3_free);
|
||||
|
||||
+20
-16
@@ -3755,45 +3755,49 @@ rtreeInit_fail:
|
||||
** <num-dimension>*2 coordinates.
|
||||
*/
|
||||
static void rtreenode(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){
|
||||
char *zText = 0;
|
||||
RtreeNode node;
|
||||
Rtree tree;
|
||||
int ii;
|
||||
int nData;
|
||||
int errCode;
|
||||
sqlite3_str *pOut;
|
||||
|
||||
UNUSED_PARAMETER(nArg);
|
||||
memset(&node, 0, sizeof(RtreeNode));
|
||||
memset(&tree, 0, sizeof(Rtree));
|
||||
tree.nDim = (u8)sqlite3_value_int(apArg[0]);
|
||||
if( tree.nDim<1 || tree.nDim>5 ) return;
|
||||
tree.nDim2 = tree.nDim*2;
|
||||
tree.nBytesPerCell = 8 + 8 * tree.nDim;
|
||||
node.zData = (u8 *)sqlite3_value_blob(apArg[1]);
|
||||
nData = sqlite3_value_bytes(apArg[1]);
|
||||
if( nData<4 ) return;
|
||||
if( nData<NCELL(&node)*tree.nBytesPerCell ) return;
|
||||
|
||||
pOut = sqlite3_str_new(0);
|
||||
for(ii=0; ii<NCELL(&node); ii++){
|
||||
char zCell[512];
|
||||
int nCell = 0;
|
||||
RtreeCell cell;
|
||||
int jj;
|
||||
|
||||
nodeGetCell(&tree, &node, ii, &cell);
|
||||
if( ii>0 ) sqlite3_str_append(pOut, " ", 1);
|
||||
sqlite3_str_appendf(pOut, "{%lld", cell.iRowid);
|
||||
sqlite3_snprintf(512-nCell,&zCell[nCell],"%lld", cell.iRowid);
|
||||
nCell = (int)strlen(zCell);
|
||||
for(jj=0; jj<tree.nDim2; jj++){
|
||||
#ifndef SQLITE_RTREE_INT_ONLY
|
||||
sqlite3_str_appendf(pOut, " %g", (double)cell.aCoord[jj].f);
|
||||
sqlite3_snprintf(512-nCell,&zCell[nCell], " %g",
|
||||
(double)cell.aCoord[jj].f);
|
||||
#else
|
||||
sqlite3_str_appendf(pOut, " %d", cell.aCoord[jj].i);
|
||||
sqlite3_snprintf(512-nCell,&zCell[nCell], " %d",
|
||||
cell.aCoord[jj].i);
|
||||
#endif
|
||||
nCell = (int)strlen(zCell);
|
||||
}
|
||||
|
||||
if( zText ){
|
||||
char *zTextNew = sqlite3_mprintf("%s {%s}", zText, zCell);
|
||||
sqlite3_free(zText);
|
||||
zText = zTextNew;
|
||||
}else{
|
||||
zText = sqlite3_mprintf("{%s}", zCell);
|
||||
}
|
||||
sqlite3_str_append(pOut, "}", 1);
|
||||
}
|
||||
errCode = sqlite3_str_errcode(pOut);
|
||||
sqlite3_result_text(ctx, sqlite3_str_finish(pOut), -1, sqlite3_free);
|
||||
sqlite3_result_error_code(ctx, errCode);
|
||||
|
||||
sqlite3_result_text(ctx, zText, -1, sqlite3_free);
|
||||
}
|
||||
|
||||
/* This routine implements an SQL function that returns the "depth" parameter
|
||||
|
||||
@@ -55,18 +55,17 @@ static void readFile(const char *zFilename, int *pSz, void **ppBuf){
|
||||
pBuf = sqlite3_malloc64( sz ? sz : 1 );
|
||||
if( pBuf==0 ){
|
||||
fprintf(stderr, "cannot allocate %d to hold content of \"%s\"\n",
|
||||
(int)sz, zFilename);
|
||||
sz, zFilename);
|
||||
exit(1);
|
||||
}
|
||||
if( sz>0 ){
|
||||
if( fread(pBuf, (size_t)sz, 1, f)!=1 ){
|
||||
fprintf(stderr, "cannot read all %d bytes of \"%s\"\n",
|
||||
(int)sz, zFilename);
|
||||
if( fread(pBuf, sz, 1, f)!=1 ){
|
||||
fprintf(stderr, "cannot read all %d bytes of \"%s\"\n", sz, zFilename);
|
||||
exit(1);
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
*pSz = (int)sz;
|
||||
*pSz = sz;
|
||||
*ppBuf = pBuf;
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +258,8 @@ do_patchconcat_test 4.3.3 {
|
||||
INSERT INTO t2 VALUES('a', 'a', 'a', 'a');
|
||||
} {
|
||||
DELETE FROM t2 WHERE c = 'a';
|
||||
} {}
|
||||
} {
|
||||
}
|
||||
|
||||
# INSERT + UPDATE
|
||||
do_patchconcat_test 4.3.4 {
|
||||
|
||||
@@ -3862,7 +3862,7 @@ static int sessionSeekToRow(
|
||||
}
|
||||
|
||||
/*
|
||||
** This function is called from within sqlite3changeset_apply_v2() when
|
||||
** This function is called from within sqlite3changset_apply_v2() when
|
||||
** a conflict is encountered and resolved using conflict resolution
|
||||
** mode eType (either SQLITE_CHANGESET_OMIT or SQLITE_CHANGESET_REPLACE)..
|
||||
** It adds a conflict resolution record to the buffer in
|
||||
|
||||
@@ -1415,7 +1415,7 @@ int sqlite3rebaser_configure(
|
||||
** in size. This function allocates and populates a buffer with a copy
|
||||
** of the changeset rebased rebased according to the configuration of the
|
||||
** rebaser object passed as the first argument. If successful, (*ppOut)
|
||||
** is set to point to the new buffer containing the rebased changeset and
|
||||
** is set to point to the new buffer containing the rebased changset and
|
||||
** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the
|
||||
** responsibility of the caller to eventually free the new buffer using
|
||||
** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
C Fix\sissues\swith\sthe\sprevious\scheck-in\sand\sadd\smore\sVDBE\sbranch\scoverage\ntesting\smacros.
|
||||
D 2019-03-30T20:37:04.559
|
||||
C Use\sa\sfast\scompiler-provided\smemory\sbarrier\sexclusively,\sif\ssuch\sa\smemory\nbarrier\sis\savailable.
|
||||
D 2019-02-08T20:55:16.378
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
F Makefile.in 236d2739dc3e823c3c909bca2d6cef93009bafbefd7018a8f3281074ecb92954
|
||||
F Makefile.in 178d8eb6840771149cee40b322d1b3be30d330198c522c903c1b66fb5a1bfca4
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc fb6dc0c6b09e491b3ad87fed2e1c63ace1b474d4c01091157d63839d376e54c8
|
||||
F README.md 623c225551b176659e443ae9e466e91a2c8ff16157260618295db91aef0800b7
|
||||
F VERSION 288d756b1b7be03ecdbf1795c23af2c8425f2e46ba6979a14ef53360308f080d
|
||||
F Makefile.msc 5df60c70edb157feb2148a14c687551969599bd065875a0b959b6b139721ca72
|
||||
F README.md 377233394b905d3b2e2b33741289e093bc93f2e7adbe00923b2c5958c9a9edee
|
||||
F VERSION 453e2f4529ca208196d5567db28d549d7151f79efd33f6e6cfe6e613e583a0be
|
||||
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
|
||||
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
|
||||
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
|
||||
@@ -15,7 +14,7 @@ F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
|
||||
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
|
||||
F autoconf/Makefile.am e14b629addaa1ce372b72043f28f40de2e32b7e211b6e0fc18dbb87989197e40
|
||||
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
|
||||
F autoconf/Makefile.msc bea737cb2ed8802056ff44947c4963026307caff4d7382b9622e7928990a4a18
|
||||
F autoconf/Makefile.msc ee8ab2b6b5d712f68acc4c186e3fad7b831b87a2b118e0a123043ea8a2c8b016
|
||||
F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
|
||||
F autoconf/README.txt 4f04b0819303aabaa35fff5f7b257fb0c1ef95f1
|
||||
F autoconf/configure.ac 308de24343e76ecfbe9a67f8fcd4c5216b790d230c5d9ce10210b7d5965d6192
|
||||
@@ -34,7 +33,7 @@ F autoconf/tea/win/rules.vc c511f222b80064096b705dbeb97060ee1d6b6d63
|
||||
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
|
||||
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
|
||||
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
|
||||
F configure b013bf805064650b072817c7c7f0a295cfcec5b1afec15e59ea4e9996543f51e x
|
||||
F configure e2b4021dcb8ee6f9a91e7f4011316957868e8065019ac994f68e27363120c272 x
|
||||
F configure.ac 3552d3aecade98a9d4b64bceb48ffb7726cbc85902efde956812942f060fbd0a
|
||||
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
|
||||
F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
|
||||
@@ -79,9 +78,9 @@ F ext/fts2/fts2_tokenizer1.c 07e223eecb483d448313b5f1553a4f299a7fb7a1
|
||||
F ext/fts2/mkfts2amal.tcl 974d5d438cb3f7c4a652639262f82418c1e4cff0
|
||||
F ext/fts3/README.content fdc666a70d5257a64fee209f97cf89e0e6e32b51
|
||||
F ext/fts3/README.syntax a19711dc5458c20734b8e485e75fb1981ec2427a
|
||||
F ext/fts3/README.tokenizers b92bdeb8b46503f0dd301d364efc5ef59ef9fa8e2758b8e742f39fa93a2e422d
|
||||
F ext/fts3/README.tokenizers e0a8b81383ea60d0334d274fadf305ea14a8c314
|
||||
F ext/fts3/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d
|
||||
F ext/fts3/fts3.c 33958a8c05a6c22bf559fedb1176ad1f313a7b42ccf5f0c0bcc8a88609e58d60
|
||||
F ext/fts3/fts3.c 5da1329ccf66b6d597dfb16b1f81aa204133c1ec96117d82a59c20126f483b17
|
||||
F ext/fts3/fts3.h 3a10a0af180d502cecc50df77b1b22df142817fe
|
||||
F ext/fts3/fts3Int.h 74384e28b778a057f1467529715668b98f3f12f52eeb564fd6ae1e894125c00c
|
||||
F ext/fts3/fts3_aux.c 96708c8b3a7d9b8ca1b68ea2b7e503e283f20e95f145becadedfad096dbd0f34
|
||||
@@ -90,46 +89,46 @@ F ext/fts3/fts3_hash.c 8b6e31bfb0844c27dc6092c2620bdb1fca17ed613072db057d96952c6
|
||||
F ext/fts3/fts3_hash.h 39cf6874dc239d6b4e30479b1975fe5b22a3caaf
|
||||
F ext/fts3/fts3_icu.c 305ce7fb6036484085b5556a9c8e62acdc7763f0f4cdf5fd538212a9f3720116
|
||||
F ext/fts3/fts3_porter.c 3565faf04b626cddf85f03825e86056a4562c009
|
||||
F ext/fts3/fts3_snippet.c 0d8362efa59637dc7c09dc88899eb072aa409fe1e0d0fdeda55ec1e562c50310
|
||||
F ext/fts3/fts3_term.c f45a1e7c6ef464abb1231245d123dae12266b69e05cc56e14045b76591ae92d1
|
||||
F ext/fts3/fts3_snippet.c ac1f8945375d07076b7178de1fe549982e6ae6f050095e7f7e400ec4448f31df
|
||||
F ext/fts3/fts3_term.c 12f7b2318f1254e6cc46dd306e5f2ac5b00b06d6761f5cae09fee5e1817cc32a
|
||||
F ext/fts3/fts3_test.c b6e9f3fd7155cb388c6bc203fb24817a721fb61d9ce28810c73fcfda8c16fda6
|
||||
F ext/fts3/fts3_tokenize_vtab.c 969c132816b6f46ee2c7efafd2547a9bfd50b0aac3f8cef3f2dca2cbd90639c7
|
||||
F ext/fts3/fts3_tokenizer.c ee670e9e0f0dc67fb78d235b2059397e4bf6a3ad8819885c2be6db08b3d35cde
|
||||
F ext/fts3/fts3_tokenizer.c a22bf311a71f3efa9d7012d8cc48fc9b0f3dace7
|
||||
F ext/fts3/fts3_tokenizer.h 64c6ef6c5272c51ebe60fc607a896e84288fcbc3
|
||||
F ext/fts3/fts3_tokenizer1.c 5c98225a53705e5ee34824087478cf477bdb7004
|
||||
F ext/fts3/fts3_unicode.c 4b9af6151c29b35ed09574937083cece7c31e911f69615e168a39677569b684d
|
||||
F ext/fts3/fts3_unicode2.c 416eb7e1e81142703520d284b768ca2751d40e31fa912cae24ba74860532bf0f
|
||||
F ext/fts3/fts3_write.c 8174c14b1027c01751c5671878927dc855507bc3248848f91cebe3950b7da24a
|
||||
F ext/fts3/fts3_write.c 45cbe0b06221f5debefe37f8f9882cf0401592668cb76624a64c0f3f185115de
|
||||
F ext/fts3/fts3speed.tcl b54caf6a18d38174f1a6e84219950d85e98bb1e9
|
||||
F ext/fts3/mkfts3amal.tcl 252ecb7fe6467854f2aa237bf2c390b74e71f100
|
||||
F ext/fts3/tool/fts3cov.sh c331d006359456cf6f8f953e37f2b9c7d568f3863f00bb5f7eb87fea4ac01b73
|
||||
F ext/fts3/tool/fts3view.c 202801a2056995b763864d60c2dee744d46f1677
|
||||
F ext/fts3/unicode/CaseFolding.txt 8c678ca52ecc95e16bc7afc2dbf6fc9ffa05db8c
|
||||
F ext/fts3/unicode/UnicodeData.txt cd07314edb62d49fde34debdaf92fa2aa69011e7
|
||||
F ext/fts3/unicode/mkunicode.tcl bf7fcaa6d68e6d38223467983785d054f1cff4d9e3905dd51f6ed8801bb590d5
|
||||
F ext/fts3/unicode/mkunicode.tcl 49499f7964504438e2b04cca0627827945bb2499154e2d3ec216b22d20b969ae
|
||||
F ext/fts3/unicode/parseunicode.tcl a981bd6466d12dd17967515801c3ff23f74a281be1a03cf1e6f52a6959fc77eb
|
||||
F ext/fts5/extract_api_docs.tcl a36e54ec777172ddd3f9a88daf593b00848368e0
|
||||
F ext/fts5/fts5.h 7c9da96f2b9dcfa4dd94081fb2d87ec418d8cdb35b25df56756c334b6b558fd7
|
||||
F ext/fts5/fts5Int.h 5c26dce0ec9272fca726c6fddb92f634d0c912d4ca170330270d488a94b80416
|
||||
F ext/fts5/fts5_aux.c dcc627d8b6e3fc773db528ff67b39955dab7b51628f9dba8e15849e5bedfd7fa
|
||||
F ext/fts5/fts5_buffer.c 7d91caa0d862079d787660ec405d2fda6fd4f206d95b870dc7adc3b8f66a400f
|
||||
F ext/fts5/fts5_config.c d7523cba5e66da077233c023aecbc3e6a37978ff75a18131c5ab5b1229d5bac7
|
||||
F ext/fts5/fts5_expr.c 840c88d55e78083a5e61a35968df877712ae28791b347eced1e98e3b337d2d3c
|
||||
F ext/fts5/fts5_hash.c 1cc0095646f5f3b46721aa112fb4f9bf29ae175cb5338f89dcec66ed97acfe75
|
||||
F ext/fts5/fts5_index.c 865302c41aee4e8336b5dd06759e962e5d8b68ed3cb96ccf0e0dee451f399a34
|
||||
F ext/fts5/fts5_main.c de317d9890e9bb61e1d295a00b53d0a0b2d0ef08789108566bf530e6a1d06887
|
||||
F ext/fts5/fts5_storage.c b24f6916fcdd68989a549f25962f286bdba9d9d59c7581567a6a0eb647cd07cc
|
||||
F ext/fts5/fts5.h fed314270c1a61de3a0e373b11c2f8228b1c76ce59447dd96d0b6fae7d66399b
|
||||
F ext/fts5/fts5Int.h 0b002fc71ea705d2c4ec66a63ecd38a2c11127e5b52239b5d71d1dd28309fc19
|
||||
F ext/fts5/fts5_aux.c afe8c2394cf6de2a48f278442f4f4342365bf99a5983709ef8e6955c2cf4daf9
|
||||
F ext/fts5/fts5_buffer.c 2e750cd4c0d456d4e1a8dcc649382708422b535dc32b375fd3d3306fb9727046
|
||||
F ext/fts5/fts5_config.c eeec97cb0237991e7fa3bbae07b5cc354e3f238b661200c11228fe167c18f882
|
||||
F ext/fts5/fts5_expr.c 188d1dca5a262a0708efc5deb809f1aa6ecea4158986a439d2670cfe72d10b65
|
||||
F ext/fts5/fts5_hash.c d415f5ad332b051f0ade564bcf1762c4467cc49b2ba8ea5873d8744c705d8d42
|
||||
F ext/fts5/fts5_index.c ffff7e8d41594256cacf7b32072f8bc06478a86026196a7eb084450065df8d92
|
||||
F ext/fts5/fts5_main.c 95d63bbe6075955961e56878c3a8705dc475c2b17f5c767f7b8af14093ae614b
|
||||
F ext/fts5/fts5_storage.c 57e3f2b1a612961a27c944d6b8821028ec5fdb541d7e6b841785003ac3b0b43a
|
||||
F ext/fts5/fts5_tcl.c 39bcbae507f594aad778172fa914cad0f585bf92fd3b078c686e249282db0d95
|
||||
F ext/fts5/fts5_test_mi.c 08c11ec968148d4cb4119d96d819f8c1f329812c568bac3684f5464be177d3ee
|
||||
F ext/fts5/fts5_test_tok.c f96c6e193c466711d6d7828d5f190407fe7ab897062d371426dd3036f01258e7
|
||||
F ext/fts5/fts5_tokenize.c 4d904c237707de8fbb8ab98d24d5c55d47204a3f1f35895d8a53a5327079b32c
|
||||
F ext/fts5/fts5_unicode2.c 8bd0cd07396b74c1a05590e4070d635bccfc849812c305619f109e6c0485e250
|
||||
F ext/fts5/fts5_unicode2.c d8a1528c9a19f79b843c486e5e64bff17d667791ae7f658e11131ebac4b33c59
|
||||
F ext/fts5/fts5_varint.c e64d2113f6e1bfee0032972cffc1207b77af63319746951bf1d09885d1dadf80
|
||||
F ext/fts5/fts5_vocab.c 906dff069840347e68f654b12ca60a53a27cd1780daf155fbe7dd331f27c2329
|
||||
F ext/fts5/fts5parse.y eb526940f892ade5693f22ffd6c4f2702543a9059942772526eac1fde256bb05
|
||||
F ext/fts5/mkportersteps.tcl 5acf962d2e0074f701620bb5308155fa1e4a63ba
|
||||
F ext/fts5/test/fts5_common.tcl b01c584144b5064f30e6c648145a2dd6bc440841
|
||||
F ext/fts5/test/fts5aa.test 5bd43427b7d08ce2e19c488a26534be450538b9232d4d5305049e8de236e9aa9
|
||||
F ext/fts5/test/fts5aa.test 1706f816308e5855fe493be85aa0fd28eea78fb163ab1d60a20bca4f0ebcf68d
|
||||
F ext/fts5/test/fts5ab.test 9205c839332c908aaad2b01ab8670ece8b161e8f2ec8a9fabf18ca9385880bb7
|
||||
F ext/fts5/test/fts5ac.test a7aa7e1fefc6e1918aa4d3111d5c44a09177168e962c5fd2cca9620de8a7ed6d
|
||||
F ext/fts5/test/fts5ad.test e8cf959dfcd57c8e46d6f5f25665686f3b6627130a9a981371dafdf6482790de
|
||||
@@ -143,7 +142,7 @@ F ext/fts5/test/fts5ak.test fc3595f8e6873bb86d70c9bd4b67d0413ce577bd4793c39a2b60
|
||||
F ext/fts5/test/fts5al.test 00c4c1c6a1366b73aa48ce2068c634520867c3cf7f5d1676ebbb775ee1f35734
|
||||
F ext/fts5/test/fts5alter.test 5565f7e4605512b69171ac18ca84398603f9f6456dbe377beeca97e83cc242cd
|
||||
F ext/fts5/test/fts5auto.test 78989e6527ce69c9eddbef7392fea5c10b0010cd2b2ae68eec7bc869c471e691
|
||||
F ext/fts5/test/fts5aux.test ebf6f2ff7cb556e83f66991b7f12bff016d3c83d4eab36704b649dd6b1437318
|
||||
F ext/fts5/test/fts5aux.test 8e7f9c96f8570f48402f2fd7b74e1ccfadd319fa56ef677321880000f9739846
|
||||
F ext/fts5/test/fts5auxdata.test eacc97ff04892f1a5f3d4df5a73f8bcbc3955ea1d12c9f24137eb1fc079e7611
|
||||
F ext/fts5/test/fts5bigpl.test 6466c89b38439f0aba26ac09e232a6b963f29b1cbe1304f6a664fe1e7a8f5fd3
|
||||
F ext/fts5/test/fts5bigtok.test 541119e616c637caea925a8c028c37c2c29e94383e00aa2f9198d530724b6e36
|
||||
@@ -157,7 +156,7 @@ F ext/fts5/test/fts5connect.test 08030168fc96fc278fa81f28654fb7e90566f33aff269c0
|
||||
F ext/fts5/test/fts5content.test 688d5ac7af194ebc67495daea76a69e3cd5480122c2320e72d41241b423b4116
|
||||
F ext/fts5/test/fts5corrupt.test 77ae6f41a7eba10620efb921cf7dbe218b0ef232b04519deb43581cb17a57ebe
|
||||
F ext/fts5/test/fts5corrupt2.test 7453752ba12ce91690c469a6449d412561cc604b1dec994e16ab132952e7805f
|
||||
F ext/fts5/test/fts5corrupt3.test f87317faf720259258437cd240cc0b2a7c8620abffd6fe005b54c45d142166f6
|
||||
F ext/fts5/test/fts5corrupt3.test 4c506a138797d23049bf08552b4571f5beb5138ab7b3329b9210fe5aac8796d2
|
||||
F ext/fts5/test/fts5delete.test cbf87e3b8867c4d5cfcaed975c7475fd3f99d072bce2075fcedf43d1f82af775
|
||||
F ext/fts5/test/fts5detail.test 31b240dbf6d44ac3507e2f8b65f29fdc12465ffd531212378c7ce1066766f54e
|
||||
F ext/fts5/test/fts5determin.test 1b77879b2ae818b5b71c859e534ee334dac088b7cf3ff3bf76a2c82b1c788d11
|
||||
@@ -274,22 +273,20 @@ F ext/lsm1/test/lsm1_common.tcl 5ed4bab07c93be2e4f300ebe46007ecf4b3e20bc5fbe1ded
|
||||
F ext/lsm1/test/lsm1_simple.test ca949efefa102f4644231dcd9291d8cda7699a4ce1006b26e0e3fcb72233f422
|
||||
F ext/lsm1/tool/mklsm1c.tcl f31561bbee5349f0a554d1ad7236ac1991fc09176626f529f6078e07335398b0
|
||||
F ext/misc/README.md d6dd0fe1d8af77040216798a6a2b0c46c73054d2f0ea544fbbcdccf6f238c240
|
||||
F ext/misc/amatch.c 50a9ef2d38dabfa371f8c1904097d493271e63d58ccb0e9b79a4fa4a94e66660
|
||||
F ext/misc/amatch.c cc9835931fbe46f9c6b8dbb51779c16f169bee50ae372a20532ff5154ebaf5b1
|
||||
F ext/misc/anycollseq.c 5ffdfde9829eeac52219136ad6aa7cd9a4edb3b15f4f2532de52f4a22525eddb
|
||||
F ext/misc/appendvfs.c 3777f22ec1057dc4e5fd89f2fbddcc7a29fbeef1ad038c736c54411bb1967af7
|
||||
F ext/misc/blobio.c 085bbfa57ea58bb15d994ba4cd397bff6f0c38c4f618adbc62cf4d3780e5d88a
|
||||
F ext/misc/btreeinfo.c 4f0ebf278f46e68e6306c667917766cebc5550fd35d5de17847988e22892d4d2
|
||||
F ext/misc/carray.c ed96c218ea940b85c9a274c4d9c59fe9491c299147a38a8bba537687bd6c6005
|
||||
F ext/misc/closure.c dbfd8543b2a017ae6b1a5843986b22ddf99ff126ec9634a2f4047cd14c85c243
|
||||
F ext/misc/closure.c 037d055c5a4880d41607a3ea44037f655b5e8ac1bdce305ec497903fd2646960
|
||||
F ext/misc/completion.c cec672d40604075bb341a7f11ac48393efdcd90a979269b8fe7977ea62d0547f
|
||||
F ext/misc/compress.c dd4f8a6d0baccff3c694757db5b430f3bbd821d8686d1fc24df55cf9f035b189
|
||||
F ext/misc/csv.c 7f047aeb68f5802e7ce6639292095d622a488bb43526ed04810e0649faa71ceb
|
||||
F ext/misc/dbdump.c baf6e37447c9d6968417b1cd34cbedb0b0ab3f91b5329501d8a8d5be3287c336
|
||||
F ext/misc/eval.c 4b4757592d00fd32e44c7a067e6a0e4839c81a4d57abc4131ee7806d1be3104e
|
||||
F ext/misc/explain.c d5c12962d79913ef774b297006872af1fccda388f61a11d37758f9179a09551f
|
||||
F ext/misc/fileio.c 288e7230e0fe464d71b0694e2d8bdd3a353118ac2e31da3964b95f460f09915f
|
||||
F ext/misc/fossildelta.c 910510968a30ab77b8ac1a27931f2cb834e9db9fd5ab122f53b6045b4315665d
|
||||
F ext/misc/fuzzer.c c4e27daf41433a64cad5265cd27dbcb891147e9994d0422200ce81ce9a54b625
|
||||
F ext/misc/fileio.c 592d6531d8413d81b25f5a47a45d7e310e455d33e03a64c6ae85724c6524a5d5
|
||||
F ext/misc/fuzzer.c 9e79c337faffdd4c5fe4485467537438359b43e0858a40038d4300b894ff553f
|
||||
F ext/misc/ieee754.c f190d0cc5182529acb15babd177781be1ac1718c
|
||||
F ext/misc/json1.c 8af4672f43634257dbcfdb4515b4070325463d67c6968b4be1bd414de28d4d58
|
||||
F ext/misc/memstat.c 3017a0832c645c0f8c773435620d663855f04690172316bd127270d1a7523d4d
|
||||
@@ -298,7 +295,7 @@ F ext/misc/memvfs.c ab36f49e02ebcdf85a1e08dc4d8599ea8f343e073ac9e0bca18a98b7e1ec
|
||||
F ext/misc/mmapwarm.c 8c5fe90d807a23e44a8b93e96e8b812b19b300d5fd8c1d40a4fd1d8224e33f46
|
||||
F ext/misc/nextchar.c 279f80fe8ef5ba413242e2704e246503ac601f005eefb180d19e6c920338a0ba
|
||||
F ext/misc/normalize.c b4290464f542bae7a97b43f15bd197949b833ffd668b7c313631bd5d4610212c
|
||||
F ext/misc/percentile.c 148dd07286b16e50f232bb638a47850085ad37d51f270429905bd865e595d1ca
|
||||
F ext/misc/percentile.c a6a1594c104da2d0ceab38fe609eb2f65529272377827f6f8a2b5c9fa6119e7e
|
||||
F ext/misc/prefixes.c 7be86d17525cfae6ed462fc3c519efc44488ac329890f77491c8f82871f57e17
|
||||
F ext/misc/regexp.c 79345bf03496155a640ee0300d3307296761cebb5e115b4e342cc2fb5861ec10
|
||||
F ext/misc/remember.c add730f0f7e7436cd15ea3fd6a90fd83c3f706ab44169f7f048438b7d6baa69c
|
||||
@@ -313,9 +310,9 @@ F ext/misc/sqlar.c 57d5bc45cd5492208e451f697404be88f8612527d64c9d42f96b325b64983
|
||||
F ext/misc/stmt.c 8a8dc4675042e4551e4afe99b8d0cc7a4a2fc1a8dacc0a9ce1b1bbff145da93d
|
||||
F ext/misc/templatevtab.c 8a16a91a5ceaccfcbd6aaaa56d46828806e460dd194965b3f77bf38f14b942c4
|
||||
F ext/misc/totype.c 4a167594e791abeed95e0a8db028822b5e8fe512
|
||||
F ext/misc/unionvtab.c 36237f0607ca954ac13a4a0e2d2ac40c33bc6e032a5f55f431713061ef1625f9
|
||||
F ext/misc/unionvtab.c 34ee634d09670909563dbde59c5bfb2ac048b27051f65f1aeac918b061d646d8
|
||||
F ext/misc/vfslog.c 3b25c2f56ba60788db247287be6ab024b53c4afffd412b4876db563389be0d35
|
||||
F ext/misc/vfsstat.c 77b5b4235c9f7f11eddf82487c0a422944ac2f132dafd5af3be7a68a057b1cdb
|
||||
F ext/misc/vfsstat.c bf10ef0bc51e1ad6756629e1edb142f7a8db1178
|
||||
F ext/misc/vtablog.c 5538acd0c8ddaae372331bee11608d76973436b77d6a91e8635cfc9432fba5ae
|
||||
F ext/misc/vtshim.c 1976e6dd68dd0d64508c91a6dfab8e75f8aaf6cd
|
||||
F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212
|
||||
@@ -357,7 +354,7 @@ F ext/rbu/rbutemplimit.test 7f408f49b90fa0a720d7599f3aec74a3c85e6cd78e56fdf726ce
|
||||
F ext/rbu/rbuvacuum.test 55e101e90168c2b31df6c9638fe73dc7f7cc666b6142266d1563697d79f73534
|
||||
F ext/rbu/rbuvacuum2.test b8e5b51dc8b2c0153373d024c0936be3f66f9234acbd6d0baab0869d56b14e6b
|
||||
F ext/rbu/rbuvacuum3.test 8addd82e4b83b4c93fa47428eae4fd0dbf410f8512c186f38e348feb49ba03dc
|
||||
F ext/rbu/sqlite3rbu.c d0627582dc894d96e70a1f4b3c8953abdd9fd4870f9a229479309ebfca9eda41
|
||||
F ext/rbu/sqlite3rbu.c d643661c7c85e79f4d0bc56c73f6f2dd55c35732dd41f378b0fd3b182a33242d
|
||||
F ext/rbu/sqlite3rbu.h 1dc88ab7bd32d0f15890ea08d23476c4198d3da3056985403991f8c9cd389812
|
||||
F ext/rbu/test_rbu.c 03f6f177096a5f822d68d8e4069ad8907fe572c62ff2d19b141f59742821828a
|
||||
F ext/repair/README.md 92f5e8aae749a4dae14f02eea8e1bb42d4db2b6ce5e83dbcdd6b1446997e0c15
|
||||
@@ -371,7 +368,7 @@ F ext/repair/test/checkindex01.test b530f141413b587c9eb78ff734de6bb79bc3515c3350
|
||||
F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c
|
||||
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
|
||||
F ext/rtree/geopoly.c 061432bddc38c4c10c7e4ce940d581c886d65bb5814b4b65b46ad046aa85eaa2
|
||||
F ext/rtree/rtree.c f2ce90120f3e2e01f8a510a227cafbea224c08ba2bf6809b0139c671de2873dc
|
||||
F ext/rtree/rtree.c 57729cc19f3832e5f9051556af44ed264b5bd54b01543cd7e50d5143817b964c
|
||||
F ext/rtree/rtree.h 4a690463901cb5e6127cf05eb8e642f127012fd5003830dbc974eca5802d9412
|
||||
F ext/rtree/rtree1.test 7573134f1b4f59df36c1b0a6de51268fd3b9c714d91f3811482263e734e416ea
|
||||
F ext/rtree/rtree2.test 5f25b01acd03470067a2d52783b2eb0a50bf836803d4342d20ca39e541220fe2
|
||||
@@ -401,7 +398,7 @@ F ext/rtree/tkt3363.test 142ab96eded44a3615ec79fba98c7bde7d0f96de
|
||||
F ext/rtree/util/randomshape.tcl 54ee03d0d4a1c621806f7f44d5b78d2db8fac26e0e8687c36c4bd0203b27dbff
|
||||
F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
|
||||
F ext/rtree/visual01.txt e9c2564083bcd30ec51b07f881bffbf0e12b50a3f6fced0c222c5c1d2f94ac66
|
||||
F ext/session/changeset.c 7a1e6a14c7e92d36ca177e92e88b5281acd709f3b726298dc34ec0fb58869cb5
|
||||
F ext/session/changeset.c d046906a0c9a37862fcd5dbfda5eb08dea361b9abdd959b34358a63fa246164f
|
||||
F ext/session/changesetfuzz.c 01023c41cfb02e191d144ea8bfdc46443393b62d13873f5fa044fc9886e60142
|
||||
F ext/session/changesetfuzz1.test 2e1b90d888fbf0eea5e1bd2f1e527a48cc85f8e0ff75df1ec4e320b21f580b3a
|
||||
F ext/session/session1.test 0b2f88995832ea040ae8e83a1ad4afa99c00b85c779d213da73a95ea4113233e
|
||||
@@ -413,7 +410,7 @@ F ext/session/session6.test 443789bc2fca12e4f7075cf692c60b8a2bea1a26
|
||||
F ext/session/session8.test 8e194b3f655d861ca36de5d4de53f702751bab3b
|
||||
F ext/session/session9.test 5409d90d8141881d08285ed1c2c0d8d10fb92069
|
||||
F ext/session/sessionA.test 1feeab0b8e03527f08f2f1defb442da25480138f
|
||||
F ext/session/sessionB.test c4fb7f8a688787111606e123a555f18ee04f65bb9f2a4bb2aa71d55ce4e6d02c
|
||||
F ext/session/sessionB.test 886252dcb7e692e62ef7e357456200912e367823
|
||||
F ext/session/sessionC.test f8a5508bc059ae646e5ec9bdbca66ad24bc92fe99fda5790ac57e1f59fce2fdf
|
||||
F ext/session/sessionD.test 4f91d0ca8afc4c3969c72c9f0b5ea9527e21de29039937d0d973f821e8470724
|
||||
F ext/session/sessionE.test b2010949c9d7415306f64e3c2072ddabc4b8250c98478d3c0c4d064bce83111d
|
||||
@@ -430,8 +427,8 @@ F ext/session/sessioninvert.test ae1a003a9ab1f8d64227dbb5c3a4c97e65b561b01e7b295
|
||||
F ext/session/sessionrebase.test ccfa716b23bd1d3b03217ee58cfd90c78d4b99f53e6a9a2f05e82363b9142810
|
||||
F ext/session/sessionstat1.test 218d351cf9fcd6648f125a26b607b140310160184723c2666091b54450a68fb5
|
||||
F ext/session/sessionwor.test 67b5ab91d4f93ce65ff1f58240ac5ddf73f8670facc1ffa49cef56293d52818d
|
||||
F ext/session/sqlite3session.c faf074fedbb3d17d82b1321575b5412e234746a2d5bd2244bc85484786ab686d
|
||||
F ext/session/sqlite3session.h 919be6649d39d6413ce7a63fc3e3bca3270e18bc2d57ad4040a70007b9e54397
|
||||
F ext/session/sqlite3session.c 4c79daf65e89c78dd62fd97a1b2eac3e53be700b29914101453a0d951f7ba9c8
|
||||
F ext/session/sqlite3session.h 54d6356f5769d3695e5f63d719c6ee27671b2614973a2b675a3ff4d30d574233
|
||||
F ext/session/test_session.c 98797aba475a799376c9a42214f2d1debf2d0c3cb657d9c8bbf4f70bf3fb4aec
|
||||
F ext/userauth/sqlite3userauth.h 7f3ea8c4686db8e40b0a0e7a8e0b00fac13aa7a3
|
||||
F ext/userauth/user-auth.txt e6641021a9210364665fe625d067617d03f27b04
|
||||
@@ -451,17 +448,17 @@ F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca
|
||||
F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b
|
||||
F sqlite3.1 fc7ad8990fc8409983309bb80de8c811a7506786
|
||||
F sqlite3.pc.in 48fed132e7cb71ab676105d2a4dc77127d8c1f3a
|
||||
F src/alter.c 25f54387121a0c5fd0f49b299f4070c81af8f26a84edaae6de679c4e4b71b1ff
|
||||
F src/alter.c cb691d6cd330312b7951c9d3bc0bc29804bbe80beac1cdd137d824b119b6f28a
|
||||
F src/analyze.c 58db66344a5c58dcabb57f26696f6f2993956c830446da40b444051d2fdaf644
|
||||
F src/attach.c 732d45dbf802b79f66503614a23e862887231d4d4937eac7c28a92c6fdb78e1f
|
||||
F src/attach.c 3f9b0f6c79500cc40f4e543bc130a0b4ee13f52b45cbb6735608776cbdb79f0e
|
||||
F src/auth.c 0fac71038875693a937e506bceb492c5f136dd7b1249fbd4ae70b4e8da14f9df
|
||||
F src/backup.c 78d3cecfbe28230a3a9a1793e2ead609f469be43e8f486ca996006be551857ab
|
||||
F src/bitvec.c 17ea48eff8ba979f1f5b04cc484c7bb2be632f33
|
||||
F src/btmutex.c 8acc2f464ee76324bf13310df5692a262b801808984c1b79defb2503bbafadb6
|
||||
F src/btree.c 0799c2764874a0bcd84a17c4848f8faf16cceb3081c4117b88470c84ee0dfcad
|
||||
F src/btree.h c11446f07ec0e9dc85af8041cb0855c52f5359c8b2a43e47e02a685282504d89
|
||||
F src/btreeInt.h 6111c15868b90669f79081039d19e7ea8674013f907710baa3c814dc3f8bfd3f
|
||||
F src/build.c 241006a97dee8a3e762a724aa549ca79171826a5b0b1d8e7ee41ffcd92bc5328
|
||||
F src/btree.c 84b7c5c3829b60823e15e7a8407462b69be3818f96518fef28f97ac0fbbca72b
|
||||
F src/btree.h 63b94fb38ce571c15eb6a3661815561b501d23d5948b2d1e951fbd7a2d04e8d3
|
||||
F src/btreeInt.h cd82f0f08886078bf99b29e1a7045960b1ca5d9d5829c38607e1299c508eaf00
|
||||
F src/build.c 906ca6663b9dcd413e72ae9c44dd51e596d8336b04d52e678a7501e71c20cab2
|
||||
F src/callback.c 25dda5e1c2334a367b94a64077b1d06b2553369f616261ca6783c48bcb6bda73
|
||||
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
|
||||
F src/ctime.c 109e58d00f62e8e71ee1eb5944ac18b90171c928ab2e082e058056e1137cc20b
|
||||
@@ -469,19 +466,19 @@ F src/date.c ebe1dc7c8a347117bb02570f1a931c62dd78f4a2b1b516f4837d45b7d6426957
|
||||
F src/dbpage.c 135eb3b5e74f9ef74bde5cec2571192c90c86984fa534c88bf4a055076fa19b7
|
||||
F src/dbstat.c c12833de69cb655751487d2c5a59607e36be1c58ba1f4bd536609909ad47b319
|
||||
F src/delete.c d08c9e01a2664afd12edcfa3a9c6578517e8ff8735f35509582693adbe0edeaf
|
||||
F src/expr.c f2d0ecf68213770be4fad83128ce02e67667deebaa0a44061313f7e4f2a4ae28
|
||||
F src/expr.c 182dc9ff30aa6a430b7f728ce84fda85ec10890e29fdf75be1e871d13222a99c
|
||||
F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007
|
||||
F src/fkey.c bd0138acdc008c1845ccf92f8e73787880562de649471804801c06fed814c765
|
||||
F src/func.c 2ccf4ae12430b1ae7096be5f0675887e1bd0732828af0ac0f7496339b7c6edee
|
||||
F src/func.c 0341881d22903aac5ba7f352b188806d6436e1d6ae4235ff01e44d56879dfe63
|
||||
F src/global.c 0dea3065ea72a65ae941559b6686aad6516d4913e76fa4f79a95ff7787f624ec
|
||||
F src/hash.c a12580e143f10301ed5166ea4964ae2853d3905a511d4e0c44497245c7ce1f7a
|
||||
F src/hash.h ab34c5c54a9e9de2e790b24349ba5aab3dbb4fd4
|
||||
F src/hwtime.h 747c1bbe9df21a92e9c50f3bbec1de841dc5e5da
|
||||
F src/in-operator.md 10cd8f4bcd225a32518407c2fb2484089112fd71
|
||||
F src/insert.c 4ce12b5ba3bcbfa17ec37ce960d499fc287b6289df2c00b31201f716a3c7df45
|
||||
F src/insert.c 4cf069988908f650bec92fd821a082f6eda87c01191047e49a1a5007af93274c
|
||||
F src/legacy.c d7874bc885906868cd51e6c2156698f2754f02d9eee1bae2d687323c3ca8e5aa
|
||||
F src/loadext.c e6f10875d52aca3b7e57ce1ec174aeafc9b6c00b43000cd30d791f9cb490b7a6
|
||||
F src/main.c 11714c8cefd458970cb1fd005251d0ad02ad69598893833b5564ffaaef192a1f
|
||||
F src/main.c 27d7265625ea6eaccdfe7c53ef41adc179c9357a077702a860c1a3b0a037a16f
|
||||
F src/malloc.c 0f9da2a66b230a5785af94b9672126845099b57b70a32c987d04ac28c69da990
|
||||
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
|
||||
F src/mem1.c c12a42539b1ba105e3707d0e628ad70e611040d8f5e38cf942cee30c867083de
|
||||
@@ -494,40 +491,40 @@ F src/msvc.h 4942752b6a253116baaa8de75256c51a459a5e81
|
||||
F src/mutex.c bae36f8af32c22ad80bbf0ccebec63c252b6a2b86e4d3e42672ff287ebf4a604
|
||||
F src/mutex.h 779d588e3b7756ec3ecf7d78cde1d84aba414f85
|
||||
F src/mutex_noop.c 9d4309c075ba9cc7249e19412d3d62f7f94839c4
|
||||
F src/mutex_unix.c aaf9ebc3f89df28483c52208497a99a02cc3650011422fc9d4c57e4392f7fe58
|
||||
F src/mutex_w32.c 7670d770c94bbfe8289bec9d7f1394c5a00a57c37f892aab6b6612d085255235
|
||||
F src/mutex_unix.c 38abc2b703aae750e062947b75442893b02d8e124383d0e72d309e1c0d96d5e9
|
||||
F src/mutex_w32.c 761007c4382f684ebff7be2529a4926f6f2d30a178ef188d6b39ab35be5fefb4
|
||||
F src/notify.c 9711a7575036f0d3040ba61bc6e217f13a9888e7
|
||||
F src/os.c 8aeb0b0f40f8f5b0da03fe49706695adaf42d2f516ab95abc72e86c245e119de
|
||||
F src/os.h 48388821692e87da174ea198bf96b1b2d9d83be5dfc908f673ee21fafbe0d432
|
||||
F src/os_common.h b2f4707a603e36811d9b1a13278bffd757857b85
|
||||
F src/os_setup.h 0dbaea40a7d36bf311613d31342e0b99e2536586
|
||||
F src/os_unix.c f6e91b8fd82af7afbfd073c4974ad6cdb8e62d9f65ceddb45167835a0567fdc0
|
||||
F src/os_win.c 85d9e532d0444ab6c16d7431490c2e279e282aa0917b0e988996b1ae0de5c5a0
|
||||
F src/os_unix.c 53b42b7c8c72433f6df81a66c956ba13d9a31f1e710ffebbc9de97573480571f
|
||||
F src/os_win.c 1dcd863d151c39b8f4b7eba3e2eb04366f0493fe0b54f54f64fb8115f749e895
|
||||
F src/os_win.h 7b073010f1451abe501be30d12f6bc599824944a
|
||||
F src/pager.c 422fd8cfa59fb9173eff36a95878904a0eeb0dcc62ba49350acc8b1e51c4dc7b
|
||||
F src/pager.c 857dde3e525f665cfab23b6765bf04ca6638c0759ae7da6d63acfb463e230aa6
|
||||
F src/pager.h 217921e81eb5fe455caa5cda96061959706bcdd29ddb57166198645ef7822ac3
|
||||
F src/parse.y a020386af1739371b2eafba077497aacf2a840d1a178508dc6f8c19448e42054
|
||||
F src/parse.y 741a270b7f2f85bc5d026d06fb5a9ccba5335304ff2831e1cb44b36cd0da6006
|
||||
F src/pcache.c 696a01f1a6370c1b50a09c15972bc3bee3333f8fcd1f2da8e9a76b1b062c59ee
|
||||
F src/pcache.h 4f87acd914cef5016fae3030343540d75f5b85a1877eed1a2a19b9f284248586
|
||||
F src/pcache1.c a72804486dfa8e4b6bc30d666c97ecf1155f91a4351fc6e48ea4097e4eb304fb
|
||||
F src/pragma.c af67dedaad8bafe9a5f9adcec32a0da6dd118617dd8220ad1d118f5a6bf83a02
|
||||
F src/pragma.h a776bb9c915207e9d1117b5754743ddf1bf6a39cc092a4a44e74e6cb5fab1177
|
||||
F src/prepare.c 78027c6231fbb19ca186a5f5f0c0a1375d9c2cec0655273f9bd90d9ff74a34b3
|
||||
F src/printf.c 93a3d539019264683a444bc043c875e9a6cca43fe935ae7bf6cfff0af3bba118
|
||||
F src/printf.c cbf27c320091a83279d1738f68a27a9fe01698c607ce80516ab6bdb5a9c36a1a
|
||||
F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
|
||||
F src/resolve.c 567888ee3faec14dae06519b4306201771058364a37560186a3e0e755ebc4cb8
|
||||
F src/resolve.c c8f207247472c41ac73d738e1c1a80719ad253d1dbb617ed57740492b2a6c097
|
||||
F src/rowset.c d977b011993aaea002cab3e0bb2ce50cf346000dff94e944d547b989f4b1fe93
|
||||
F src/select.c 9263f5c30dd44c7ac2eb29f40a7ec64322a96885b71c00de6bc30b756c2e1c49
|
||||
F src/shell.c.in c1986496062f9dba4ed5b70db06b5e0f32e1954cdcfab0b30372c6c186796810
|
||||
F src/sqlite.h.in f765fce74038607388d3a96cd7fad892f363bdcde24911565edf610ecf69534c
|
||||
F src/select.c c998f694759e37799929e28df8a2649747f8774d4fc233529ab6bda689388e15
|
||||
F src/shell.c.in f2c1adbee3f6f36686b4a38d2168ebfc25298b4ad1e6d95199fc4e95b539251d
|
||||
F src/sqlite.h.in 7da74fd5bd7a9dbe92297060f036935520b26e240457287c5e67c7b9db51a986
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h 960f1b86c3610fa23cb6a267572a97dcf286e77aa0dd3b9b23292ffaa1ea8683
|
||||
F src/sqliteInt.h 59b625f88bf96cad4cd1a6a6ded615c161f518fb56da3e49f2ff70429e49095f
|
||||
F src/sqliteInt.h 8628c582eafa5ca93523cdaa7c45b2f38a11132e419c7923850706da7fa36bc2
|
||||
F src/sqliteLimit.h 1513bfb7b20378aa0041e7022d04acb73525de35b80b252f1b83fedb4de6a76b
|
||||
F src/status.c 46e7aec11f79dad50965a5ca5fa9de009f7d6bde08be2156f1538a0a296d4d0e
|
||||
F src/table.c b46ad567748f24a326d9de40e5b9659f96ffff34
|
||||
F src/tclsqlite.c cfe7f93daf9d8787f65e099efb67d7cdfc2c35236dec5d3f6758520bd3519424
|
||||
F src/test1.c cfb303eeddd3670409af6b58d2ddb928b8e9e70822d681d3df88dfaabb7bea6a
|
||||
F src/tclsqlite.c 6b19e7562195aaf881f3e35e2472dc01ae3cb156961db5126c3d616744729b7e
|
||||
F src/test1.c 353b066e7ec761c4c715c1c20b888e0e7a0b0c0eda7f68c110e032d63713cade
|
||||
F src/test2.c 3efb99ab7f1fc8d154933e02ae1378bac9637da5
|
||||
F src/test3.c 61798bb0d38b915067a8c8e03f5a534b431181f802659a6616f9b4ff7d872644
|
||||
F src/test4.c 18ec393bb4d0ad1de729f0b94da7267270f3d8e6
|
||||
@@ -546,7 +543,7 @@ F src/test_config.c 5ebafbcd5c75ac1c16bb0c8fe926dc325cc03e780943a88ca50e0d9a4fc4
|
||||
F src/test_delete.c e2fe07646dff6300b48d49b2fee2fe192ed389e834dd635e3b3bac0ce0bf9f8f
|
||||
F src/test_demovfs.c a0c3bdd45ed044115c2c9f7779e56eafff18741e
|
||||
F src/test_devsym.c 1960abbb234b97e9b920f07e99503fc04b443f62bbc3c6ff2c2cea2133e3b8a2
|
||||
F src/test_fs.c c10706d63e64f1b1d0274e42c5443886c15ee9d6157b3bd330786aeb4057b151
|
||||
F src/test_fs.c 35a2f7dd8a915900873386331386d9ba1ae1b5026d74fd20c2807bc76221f291
|
||||
F src/test_func.c d12d805953bcb3bb19f71d29cdc93383b7b7a3369504d2b7e398a1bd77376294
|
||||
F src/test_hexio.c 1d4469ca61ab202a1fcec6543f584d2407205e8d
|
||||
F src/test_init.c 4413c211a94b62157ca4c145b3f27c497f03c664
|
||||
@@ -580,19 +577,19 @@ F src/test_windirent.h 90dfbe95442c9762357fe128dc7ae3dc199d006de93eb33ba3972e0a9
|
||||
F src/test_window.c cdae419fdcea5bad6dcd9368c685abdad6deb59e9fc8b84b153de513d394ba3f
|
||||
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
|
||||
F src/threads.c 4ae07fa022a3dc7c5beb373cf744a85d3c5c6c3c
|
||||
F src/tokenize.c d3615f0cbe4db5949503bf5916f3cd4fa5de855d5b4ef560f3b6dd5629423a1e
|
||||
F src/treeview.c 56724725c62a0d0f408f7c257475dc33309198afee36a1d18be1bc268b09055e
|
||||
F src/tokenize.c e61ead283dff63762a9f5be462dbd258dba948e5fb4e3b261fc03703426eb12e
|
||||
F src/treeview.c c6ff90da4cc1813ff2d9bb11f17d4d927db62c47e552faa1835edc47269d753d
|
||||
F src/trigger.c bb034c08eca111e66a19cda045903a12547c1be2294b5570d794b869d9c44a73
|
||||
F src/update.c 0b973357d88092140531e07ff641139c26fb4380b0b9f5ed98c5f7691b4604d1
|
||||
F src/upsert.c 0dd81b40206841814d46942a7337786932475f085716042d0cb2fc7791bf8ca4
|
||||
F src/utf.c 810fbfebe12359f10bc2a011520a6e10879ab2a163bcb26c74768eab82ea62a5
|
||||
F src/util.c 82a2e3f691a3b654be872e305dab1f455e565dedf5e6a90c818c1ab307c00432
|
||||
F src/vacuum.c 532553ee1d47f69c1198858107b1f3af3d16af25f2ab4ce3b1263d9e333f26e2
|
||||
F src/vdbe.c 75d5ccb13010c9cf8c9f2a2be9dc6935950e313c6cea4bc16e7c40e5527fda76
|
||||
F src/vacuum.c a9f389f41556c0ec310bc9169dc9476603c30a0a913ad92bfbc75c86886967ca
|
||||
F src/vdbe.c b7b6f965153607072917dbd81d654a268abf4872c58d556701d1549550766c02
|
||||
F src/vdbe.h 712bca562eaed1c25506b9faf9680bdc75fc42e2f4a1cd518d883fa79c7a4237
|
||||
F src/vdbeInt.h a76d5eed62c76bcd8de7afd3147fac1bc40c5a870582664bcd7d071ef437c37f
|
||||
F src/vdbeapi.c 7a052df80d7e2e55382076174633e888f21fe200feb5d49b1b441b4c38ab851a
|
||||
F src/vdbeaux.c 7aa412e7e56eb53649d87766f3064994a31991ee2b2716bf8c3129fa15cc7653
|
||||
F src/vdbeapi.c 57a2d794a8833f269b878dbc24e955369bdb379af6c4e93ebc5ce1a20fa3daf4
|
||||
F src/vdbeaux.c 4fa28b32452f6197dba7c8780dde11576b9a6d8ce6f35adbb69efc3e7d37fa0c
|
||||
F src/vdbeblob.c f5c70f973ea3a9e915d1693278a5f890dc78594300cf4d54e64f2b0917c94191
|
||||
F src/vdbemem.c 3e89e087df928eba80e520824078dc563c579a0848b1557ac36845ec14392923
|
||||
F src/vdbesort.c 90aad5a92608f2dd771c96749beabdb562c9d881131a860a7a5bccf66dc3be7f
|
||||
@@ -602,11 +599,11 @@ F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9
|
||||
F src/wal.c 3f4f653daf234fe713edbcbca3fec2350417d159d28801feabc702a22c4e213f
|
||||
F src/wal.h 606292549f5a7be50b6227bd685fa76e3a4affad71bb8ac5ce4cb5c79f6a176a
|
||||
F src/walker.c 7607f1a68130c028255d8d56094ea602fc402c79e1e35a46e6282849d90d5fe4
|
||||
F src/where.c ff2955dc2743c1af05ba5a8232ab72724d9a63b76dbee256368f40fd3ef82db5
|
||||
F src/where.c 8a207cb2ca6b99e1edb1e4bbff9b0504385a759cbf66180d1deb34d80ca4b799
|
||||
F src/whereInt.h 5f14db426ca46a83eabab1ae9aa6d4b8f27504ad35b64c290916289b1ddb2e88
|
||||
F src/wherecode.c 9572aab9eff42859a5f3e9b212f704521a84bf77e444217f0339d8b811e6333f
|
||||
F src/whereexpr.c 90859652920f153d2c03f075488744be2926625ebd36911bcbcb17d0d29c891c
|
||||
F src/window.c a63ef839f4987d789cb595a38cf5063a38ab47bb1d0357af65121363fae4734d
|
||||
F src/wherecode.c a571d8d7c19d6db786a201f2df8788b320fefcb2842f2a1eb9a85b85e91bc35f
|
||||
F src/whereexpr.c 36b47f7261d6b6f1a72d774c113b74beddf6745aba1018e64b196e29db233442
|
||||
F src/window.c df2456386e0b1553a8d1fcf3a0ddc4c058fe2c650ea8c74b6bf8862082ddafc9
|
||||
F test/8_3_names.test ebbb5cd36741350040fd28b432ceadf495be25b2
|
||||
F test/affinity2.test a6d901b436328bd67a79b41bb0ac2663918fe3bd
|
||||
F test/affinity3.test 6a101af2fc945ce2912f6fe54dd646018551710d
|
||||
@@ -625,8 +622,8 @@ F test/alterlegacy.test 82022721ce0de29cedc9a7af63bc9fcc078b0ee000f8283b4b6ea9c3
|
||||
F test/altermalloc.test 167a47de41b5c638f5f5c6efb59784002b196fff70f98d9b4ed3cd74a3fb80c9
|
||||
F test/altermalloc2.test fa7b1c1139ea39b8dec407cf1feb032ca8e0076bd429574969b619175ad0174b
|
||||
F test/altertab.test 6e13f13d8c30708f16187908c31dadb1bfff9e3cb2a07a7392a7a5e076f58f4a
|
||||
F test/altertab2.test 5d423a2d1006085b05cc1b788863d5a860ea2da21c4f892d15e2f2a34c78348a
|
||||
F test/altertab3.test b917c2a287a1a97d6e2de216357066441985326a148c99467ca5c73dc17b386a
|
||||
F test/altertab2.test 7bedde2e6e71fdecd7a2af64b696cd0b3d3a344f5cf1db6785d9e3b5665193cf
|
||||
F test/altertab3.test 9dd97ab8161eb6afc0e30e7c61a38336687fbd09e6ddc4c9f1e450cc0b12160b
|
||||
F test/amatch1.test b5ae7065f042b7f4c1c922933f4700add50cdb9f
|
||||
F test/analyze.test 7168c8bffa5d5cbc53c05b7e9c7fcdd24b365a1bc5046ce80c45efa3c02e6b7c
|
||||
F test/analyze3.test ff62d9029e6deb2c914490c6b00caf7fae47cc85cdc046e4a0d0a4d4b87c71d8
|
||||
@@ -666,7 +663,7 @@ F test/autoindex1.test 96185415f5faacd5b8d7a7f505efddd5abb1f111d58338e9c0b1dc40b
|
||||
F test/autoindex2.test 12ef578928102baaa0dc23ad397601a2f4ecb0df
|
||||
F test/autoindex3.test 2dd997d6590438b53e4f715f9278aa91c9299cf3f81246a0915269c35beb790e
|
||||
F test/autoindex4.test 49d3cd791a9baa16fb461d7ea3de80d019a819cf
|
||||
F test/autoindex5.test 1d8c1134e1488a35c6fa205b2f52e72fc220972d946c59492d10bba01d6fecd4
|
||||
F test/autoindex5.test 4a0eb6c7c7ae456d97a2061d4c8d6380946272c5c91d91507c1feb1af3dc7cce
|
||||
F test/autovacuum.test 0831cd34e14695d297187f7f6519265e3121c5b0a1720e548e86829e796129e9
|
||||
F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4
|
||||
F test/avtrans.test b7dc25459ecbd86c6fa9c606ee3068f59d81e225118617dcf2bbb6ded2ade89e
|
||||
@@ -680,7 +677,7 @@ F test/backup_malloc.test 0c9abdf74c51e7bedb66d504cd684f28d4bd4027
|
||||
F test/badutf.test d5360fc31f643d37a973ab0d8b4fb85799c3169f
|
||||
F test/badutf2.test f5bc7f2d280670ecd79b9cf4f0f1760c607fe51f
|
||||
F test/bc_common.tcl b5e42d80305be95697e6370e015af571e5333a1c
|
||||
F test/bestindex1.test 705b57d7f51d53ee5fd043dd9666236e1fc18f4d59abf51da0ea5ea1b4804947
|
||||
F test/bestindex1.test 852170bddbb21daa121fabcc274640ff83d7d8705912e8b5fe7ed2c5a9a9224a
|
||||
F test/bestindex2.test 9a0ccd320b6525eec3a706aae6cdab7e1b7b5abca75027e39f39f755e76e5928
|
||||
F test/bestindex3.test 7622e792ff2da16d262d3cea6ad914591ac4806d57ed128e6c940b7920b47b84
|
||||
F test/bestindex4.test 038e3d0789332f3f1d61474f9bbc9c6d08c6bd1783a978f31f38ad82688de601
|
||||
@@ -715,7 +712,7 @@ F test/capi2.test 34a1a9a96d543a2ec2c209696b11b164444f57253b1f2cba1c2e53fadede6c
|
||||
F test/capi3.test 3910a73c38ac76d69778dd9eb481ab7cd6ed59117fc047b4f6056a5c72529de1
|
||||
F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4
|
||||
F test/capi3c.test 54e2dc0c8fd7c34ad1590d1be6864397da2438c95a9f5aee2f8fbc60c112e44b
|
||||
F test/capi3d.test aba917805573a03deed961a21f07a5a84505ad0a616f7e3fc1508844a15bccc4
|
||||
F test/capi3d.test 485048dc5cd07bc68011e4917ad035ad6047ab82
|
||||
F test/capi3e.test 3d49c01ef2a1a55f41d73cba2b23b5059ec460fe
|
||||
F test/cast.test 5ceb920718d280b61163500a7d29e0e0a86458b1cbd92d96f962c9d970aa3857
|
||||
F test/cffault.test 9d6b20606afe712374952eec4f8fd74b1a8097ef
|
||||
@@ -741,7 +738,7 @@ F test/conflict2.test bb0b94cf7196c64a3cbd815c66d3ee98c2fecd9c
|
||||
F test/conflict3.test a83db76a6c3503b2fa057c7bfb08c318d8a422202d8bc5b86226e078e5b49ff9
|
||||
F test/contrib01.test 2a1cbc0f2f48955d7d073f725765da6fbceda6b4
|
||||
F test/corrupt.test d7cb0300e4a297147b6a05e92a1684bc8973635c3bcaa3d66e983c9cbdbf47a3
|
||||
F test/corrupt2.test bb50042cf9a1f1023d73af325d47eb02a6bb11e3c52f8812644b220c5d4bca35
|
||||
F test/corrupt2.test a7f95356d19a4e8bf9423622ad865cabf48ae49dad40eb7a17a0b39f1cdd6948
|
||||
F test/corrupt3.test f95d7bf78109e0b84eb285a787ce91a3fd6a2dd7d0cb55882abff3bdc081a57e
|
||||
F test/corrupt4.test 8d1d86b850fcc43e417450454f2044e52d55778a
|
||||
F test/corrupt5.test 387be3250795e2a86e6234745558b80efb248a357d0cd8e53bce75c7463f545d
|
||||
@@ -752,15 +749,15 @@ F test/corrupt9.test 730a3db08d4ab9aa43392ea30d9c2b4879cbff85
|
||||
F test/corruptA.test 112f4b2ae0b95ebf3ea63718642fb969a93acea557ace3a307234d19c245989b
|
||||
F test/corruptB.test 73a8d6c0b9833697ecf16b63e3c5c05c945b5dec
|
||||
F test/corruptC.test 138ecb02188ed1a719b533d4a139568204039f72f00e07a8d30d920bd83122db
|
||||
F test/corruptD.test 33a37ce3ed56a20093ceee778cd2d7109c7085a59f3213d2baede11d952e8e50
|
||||
F test/corruptD.test b3c205fac7952b1de645ce44bb02335cd9e3e040
|
||||
F test/corruptE.test 82ccf4f8f543fdbedd4aa42c709cb077f7374c62
|
||||
F test/corruptF.test be9fde98e4c93648f1ba52b74e5318edc8f59fe4
|
||||
F test/corruptG.test adf79b669cbfd19e28c8191a610d083ae53a6d51
|
||||
F test/corruptH.test 79801d97ec5c2f9f3c87739aa1ec2eb786f96454
|
||||
F test/corruptI.test a17bbf54fdde78d43cf3cc34b0057719fd4a173a3d824285b67dc5257c064c7b
|
||||
F test/corruptJ.test 4d5ccc4bf959464229a836d60142831ef76a5aa4
|
||||
F test/corruptK.test 5b4212fe346699831c5ad559a62c54e11c0611bdde1ea8423a091f9c01aa32af
|
||||
F test/corruptL.test a569f3cece872a1f21568bd5378f55ce5c365c50845a06fae65a2721cce62264
|
||||
F test/corruptK.test 5ef338c560ca4dfb7360828da16f1829be4deba3b378cafdc7a1cdaf027eb5c4
|
||||
F test/corruptL.test 0f64242b83db6d0bd5b6e38c205bf7c2a3bc6c9f80351f49c4dee1639aca60d8
|
||||
F test/cost.test 51f4fcaae6e78ad5a57096831259ed6c760e2ac6876836e91c00030fad385b34
|
||||
F test/count.test cb2e0f934c6eb33670044520748d2ecccd46259c
|
||||
F test/countofview.test e3d4cd6900e4e4f074968ab24b8b87d3671cd624961bef40fd3a6b8f574343cf
|
||||
@@ -787,7 +784,7 @@ F test/date2.test 74c234bece1b016e94dd4ef9c8cc7a199a8806c0e2291cab7ba64bace6350b
|
||||
F test/dbfuzz.c 73047c920d6210e5912c87cdffd9a1c281d4252e
|
||||
F test/dbfuzz001.test 29b6c6b39a701b6b5b08035c637674b76e1ecea515b1a184b29e3bd0f2d02dad
|
||||
F test/dbfuzz2-seed1.db e6225c6f3d7b63f9c5b6867146a5f329d997ab105bee64644dc2b3a2f2aebaee
|
||||
F test/dbfuzz2.c 6c355cf70c4a308b1b84a11a65282bcac5b4038db77de5cfc8ad080ef371f109
|
||||
F test/dbfuzz2.c 5d5eb817dc8195e0228227510ee6a4b49f46e679fc2d5be96841cce819bf42f7
|
||||
F test/dbpage.test 650234ba683b9d82b899c6c51439819787e7609f17a0cc40e0080a7b6443bc38
|
||||
F test/dbstatus.test cd83aa623b8aab477269bc94cf8aa90c1e195a144561dd04a1620770aaa8524e
|
||||
F test/dbstatus2.test f5fe0afed3fa45e57cfa70d1147606c20d2ba23feac78e9a172f2fe8ab5b78ef
|
||||
@@ -910,7 +907,7 @@ F test/fts3al.test 07d64326e79bbdbab20ee87fc3328fbf01641c9f
|
||||
F test/fts3am.test 218aa6ba0dfc50c7c16b2022aac5c6be593d08d8
|
||||
F test/fts3an.test a49ccadc07a2f7d646ec1b81bc09da2d85a85b18
|
||||
F test/fts3ao.test 266989148fec6d9f1bb6c5382f7aa3dcea0e9cd444576e28dd2b9287ac7dd220
|
||||
F test/fts3atoken.test b7a50a58177af017ecda446e66e84d48e21e850e39e8750f1aedad0fd891450e
|
||||
F test/fts3atoken.test 4b4c16fdcfc972f2cdbba212375a060a86ccf5f1
|
||||
F test/fts3auto.test 19097050a3ca7ab7a43b2be967cb3dfd8ddf841dfdc4eac88deb172ad2f209f2
|
||||
F test/fts3aux1.test 7a170e172afdbceb67f5baa05941fd4fbf56af42f61daa3d140f4b4bf4cb68f6
|
||||
F test/fts3aux2.test 2459e7fa3e22734aed237d1e2ae192f5541c4d8b218956ad2d90754977bf907f
|
||||
@@ -921,7 +918,7 @@ F test/fts3conf.test c84bbaec81281c1788aa545ac6e78a6bd6cde2bdbbce2da261690e3659f
|
||||
F test/fts3corrupt.test 46b9ddda7f6588fd5a5b1f4bb4fc0618dc45010e7dddb8a3a188baf3197177ae
|
||||
F test/fts3corrupt2.test bf55c3fa0b0dc8ea1c0fe5543623bd27714585da6a129038fd6999fe3b0d25f3
|
||||
F test/fts3corrupt3.test 0d5b69a0998b4adf868cc301fc78f3d0707745f1d984ce044c205cdb764b491f
|
||||
F test/fts3corrupt4.test af68ede153cbeff7309f7da2f9d8fd12a01f7e1debb03eb748c302079ac5ae05
|
||||
F test/fts3corrupt4.test ff7313656c4ad446e61c41e5cb81336441eaaafe6f4fd6938f1c3ac0c985045e
|
||||
F test/fts3cov.test cb932743da52a1c79a1ab8983e26c8121cf02263d6ff16e1f642e6f9b8348338
|
||||
F test/fts3d.test 2bd8c97bcb9975f2334147173b4872505b6a41359a4f9068960a36afe07a679f
|
||||
F test/fts3defer.test f4c20e4c7153d20a98ee49ee5f3faef624fefc9a067f8d8d629db380c4d9f1de
|
||||
@@ -932,7 +929,7 @@ F test/fts3e.test 1f6c6ac9cc8b772ca256e6b22aaeed50c9350851
|
||||
F test/fts3expr.test ebae205a7a89446c32583bcd492dcb817b9f6b31819bb4dde2583bb99c77e526
|
||||
F test/fts3expr2.test 18da930352e5693eaa163a3eacf96233b7290d1a
|
||||
F test/fts3expr3.test c4d4a7d6327418428c96e0a3a1137c251b8dfbf8
|
||||
F test/fts3expr4.test f5b2832549f01b1f7f73389fa21d4b875499bc95bf7c8b36271844888c6a0938
|
||||
F test/fts3expr4.test cac5dd815fe6b5921741abdccdde3b7f50b86394de91e13308ee7986859c4a9f
|
||||
F test/fts3expr5.test 1368738e3298a7ce0dee3a44d6ebb8f468b2a76f3d1dd18d4ea6d8bc2eeccc1b
|
||||
F test/fts3fault.test 798e45af84be7978ca33d5bdc94246eb44724db24174b5d8e9b1ac46c57fb08d
|
||||
F test/fts3fault2.test 6a17a11d8034b1c4eca9f3091649273d56c49ff049e2173df8060f94341e9da0
|
||||
@@ -987,15 +984,15 @@ F test/fuzz3.test 9c813e6613b837cb7a277b0383cd66bfa07042b4cf0317157c35852f30043c
|
||||
F test/fuzz4.test c229bcdb45518a89e1d208a21343e061503460ac69fae1539320a89f572eb634
|
||||
F test/fuzz_common.tcl a87dfbb88c2a6b08a38e9a070dabd129e617b45b
|
||||
F test/fuzz_malloc.test f348276e732e814802e39f042b1f6da6362a610af73a528d8f76898fde6b22f2
|
||||
F test/fuzzcheck.c d0e76671ea5c3a766768b65d69f7d755aa614a98c17b84fa4496f4cd2e2fa515
|
||||
F test/fuzzcheck.c 7ab35ca464fa0fa9c8340b71f08a16c50c14b961264c172cc3d1a67289b2800d
|
||||
F test/fuzzdata1.db 7ee3227bad0e7ccdeb08a9e6822916777073c664
|
||||
F test/fuzzdata2.db 128b3feeb78918d075c9b14b48610145a0dd4c8d6f1ca7c2870c7e425f5bf31f
|
||||
F test/fuzzdata3.db c6586d3e3cef0fbc18108f9bb649aa77bfc38aba
|
||||
F test/fuzzdata4.db b502c7d5498261715812dd8b3c2005bad08b3a26e6489414bd13926cd3e42ed2
|
||||
F test/fuzzdata5.db e35f64af17ec48926481cfaf3b3855e436bd40d1cfe2d59a9474cb4b748a52a5
|
||||
F test/fuzzdata6.db 92a80e4afc172c24f662a10a612d188fb272de4a9bd19e017927c95f737de6d7
|
||||
F test/fuzzdata7.db f46c9a5698c1ca75ca6280c7c879a3f46dc82fe4b1ce246827496b806488952d
|
||||
F test/fuzzdata8.db 9dcffb6ca959e466e3da7d76f992d877dfc0b302d316554a786d320af97a6dd2
|
||||
F test/fuzzdata7.db 3fc78e65dfe0be9df9e262075d5a335f18f627da47dfc691d1a7b822f34d4b99
|
||||
F test/fuzzdata8.db 3f7c67741ba91c13955609700a44608d2dfe4f037e508f77d236ea9abb431a02
|
||||
F test/fuzzer1.test 3d4c4b7e547aba5e5511a2991e3e3d07166cfbb8
|
||||
F test/fuzzer2.test a85ef814ce071293bce1ad8dffa217cbbaad4c14
|
||||
F test/fuzzerfault.test 8792cd77fd5bce765b05d0c8e01b9edcf8af8536
|
||||
@@ -1009,7 +1006,7 @@ F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
|
||||
F test/icu.test 41aa8847745a879b897a7febea0f8f9efc8e67fe8bf680589b6e07c7b0a1569a
|
||||
F test/ieee754.test 806fc0ce7f305f57e3331eaceeddcfec9339e607
|
||||
F test/imposter1.test c3f1db2d3db2c24611a6596a3fc0ffc14f1466c8
|
||||
F test/in.test 63933d7b71eed01a49df55541a73a75398302b50a05b5333f90481460a32ff49
|
||||
F test/in.test 2fa2dfba1afe30eb830f327e7131dfadaa7a701d677de0eb65f9303d99e18fe0
|
||||
F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
|
||||
F test/in3.test 3cbf58c87f4052cee3a58b37b6389777505aa0c0
|
||||
F test/in4.test d2b38cba404bc4320f4fe1b595b3d163f212c068
|
||||
@@ -1038,7 +1035,7 @@ F test/index9.test 0aa3e509dddf81f93380396e40e9bb386904c1054924ba8fa9bcdfe85a8e7
|
||||
F test/indexedby.test a52c8c6abfae4fbfb51d99440de4ca1840dbacc606b05e29328a2a8ba7cd914e
|
||||
F test/indexexpr1.test 635261197bcdc19b9b2c59bbfa7227d525c00e9587faddb2d293c44d287ce60e
|
||||
F test/indexexpr2.test 38020c247ee77ba19322fadde99db84bdf2aef34f714866786563c3834bb2dce
|
||||
F test/indexfault.test 98d78a8ff1f5335628b62f886a1cb7c7dac1ef6d48fa39c51ec871c87dce9811
|
||||
F test/indexfault.test 31d4ab9a7d2f6e9616933eb079722362a883eb1d
|
||||
F test/init.test 15c823093fdabbf7b531fe22cf037134d09587a7
|
||||
F test/insert.test 9773604f8e1a2595f51488a5643c359d8a11dc55a11cb185910d93387d378458
|
||||
F test/insert2.test 4d14b8f1b810a41995f6286b64a6943215d52208
|
||||
@@ -1083,7 +1080,7 @@ F test/laststmtchanges.test ae613f53819206b3222771828d024154d51db200
|
||||
F test/lemon-test01.y 58b764610fd934e189ffbb0bbfa33d171b9cb06019b55bdc04d090d6767e11d7
|
||||
F test/like.test 11cfd7d4ef8625389df9efc46735ff0b0b41d5e62047ef0f3bc24c380d28a7a6
|
||||
F test/like2.test 3b2ee13149ba4a8a60b59756f4e5d345573852da
|
||||
F test/like3.test 0ce2630e39e32e42ce02d171f0a315189ca71fec37c5ddfb0191eecc3fe9d4da
|
||||
F test/like3.test 430691e6057e11a59e934be74c06b85605b80061d45af5714d52886a811efeb7
|
||||
F test/limit.test 0c99a27a87b14c646a9d583c7c89fd06c352663e
|
||||
F test/limit2.test 9409b033284642a859fafc95f29a5a6a557bd57c1f0d7c3f554bd64ed69df77e
|
||||
F test/loadext.test faa4f6eed07a5aac35d57fdd7bc07f8fc82464cfd327567c10cf0ba3c86cde04
|
||||
@@ -1126,7 +1123,7 @@ F test/malloctraceviewer.tcl b7a54595270c1d201abf1c3f3d461f27eaf24cdef623ad08a0f
|
||||
F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
|
||||
F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
|
||||
F test/memdb.test c1f2a343ad14398d5d6debda6ea33e80d0dafcc7
|
||||
F test/memdb1.test 86fe8f259c5aa0b3118cf78a5a895882c4f398497ad5ea5d08f6604145eac685
|
||||
F test/memdb1.test 0632e6ea56c48e3c6e9b0c73e120310bad8f93762543f809e267888f5a37943f
|
||||
F test/memleak.test 10b9c6c57e19fc68c32941495e9ba1c50123f6e2
|
||||
F test/memsubsys1.test 9e7555a22173b8f1c96c281ce289b338fcba2abe8b157f8798ca195bbf1d347e
|
||||
F test/memsubsys2.test 3e4a8d0c05fd3e5fa92017c64666730a520c7e08
|
||||
@@ -1198,8 +1195,8 @@ F test/parser1.test 6ccdf5e459a5dc4673d3273dc311a7e9742ca952dd0551a6a6320d27035c
|
||||
F test/pcache.test c8acbedd3b6fd0f9a7ca887a83b11d24a007972b
|
||||
F test/pcache2.test af7f3deb1a819f77a6d0d81534e97d1cf62cd442
|
||||
F test/percentile.test 4243af26b8f3f4555abe166f723715a1f74c77ff
|
||||
F test/permutations.test b8f0da2f53ef1bd7ff149a140ee625aa7276c94ae15eb9acc2d8ed4af8f22b13
|
||||
F test/pg_common.tcl 4740dc35190d6acdab14c097783331361301ab504a94d948f6afbb56ce0a51e8
|
||||
F test/permutations.test 52d2c37fe8cc07ec7362024c214b04bb69432995b3a984a3fbabc60fa6ada3ee
|
||||
F test/pg_common.tcl 301ac19c1a52fd55166d26db929b3b89165c634d52b5f8ad76ea8cb06960db30
|
||||
F test/pragma.test c267bf02742c823a191960895b3d52933cebd7beee26757d1ed694f213fcd867
|
||||
F test/pragma2.test e5d5c176360c321344249354c0c16aec46214c9f
|
||||
F test/pragma3.test 8300aa9c63cff1027006ca34bf413a148abbd6dcd471fa9a1ded322fe18c0df9
|
||||
@@ -1207,7 +1204,7 @@ F test/pragma4.test 52d8186f9e8d09b87189432cdd401dfa66d0b32445e837fa19046c8ae762
|
||||
F test/pragma5.test 824ce6ced5d6b7ec71abe37fc6005ff836fe39d638273dc5192b39864b9ee983
|
||||
F test/pragmafault.test 275edaf3161771d37de60e5c2b412627ac94cef11739236bec12ed1258b240f8
|
||||
F test/prefixes.test b524a1c44bffec225b9aec98bd728480352aa8532ac4c15771fb85e8beef65d9
|
||||
F test/printf.test 0300699733e53101b2ce48800518427249edd4053bb50fa0621c6607482f0fdb
|
||||
F test/printf.test a3e559bc9d922e7fe44e9d05c6965fee34fe3bc28300a4248c6a063425246ffd
|
||||
F test/printf2.test 30b5dd0b4b992dc5626496846ecce17ff592cacbcb11c3e589f3ac4d7e129dae
|
||||
F test/progress.test ebab27f670bd0d4eb9d20d49cef96e68141d92fb
|
||||
F test/ptrchng.test ef1aa72d6cf35a2bbd0869a649b744e9d84977fc
|
||||
@@ -1253,7 +1250,7 @@ F test/savepoint5.test 0735db177e0ebbaedc39812c8d065075d563c4fd
|
||||
F test/savepoint6.test f41279c5e137139fa5c21485773332c7adb98cd7
|
||||
F test/savepoint7.test cde525ea3075283eb950cdcdefe23ead4f700daa
|
||||
F test/savepointfault.test f044eac64b59f09746c7020ee261734de82bf9b2
|
||||
F test/scanstatus.test 874e35011779b07725a47dbf1dd6282b0ca04af7e028fb0b534ee544b571be42
|
||||
F test/scanstatus.test d14842d0a2757ee059bcffa365746453d60952ba1077980c9a348a9fefbd232a
|
||||
F test/schema.test 8f7999be894260f151adf15c2c7540f1c6d6a481
|
||||
F test/schema2.test 906408621ea881fdb496d878b1822572a34e32c5
|
||||
F test/schema3.test 1bc1008e1f8cb5654b248c55f27249366eb7ed38
|
||||
@@ -1282,7 +1279,7 @@ F test/selectG.test 089f7d3d7e6db91566f00b036cb353107a2cca6220eb1cb264085a836dae
|
||||
F test/server1.test c2b00864514a68a0e6fd518659dc95d0050307a357a08969872bef027d785dc4
|
||||
F test/session.test 78fa2365e93d3663a6e933f86e7afc395adf18be
|
||||
F test/sessionfuzz-data1.db 1f8d5def831f19b1c74571037f0d53a588ea49a6c4ca2a028fc0c27ef896dbcb
|
||||
F test/sessionfuzz.c be9c4d4afd359ce80024d8b541b9b8a880510aef5cf263df56fc0e9b947727f1
|
||||
F test/sessionfuzz.c b0fcdcf757451957e17396a3af5171f1fdf9b2babc81da9fa35675df46c4729a
|
||||
F test/shared.test 1826673eb5eb745fb91a3bdac99a7737057742ae38dcb0fe076a384d6727578b
|
||||
F test/shared2.test 03eb4a8d372e290107d34b6ce1809919a698e879
|
||||
F test/shared3.test ab693f9b6e156b8bfb2a0ad94f29fe69602a5d38
|
||||
@@ -1368,7 +1365,7 @@ F test/tabfunc01.test 20e98ffe55f35d8d33fd834ca8bf9d4b637e560af8fcd00464b4154d90
|
||||
F test/table.test eb3463b7add9f16a5bb836badf118cf391b809d09fdccd1f79684600d07ec132
|
||||
F test/tableapi.test ecbcc29c4ab62c1912c3717c48ea5c5e59f7d64e4a91034e6148bd2b82f177f4
|
||||
F test/tableopts.test dba698ba97251017b7c80d738c198d39ab747930
|
||||
F test/tclsqlite.test 5a06962d8f18edf4703931f6b7dacd83678d02fa5c8ced9a7958c007ad58626a
|
||||
F test/tclsqlite.test dca8aa30d84175e7d8c8fc43d3ffa11fa56e23fbdac2679d03833a0f326edf34
|
||||
F test/tempdb.test 4cdaa23ddd8acb4d79cbb1b68ccdfd09b0537aaba909ca69a876157c2a2cbd08
|
||||
F test/tempdb2.test 2479226e4cb96f4c663eccd2d12c077cf6bda29ca5cc69a8a58a06127105dd62
|
||||
F test/tempfault.test 0c0d349c9a99bf5f374655742577f8712c647900
|
||||
@@ -1581,7 +1578,7 @@ F test/uri.test 3481026f00ade6dfe8adb7acb6e1e47b04369568
|
||||
F test/uri2.test 9d3ba7a53ee167572d53a298ee4a5d38ec4a8fb7
|
||||
F test/userauth01.test e740a2697a7b40d7c5003a7d7edaee16acd349a9
|
||||
F test/utf16align.test 54cd35a27c005a9b6e7815d887718780b6a462ae
|
||||
F test/vacuum-into.test 48f4cec354fb6f27c98ef58d2fe49a11b71ff131af0cd9140efacc9858b9f670
|
||||
F test/vacuum-into.test 41d84c0603f3e8f3540321e5974d69008c562238c30924a9390c211a8c0a415e
|
||||
F test/vacuum.test ce91c39f7f91a4273bf620efad21086b5aa6ef1d
|
||||
F test/vacuum2.test aa048abee196c16c9ba308465494009057b79f9b
|
||||
F test/vacuum3.test 77ecdd54592b45a0bcb133339f99f1ae0ae94d0d
|
||||
@@ -1648,7 +1645,7 @@ F test/walshared.test 0befc811dcf0b287efae21612304d15576e35417
|
||||
F test/walslow.test c05c68d4dc2700a982f89133ce103a1a84cc285f
|
||||
F test/walthread.test 14b20fcfa6ae152f5d8e12f5dc8a8a724b7ef189f5d8ef1e2ceab79f2af51747
|
||||
F test/walvfs.test c0faffda13d045a96dfc541347886bb1a3d6f3205857fc98e683edfab766ea88
|
||||
F test/where.test 93738e224cd5e7819565a9f272c19fd0ee5893d9cd7f5238ce026bae09b8d710
|
||||
F test/where.test 8215d220633f08da331781cf9ede7fb7aed50eb113473c10acd39a643fd258ba
|
||||
F test/where2.test 478d2170637b9211f593120648858593bf2445a1
|
||||
F test/where3.test 2341a294e17193a6b1699ea7f192124a5286ca6acfcc3f4b06d16c931fbcda2c
|
||||
F test/where4.test 4a371bfcc607f41d233701bdec33ac2972908ba8
|
||||
@@ -1678,22 +1675,16 @@ F test/win32heap.test 10fd891266bd00af68671e702317726375e5407561d859be1aa04696f2
|
||||
F test/win32lock.test fbf107c91d8f5512be5a5b87c4c42ab9fdd54972
|
||||
F test/win32longpath.test 169c75a3b2e43481f4a62122510210c67b08f26d
|
||||
F test/win32nolock.test ac4f08811a562e45a5755e661f45ca85892bdbbc
|
||||
F test/window1.test 7484bf9a2ef2d845a50c9aff866efb8cd9d244b5916a9e97fb384e05f33d242b
|
||||
F test/window1.test 2798c8249e0f122c9bacce6aa7324765a5cd9106e49e7aacc81f6033d281577b
|
||||
F test/window2.tcl 9bfa842d8a62b0d36dc8c1b5972206393c43847433c6d75940b87fec93ce3143
|
||||
F test/window2.test 8e6d2a1b9f54dfebee1cde961c8590cd87b4db45c50f44947a211e1b63c2a05e
|
||||
F test/window3.tcl acea6e86a4324a210fd608d06741010ca83ded9fde438341cb978c49928faf03
|
||||
F test/window3.test e9959a993c8a71e96433be8daaa1827d78b8921e4f12debd7bdbeb3c856ef3cb
|
||||
F test/window4.tcl 5fbaab489677914ee5686b2008426e336daf88a2f58be7df92757f780a5ebf91
|
||||
F test/window4.test bf8f86586ce101bf98e2306e597fa24aadc96c58d70ba4d11f956cf8ca4e0be3
|
||||
F test/window3.tcl 577a3b1ff913208e5248c04dab9df17fd760ce159a752789e26d0cb4a5f91823
|
||||
F test/window3.test e274b7f8952ca4ed25996e0e45c047192b066e0aaff2a822d4293c8c4f1d8d98
|
||||
F test/window4.tcl 511425f6b0abf9b953df54cc9c7295cc7c25d78f4ed6f7a74b094eec0120eccb
|
||||
F test/window4.test c5d6bf3403e4ade2f19df2afe4c16f29fb817c392c6c1c8017edb7165c191a62
|
||||
F test/window5.test d328dd18221217c49c144181975eea17339eaeaf0e9aa558cee3afb84652821e
|
||||
F test/window6.test 465e608c021020fb0948a90200e154cd787bc910449e3dafee44c9ca5bd407fe
|
||||
F test/window7.tcl 6a1210f05d40ec89c22960213a22cd3f98d4e2f2eb20646c83c8c30d4d76108f
|
||||
F test/window7.test ce7f865241fdd1c5c4db869cd7bb2986c3be836bc2e73649a6846dd920f63e0f
|
||||
F test/window8.tcl 97de3829e0e1aae2c3aaae41a55c54bc1b0751bbc80dfdd93020431b7a889dad
|
||||
F test/window8.test 0dd7e2d32605bf59dc6163b924faeff5951419c1c17a9e506e5a38606e97ab7e
|
||||
F test/windowerr.tcl 678bb2c3ddcaaf605163bd9fe647454fa0097688cfd2fecc5dd9f3a5b45b13f2
|
||||
F test/windowerr.test 7eb7439332d3855dd53c58dca8838f6990746f40fac7045c0153172083a9452b
|
||||
F test/windowfault.test 16e906a2c4110c88372ff4bd5de59ac7397ec2f025912eff8e5677eedd126898
|
||||
F test/window6.test 5eae4ae7a590ccf1e605880969ca0bad3955616ac91cad3031baea38748badb3
|
||||
F test/windowfault.test 12ceb6bbb355d13e8fcd88c5731a57256dfdf77b9a7ae20842a76fcd4623df5b
|
||||
F test/with1.test a07b5aad7f77acdf13e52e8814ea94606fcc72e9ea4c99baf293e9d7c63940be
|
||||
F test/with2.test e0030e2f0267a910d6c0e4f46f2dfe941c1cc0d4f659ba69b3597728e7e8f1ab
|
||||
F test/with3.test 8d26920c88283e0a473ceebd3451554922108ce7b2a6a1157c47eb0a7011212c
|
||||
@@ -1718,12 +1709,11 @@ F tool/Replace.cs 02c67258801c2fb5f63231e0ac0f220b4b36ba91
|
||||
F tool/addopcodes.tcl 0288d5b26b9b35f4cb5affb76eec63f1dfce117bbc2020066708069ef60b86ff
|
||||
F tool/build-all-msvc.bat c12328d06c45fec8baada5949e3d5af54bf8c887 x
|
||||
F tool/build-shell.sh 950f47c6174f1eea171319438b93ba67ff5bf367
|
||||
F tool/cg_anno.tcl c1f875f5a4c9caca3d59937b16aff716f8b1883935f1b4c9ae23124705bc8099 x
|
||||
F tool/cg_anno.tcl f95b0006c52cf7f0496b506343415b6ee3cdcdd3 x
|
||||
F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
|
||||
F tool/dbhash.c a06228aa21ebc4e6ea8daa486601d938499238a5
|
||||
F tool/dbtotxt.c 04e25f26be7c7743cdfb4111a8483de0b111925d6afeeb7559ade0ceb73f7f52
|
||||
F tool/dbtotxt.md c9a57af8739957ef36d2cfad5c4b1443ff3688ed33e4901ee200c8b651f43f3c
|
||||
F tool/extract-sqlite3h.tcl 069ceab0cee26cba99952bfa08c0b23e35941c837acabe143f0c355d96c9e2eb x
|
||||
F tool/extract.c 054069d81b095fbdc189a6f5d4466e40380505e2
|
||||
F tool/fast_vacuum.c 5ba0d6f5963a0a63bdc42840f678bad75b2ebce1
|
||||
F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439
|
||||
@@ -1742,7 +1732,7 @@ F tool/max-limits.c cbb635fbb37ae4d05f240bfb5b5270bb63c54439
|
||||
F tool/mkautoconfamal.sh 422fc365358a2e92876ffc62971a0ff28ed472fc8bcf9de0df921c736fdeca5e
|
||||
F tool/mkccode.tcl 86463e68ce9c15d3041610fedd285ce32a5cf7a58fc88b3202b8b76837650dbe x
|
||||
F tool/mkctimec.tcl dd183b73ae1c28249669741c250525f0407e579a70482371668fd5f130d9feb3
|
||||
F tool/mkkeywordhash.c 127d0b86eea32a461b79b6c6b11fa5fd223787b681156d682bf1824bb20e2494
|
||||
F tool/mkkeywordhash.c 1f7f2ac1d9f262c08b67faaca47e6a68262ff39113fa4b27d1db2843b4c33e73
|
||||
F tool/mkmsvcmin.tcl cad0c7b54d7dd92bc87d59f36d4cc4f070eb2e625f14159dc2f5c4204e6a13ea
|
||||
F tool/mkopcodec.tcl d1b6362bd3aa80d5520d4d6f3765badf01f6c43c
|
||||
F tool/mkopcodeh.tcl 352a4319c0ad869eb26442bf7c3b015aa15594c21f1cce5a6420dbe999367c21
|
||||
@@ -1764,7 +1754,7 @@ F tool/replace.tcl 60f91e8dd06ab81f74d213ecbd9c9945f32ac048
|
||||
F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a
|
||||
F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5
|
||||
F tool/run-speed-test.sh f95d19fd669b68c4c38b6b475242841d47c66076
|
||||
F tool/showdb.c af978d1437562776fa4d94bf0cb772314c464e71ef24134a6e2301564ae60bc2
|
||||
F tool/showdb.c e6bc9dba233bf1b57ca0a525a2bba762db4e223de84990739db3f09c46151b1e
|
||||
F tool/showjournal.c 5bad7ae8784a43d2b270d953060423b8bd480818
|
||||
F tool/showlocks.c 9920bcc64f58378ff1118caead34147201f48c68
|
||||
F tool/showshm.c a0ab6ec32dd1f11218ca2a4018f8fb875b59414801ab8ceed8b2e69b7b45a809
|
||||
@@ -1814,7 +1804,10 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P f24066f8dd847dfb656f26c4a8142e7fb6a412ffe325aea6254cb122cfbb3e1c
|
||||
R 856eb43817b0dd995ab38a2e36f5cc99
|
||||
P 1d212957079a2caa30f3c9d80f43464781bc9634c2b5181a5814efbddae31711
|
||||
R f9ac6bdc834b55ba32484f2ca38d078f
|
||||
T *branch * faster-memory-barrier
|
||||
T *sym-faster-memory-barrier *
|
||||
T -sym-trunk *
|
||||
U drh
|
||||
Z d08dc7a54a9926c6d8ad15b2f0c02189
|
||||
Z b8a96f494889c21be4a60fd7afef3f80
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
b5f72f10f2dfdbee9fe98c63ffb933e841203790746a920b99df14ca5c14127c
|
||||
df66fec9bc5b8c012d2fef3e97b3f7c3850a195b417806bfddc00b88e99c97d7
|
||||
+6
-6
@@ -166,15 +166,15 @@ void sqlite3AlterRenameTable(
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Begin a transaction for database iDb. Then modify the schema cookie
|
||||
** (since the ALTER TABLE modifies the schema). Call sqlite3MayAbort(),
|
||||
** as the scalar functions (e.g. sqlite_rename_table()) invoked by the
|
||||
** nested SQL may raise an exception. */
|
||||
/* Begin a transaction for database iDb.
|
||||
** Then modify the schema cookie (since the ALTER TABLE modifies the
|
||||
** schema). Open a statement transaction if the table is a virtual
|
||||
** table.
|
||||
*/
|
||||
v = sqlite3GetVdbe(pParse);
|
||||
if( v==0 ){
|
||||
goto exit_rename_table;
|
||||
}
|
||||
sqlite3MayAbort(pParse);
|
||||
|
||||
/* figure out how many UTF-8 characters are in zName */
|
||||
zTabName = pTab->zName;
|
||||
@@ -243,6 +243,7 @@ void sqlite3AlterRenameTable(
|
||||
int i = ++pParse->nMem;
|
||||
sqlite3VdbeLoadString(v, i, zName);
|
||||
sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
|
||||
sqlite3MayAbort(pParse);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -563,7 +564,6 @@ void sqlite3AlterRenameColumn(
|
||||
** uses the sqlite_rename_column() SQL function to compute the new
|
||||
** CREATE statement text for the sqlite_master table.
|
||||
*/
|
||||
sqlite3MayAbort(pParse);
|
||||
zNew = sqlite3NameFromToken(db, pNew);
|
||||
if( !zNew ) goto exit_rename_column;
|
||||
assert( pNew->n>0 );
|
||||
|
||||
+1
-3
@@ -234,9 +234,7 @@ static void attachFunc(
|
||||
sqlite3BtreeEnterAll(db);
|
||||
db->init.iDb = 0;
|
||||
db->mDbFlags &= ~(DBFLAG_SchemaKnownOk);
|
||||
if( !REOPEN_AS_MEMDB(db) ){
|
||||
rc = sqlite3Init(db, &zErrDyn);
|
||||
}
|
||||
rc = sqlite3Init(db, &zErrDyn);
|
||||
sqlite3BtreeLeaveAll(db);
|
||||
assert( zErrDyn==0 || rc!=SQLITE_OK );
|
||||
}
|
||||
|
||||
+146
-223
@@ -840,11 +840,7 @@ static int btreeRestoreCursorPosition(BtCursor *pCur){
|
||||
return pCur->skipNext;
|
||||
}
|
||||
pCur->eState = CURSOR_INVALID;
|
||||
if( sqlite3FaultSim(410) ){
|
||||
rc = SQLITE_IOERR;
|
||||
}else{
|
||||
rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);
|
||||
}
|
||||
rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);
|
||||
if( rc==SQLITE_OK ){
|
||||
sqlite3_free(pCur->pKey);
|
||||
pCur->pKey = 0;
|
||||
@@ -1425,7 +1421,7 @@ static int defragmentPage(MemPage *pPage, int nMaxFrag){
|
||||
hdr = pPage->hdrOffset;
|
||||
cellOffset = pPage->cellOffset;
|
||||
nCell = pPage->nCell;
|
||||
assert( nCell==get2byte(&data[hdr+3]) || CORRUPT_DB );
|
||||
assert( nCell==get2byte(&data[hdr+3]) );
|
||||
iCellFirst = cellOffset + 2*nCell;
|
||||
usableSize = pPage->pBt->usableSize;
|
||||
|
||||
@@ -1436,7 +1432,11 @@ static int defragmentPage(MemPage *pPage, int nMaxFrag){
|
||||
** reconstruct the entire page. */
|
||||
if( (int)data[hdr+7]<=nMaxFrag ){
|
||||
int iFree = get2byte(&data[hdr+1]);
|
||||
if( iFree>usableSize-4 ) return SQLITE_CORRUPT_PAGE(pPage);
|
||||
|
||||
/* If the initial freeblock offset were out of bounds, that would
|
||||
** have been detected by btreeInitPage() when it was computing the
|
||||
** number of free bytes on the page. */
|
||||
assert( iFree<=usableSize-4 );
|
||||
if( iFree ){
|
||||
int iFree2 = get2byte(&data[iFree]);
|
||||
if( iFree2>usableSize-4 ) return SQLITE_CORRUPT_PAGE(pPage);
|
||||
@@ -1455,10 +1455,7 @@ static int defragmentPage(MemPage *pPage, int nMaxFrag){
|
||||
if( iFree2+sz2 > usableSize ) return SQLITE_CORRUPT_PAGE(pPage);
|
||||
memmove(&data[iFree+sz+sz2], &data[iFree+sz], iFree2-(iFree+sz));
|
||||
sz += sz2;
|
||||
}else if( iFree+sz>usableSize ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
|
||||
cbrk = top+sz;
|
||||
assert( cbrk+(iFree-top) <= usableSize );
|
||||
memmove(&data[cbrk], &data[top], iFree-top);
|
||||
@@ -1509,7 +1506,6 @@ static int defragmentPage(MemPage *pPage, int nMaxFrag){
|
||||
data[hdr+7] = 0;
|
||||
|
||||
defragment_out:
|
||||
assert( pPage->nFree>=0 );
|
||||
if( data[hdr+7]+cbrk-iCellFirst!=pPage->nFree ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
@@ -1537,16 +1533,16 @@ static int defragmentPage(MemPage *pPage, int nMaxFrag){
|
||||
** causes the fragmentation count to exceed 60.
|
||||
*/
|
||||
static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){
|
||||
const int hdr = pPg->hdrOffset; /* Offset to page header */
|
||||
u8 * const aData = pPg->aData; /* Page data */
|
||||
int iAddr = hdr + 1; /* Address of ptr to pc */
|
||||
int pc = get2byte(&aData[iAddr]); /* Address of a free slot */
|
||||
int x; /* Excess size of the slot */
|
||||
int maxPC = pPg->pBt->usableSize - nByte; /* Max address for a usable slot */
|
||||
int size; /* Size of the free slot */
|
||||
const int hdr = pPg->hdrOffset;
|
||||
u8 * const aData = pPg->aData;
|
||||
int iAddr = hdr + 1;
|
||||
int pc = get2byte(&aData[iAddr]);
|
||||
int x;
|
||||
int usableSize = pPg->pBt->usableSize;
|
||||
int size; /* Size of the free slot */
|
||||
|
||||
assert( pc>0 );
|
||||
while( pc<=maxPC ){
|
||||
while( pc<=usableSize-4 ){
|
||||
/* EVIDENCE-OF: R-22710-53328 The third and fourth bytes of each
|
||||
** freeblock form a big-endian integer which is the size of the freeblock
|
||||
** in bytes, including the 4-byte header. */
|
||||
@@ -1554,7 +1550,10 @@ static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){
|
||||
if( (x = size - nByte)>=0 ){
|
||||
testcase( x==4 );
|
||||
testcase( x==3 );
|
||||
if( x<4 ){
|
||||
if( size+pc > usableSize ){
|
||||
*pRc = SQLITE_CORRUPT_PAGE(pPg);
|
||||
return 0;
|
||||
}else if( x<4 ){
|
||||
/* EVIDENCE-OF: R-11498-58022 In a well-formed b-tree page, the total
|
||||
** number of bytes in fragments may not exceed 60. */
|
||||
if( aData[hdr+7]>57 ) return 0;
|
||||
@@ -1563,31 +1562,21 @@ static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){
|
||||
** fragmented bytes within the page. */
|
||||
memcpy(&aData[iAddr], &aData[pc], 2);
|
||||
aData[hdr+7] += (u8)x;
|
||||
}else if( x+pc > maxPC ){
|
||||
/* This slot extends off the end of the usable part of the page */
|
||||
*pRc = SQLITE_CORRUPT_PAGE(pPg);
|
||||
return 0;
|
||||
}else{
|
||||
/* The slot remains on the free-list. Reduce its size to account
|
||||
** for the portion used by the new allocation. */
|
||||
** for the portion used by the new allocation. */
|
||||
put2byte(&aData[pc+2], x);
|
||||
}
|
||||
return &aData[pc + x];
|
||||
}
|
||||
iAddr = pc;
|
||||
pc = get2byte(&aData[pc]);
|
||||
if( pc<=iAddr+size ){
|
||||
if( pc ){
|
||||
/* The next slot in the chain is not past the end of the current slot */
|
||||
*pRc = SQLITE_CORRUPT_PAGE(pPg);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if( pc<iAddr+size ) break;
|
||||
}
|
||||
if( pc>maxPC+nByte-4 ){
|
||||
/* The free slot chain extends off the end of the page */
|
||||
if( pc ){
|
||||
*pRc = SQLITE_CORRUPT_PAGE(pPg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1637,9 +1626,9 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is enough space between gap and top for one more cell pointer,
|
||||
** and if the freelist is not empty, then search the
|
||||
** freelist looking for a slot big enough to satisfy the request.
|
||||
/* If there is enough space between gap and top for one more cell pointer
|
||||
** array entry offset, and if the freelist is not empty, then search the
|
||||
** freelist looking for a free slot big enough to satisfy the request.
|
||||
*/
|
||||
testcase( gap+2==top );
|
||||
testcase( gap+1==top );
|
||||
@@ -1661,7 +1650,6 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
|
||||
testcase( gap+2+nByte==top );
|
||||
if( gap+2+nByte>top ){
|
||||
assert( pPage->nCell>0 || CORRUPT_DB );
|
||||
assert( pPage->nFree>=0 );
|
||||
rc = defragmentPage(pPage, MIN(4, pPage->nFree - (2+nByte)));
|
||||
if( rc ) return rc;
|
||||
top = get2byteNotZero(&data[hdr+5]);
|
||||
@@ -1670,7 +1658,7 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
|
||||
|
||||
|
||||
/* Allocate memory from the gap in between the cell pointer array
|
||||
** and the cell content area. The btreeComputeFreeSpace() call has already
|
||||
** and the cell content area. The btreeInitPage() call has already
|
||||
** validated the freelist. Given that the freelist is valid, there
|
||||
** is no way that the allocation can extend off the end of the page.
|
||||
** The assert() below verifies the previous sentence.
|
||||
@@ -1689,7 +1677,7 @@ static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
|
||||
**
|
||||
** Adjacent freeblocks are coalesced.
|
||||
**
|
||||
** Even though the freeblock list was checked by btreeComputeFreeSpace(),
|
||||
** Note that even though the freeblock list was checked by btreeInitPage(),
|
||||
** that routine will not detect overlap between cells or freeblocks. Nor
|
||||
** does it detect cells or freeblocks that encrouch into the reserved bytes
|
||||
** at the end of the page. So do additional corruption checks inside this
|
||||
@@ -1851,14 +1839,21 @@ static int decodeFlags(MemPage *pPage, int flagByte){
|
||||
}
|
||||
|
||||
/*
|
||||
** Compute the amount of freespace on the page. In other words, fill
|
||||
** in the pPage->nFree field.
|
||||
** Initialize the auxiliary information for a disk block.
|
||||
**
|
||||
** Return SQLITE_OK on success. If we see that the page does
|
||||
** not contain a well-formed database page, then return
|
||||
** SQLITE_CORRUPT. Note that a return of SQLITE_OK does not
|
||||
** guarantee that the page is well-formed. It only shows that
|
||||
** we failed to detect any corruption.
|
||||
*/
|
||||
static int btreeComputeFreeSpace(MemPage *pPage){
|
||||
static int btreeInitPage(MemPage *pPage){
|
||||
int pc; /* Address of a freeblock within pPage->aData[] */
|
||||
u8 hdr; /* Offset to beginning of page header */
|
||||
u8 *data; /* Equal to pPage->aData */
|
||||
BtShared *pBt; /* The main btree structure */
|
||||
int usableSize; /* Amount of usable space on each page */
|
||||
u16 cellOffset; /* Offset from start of page to first cell pointer */
|
||||
int nFree; /* Number of unused bytes on the page */
|
||||
int top; /* First byte of the cell content area */
|
||||
int iCellFirst; /* First allowable cell or freeblock offset */
|
||||
@@ -1870,18 +1865,71 @@ static int btreeComputeFreeSpace(MemPage *pPage){
|
||||
assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
|
||||
assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
|
||||
assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
|
||||
assert( pPage->isInit==1 );
|
||||
assert( pPage->nFree<0 );
|
||||
assert( pPage->isInit==0 );
|
||||
|
||||
usableSize = pPage->pBt->usableSize;
|
||||
pBt = pPage->pBt;
|
||||
hdr = pPage->hdrOffset;
|
||||
data = pPage->aData;
|
||||
/* EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating
|
||||
** the b-tree page type. */
|
||||
if( decodeFlags(pPage, data[hdr]) ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
|
||||
pPage->maskPage = (u16)(pBt->pageSize - 1);
|
||||
pPage->nOverflow = 0;
|
||||
usableSize = pBt->usableSize;
|
||||
pPage->cellOffset = cellOffset = hdr + 8 + pPage->childPtrSize;
|
||||
pPage->aDataEnd = &data[usableSize];
|
||||
pPage->aCellIdx = &data[cellOffset];
|
||||
pPage->aDataOfst = &data[pPage->childPtrSize];
|
||||
/* EVIDENCE-OF: R-58015-48175 The two-byte integer at offset 5 designates
|
||||
** the start of the cell content area. A zero value for this integer is
|
||||
** interpreted as 65536. */
|
||||
top = get2byteNotZero(&data[hdr+5]);
|
||||
iCellFirst = hdr + 8 + pPage->childPtrSize + 2*pPage->nCell;
|
||||
/* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
|
||||
** number of cells on the page. */
|
||||
pPage->nCell = get2byte(&data[hdr+3]);
|
||||
if( pPage->nCell>MX_CELL(pBt) ){
|
||||
/* To many cells for a single page. The page must be corrupt */
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
testcase( pPage->nCell==MX_CELL(pBt) );
|
||||
/* EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only
|
||||
** possible for a root page of a table that contains no rows) then the
|
||||
** offset to the cell content area will equal the page size minus the
|
||||
** bytes of reserved space. */
|
||||
assert( pPage->nCell>0 || top==usableSize || CORRUPT_DB );
|
||||
|
||||
/* A malformed database page might cause us to read past the end
|
||||
** of page when parsing a cell.
|
||||
**
|
||||
** The following block of code checks early to see if a cell extends
|
||||
** past the end of a page boundary and causes SQLITE_CORRUPT to be
|
||||
** returned if it does.
|
||||
*/
|
||||
iCellFirst = cellOffset + 2*pPage->nCell;
|
||||
iCellLast = usableSize - 4;
|
||||
if( pBt->db->flags & SQLITE_CellSizeCk ){
|
||||
int i; /* Index into the cell pointer array */
|
||||
int sz; /* Size of a cell */
|
||||
|
||||
if( !pPage->leaf ) iCellLast--;
|
||||
for(i=0; i<pPage->nCell; i++){
|
||||
pc = get2byteAligned(&data[cellOffset+i*2]);
|
||||
testcase( pc==iCellFirst );
|
||||
testcase( pc==iCellLast );
|
||||
if( pc<iCellFirst || pc>iCellLast ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
sz = pPage->xCellSize(pPage, &data[pc]);
|
||||
testcase( pc+sz==usableSize );
|
||||
if( pc+sz>usableSize ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
}
|
||||
if( !pPage->leaf ) iCellLast++;
|
||||
}
|
||||
|
||||
/* Compute the total free space on the page
|
||||
** EVIDENCE-OF: R-23588-34450 The two-byte integer at offset 1 gives the
|
||||
@@ -1929,100 +1977,7 @@ static int btreeComputeFreeSpace(MemPage *pPage){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
pPage->nFree = (u16)(nFree - iCellFirst);
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
** Do additional sanity check after btreeInitPage() if
|
||||
** PRAGMA cell_size_check=ON
|
||||
*/
|
||||
static SQLITE_NOINLINE int btreeCellSizeCheck(MemPage *pPage){
|
||||
int iCellFirst; /* First allowable cell or freeblock offset */
|
||||
int iCellLast; /* Last possible cell or freeblock offset */
|
||||
int i; /* Index into the cell pointer array */
|
||||
int sz; /* Size of a cell */
|
||||
int pc; /* Address of a freeblock within pPage->aData[] */
|
||||
u8 *data; /* Equal to pPage->aData */
|
||||
int usableSize; /* Maximum usable space on the page */
|
||||
int cellOffset; /* Start of cell content area */
|
||||
|
||||
iCellFirst = pPage->cellOffset + 2*pPage->nCell;
|
||||
usableSize = pPage->pBt->usableSize;
|
||||
iCellLast = usableSize - 4;
|
||||
data = pPage->aData;
|
||||
cellOffset = pPage->cellOffset;
|
||||
if( !pPage->leaf ) iCellLast--;
|
||||
for(i=0; i<pPage->nCell; i++){
|
||||
pc = get2byteAligned(&data[cellOffset+i*2]);
|
||||
testcase( pc==iCellFirst );
|
||||
testcase( pc==iCellLast );
|
||||
if( pc<iCellFirst || pc>iCellLast ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
sz = pPage->xCellSize(pPage, &data[pc]);
|
||||
testcase( pc+sz==usableSize );
|
||||
if( pc+sz>usableSize ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
}
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
** Initialize the auxiliary information for a disk block.
|
||||
**
|
||||
** Return SQLITE_OK on success. If we see that the page does
|
||||
** not contain a well-formed database page, then return
|
||||
** SQLITE_CORRUPT. Note that a return of SQLITE_OK does not
|
||||
** guarantee that the page is well-formed. It only shows that
|
||||
** we failed to detect any corruption.
|
||||
*/
|
||||
static int btreeInitPage(MemPage *pPage){
|
||||
u8 *data; /* Equal to pPage->aData */
|
||||
BtShared *pBt; /* The main btree structure */
|
||||
|
||||
assert( pPage->pBt!=0 );
|
||||
assert( pPage->pBt->db!=0 );
|
||||
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
|
||||
assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
|
||||
assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
|
||||
assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
|
||||
assert( pPage->isInit==0 );
|
||||
|
||||
pBt = pPage->pBt;
|
||||
data = pPage->aData + pPage->hdrOffset;
|
||||
/* EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating
|
||||
** the b-tree page type. */
|
||||
if( decodeFlags(pPage, data[0]) ){
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
|
||||
pPage->maskPage = (u16)(pBt->pageSize - 1);
|
||||
pPage->nOverflow = 0;
|
||||
pPage->cellOffset = pPage->hdrOffset + 8 + pPage->childPtrSize;
|
||||
pPage->aCellIdx = data + pPage->childPtrSize + 8;
|
||||
pPage->aDataEnd = pPage->aData + pBt->usableSize;
|
||||
pPage->aDataOfst = pPage->aData + pPage->childPtrSize;
|
||||
/* EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the
|
||||
** number of cells on the page. */
|
||||
pPage->nCell = get2byte(&data[3]);
|
||||
if( pPage->nCell>MX_CELL(pBt) ){
|
||||
/* To many cells for a single page. The page must be corrupt */
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
testcase( pPage->nCell==MX_CELL(pBt) );
|
||||
/* EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only
|
||||
** possible for a root page of a table that contains no rows) then the
|
||||
** offset to the cell content area will equal the page size minus the
|
||||
** bytes of reserved space. */
|
||||
assert( pPage->nCell>0
|
||||
|| get2byteNotZero(&data[5])==(int)pBt->usableSize
|
||||
|| CORRUPT_DB );
|
||||
pPage->nFree = -1; /* Indicate that this value is yet uncomputed */
|
||||
pPage->isInit = 1;
|
||||
if( pBt->db->flags & SQLITE_CellSizeCk ){
|
||||
return btreeCellSizeCheck(pPage);
|
||||
}
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
@@ -2165,18 +2120,19 @@ static int getAndInitPage(
|
||||
|
||||
if( pgno>btreePagecount(pBt) ){
|
||||
rc = SQLITE_CORRUPT_BKPT;
|
||||
goto getAndInitPage_error1;
|
||||
goto getAndInitPage_error;
|
||||
}
|
||||
rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly);
|
||||
if( rc ){
|
||||
goto getAndInitPage_error1;
|
||||
goto getAndInitPage_error;
|
||||
}
|
||||
*ppPage = (MemPage*)sqlite3PagerGetExtra(pDbPage);
|
||||
if( (*ppPage)->isInit==0 ){
|
||||
btreePageFromDbPage(pDbPage, pgno, pBt);
|
||||
rc = btreeInitPage(*ppPage);
|
||||
if( rc!=SQLITE_OK ){
|
||||
goto getAndInitPage_error2;
|
||||
releasePage(*ppPage);
|
||||
goto getAndInitPage_error;
|
||||
}
|
||||
}
|
||||
assert( (*ppPage)->pgno==pgno );
|
||||
@@ -2186,13 +2142,12 @@ static int getAndInitPage(
|
||||
** compatible with the root page. */
|
||||
if( pCur && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey) ){
|
||||
rc = SQLITE_CORRUPT_PGNO(pgno);
|
||||
goto getAndInitPage_error2;
|
||||
releasePage(*ppPage);
|
||||
goto getAndInitPage_error;
|
||||
}
|
||||
return SQLITE_OK;
|
||||
|
||||
getAndInitPage_error2:
|
||||
releasePage(*ppPage);
|
||||
getAndInitPage_error1:
|
||||
getAndInitPage_error:
|
||||
if( pCur ){
|
||||
pCur->iPage--;
|
||||
pCur->pPage = pCur->apPage[pCur->iPage];
|
||||
@@ -5273,6 +5228,23 @@ int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
** This function is a no-op if cursor pCur does not point to a valid row.
|
||||
** Otherwise, if pCur is valid, configure it so that the next call to
|
||||
** sqlite3BtreeNext() is a no-op.
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
void sqlite3BtreeSkipNext(BtCursor *pCur){
|
||||
/* We believe that the cursor must always be in the valid state when
|
||||
** this routine is called, but the proof is difficult, so we add an
|
||||
** ALWaYS() test just in case we are wrong. */
|
||||
if( ALWAYS(pCur->eState==CURSOR_VALID) ){
|
||||
pCur->eState = CURSOR_SKIPNEXT;
|
||||
pCur->skipNext = 1;
|
||||
}
|
||||
}
|
||||
#endif /* SQLITE_OMIT_WINDOWFUNC */
|
||||
|
||||
/* Move the cursor to the last entry in the table. Return SQLITE_OK
|
||||
** on success. Set *pRes to 0 if the cursor actually points to something
|
||||
** or set *pRes to 1 if the table is empty.
|
||||
@@ -5538,7 +5510,7 @@ int sqlite3BtreeMovetoUnpacked(
|
||||
sqlite3_free(pCellKey);
|
||||
goto moveto_finish;
|
||||
}
|
||||
c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
|
||||
c = xRecordCompare(nCell, pCellKey, pIdxKey);
|
||||
sqlite3_free(pCellKey);
|
||||
}
|
||||
assert(
|
||||
@@ -6176,9 +6148,7 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
|
||||
assert( CORRUPT_DB || iPage>1 );
|
||||
assert( !pMemPage || pMemPage->pgno==iPage );
|
||||
|
||||
if( iPage<2 || iPage>pBt->nPage ){
|
||||
return SQLITE_CORRUPT_BKPT;
|
||||
}
|
||||
if( iPage<2 ) return SQLITE_CORRUPT_BKPT;
|
||||
if( pMemPage ){
|
||||
pPage = pMemPage;
|
||||
sqlite3PagerRef(pPage->pDbPage);
|
||||
@@ -6589,7 +6559,6 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
|
||||
assert( CORRUPT_DB || sz==cellSize(pPage, idx) );
|
||||
assert( sqlite3PagerIswriteable(pPage->pDbPage) );
|
||||
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
|
||||
assert( pPage->nFree>=0 );
|
||||
data = pPage->aData;
|
||||
ptr = &pPage->aCellIdx[2*idx];
|
||||
pc = get2byte(ptr);
|
||||
@@ -6660,7 +6629,6 @@ static void insertCell(
|
||||
** might be less than 8 (leaf-size + pointer) on the interior node. Hence
|
||||
** the term after the || in the following assert(). */
|
||||
assert( sz==pPage->xCellSize(pPage, pCell) || (sz==8 && iChild>0) );
|
||||
assert( pPage->nFree>=0 );
|
||||
if( pPage->nOverflow || sz+2>pPage->nFree ){
|
||||
if( pTemp ){
|
||||
memcpy(pTemp, pCell, sz);
|
||||
@@ -6718,7 +6686,7 @@ static void insertCell(
|
||||
pPage->nCell++;
|
||||
/* increment the cell count */
|
||||
if( (++data[pPage->hdrOffset+4])==0 ) data[pPage->hdrOffset+3]++;
|
||||
assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell || CORRUPT_DB );
|
||||
assert( get2byte(&data[pPage->hdrOffset+3])==pPage->nCell );
|
||||
#ifndef SQLITE_OMIT_AUTOVACUUM
|
||||
if( pPage->pBt->autoVacuum ){
|
||||
/* The cell may contain a pointer to an overflow page. If so, write
|
||||
@@ -6805,13 +6773,8 @@ static void insertCell(
|
||||
** are used and they point to the leaf pages only, and the ixNx value are:
|
||||
**
|
||||
** ixNx[0] = Number of cells in Child-1.
|
||||
** ixNx[1] = Number of cells in Child-1 and Child-2.
|
||||
** ixNx[2] = Total number of cells.
|
||||
**
|
||||
** Sometimes when deleting, a child page can have zero cells. In those
|
||||
** cases, ixNx[] entries with higher indexes, and the corresponding apEnd[]
|
||||
** entries, shift down. The end result is that each ixNx[] entry should
|
||||
** be larger than the previous
|
||||
** ixNx[1] = Number of cells in Child-1 and Child-2 + 1 for 1st divider.
|
||||
** ixNx[2] = Number of cells in Child-1 and Child-2 + both divider cells
|
||||
*/
|
||||
typedef struct CellArray CellArray;
|
||||
struct CellArray {
|
||||
@@ -7140,9 +7103,8 @@ static int editPage(
|
||||
int iCell = (iOld + pPg->aiOvfl[i]) - iNew;
|
||||
if( iCell>=0 && iCell<nNew ){
|
||||
pCellptr = &pPg->aCellIdx[iCell * 2];
|
||||
if( nCell>iCell ){
|
||||
memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
|
||||
}
|
||||
assert( nCell>=iCell );
|
||||
memmove(&pCellptr[2], pCellptr, (nCell - iCell) * 2);
|
||||
nCell++;
|
||||
if( pageInsertArray(
|
||||
pPg, pBegin, &pData, pCellptr,
|
||||
@@ -7218,10 +7180,8 @@ static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
|
||||
assert( sqlite3_mutex_held(pPage->pBt->mutex) );
|
||||
assert( sqlite3PagerIswriteable(pParent->pDbPage) );
|
||||
assert( pPage->nOverflow==1 );
|
||||
|
||||
|
||||
if( pPage->nCell==0 ) return SQLITE_CORRUPT_BKPT; /* dbfuzz001.test */
|
||||
assert( pPage->nFree>=0 );
|
||||
assert( pParent->nFree>=0 );
|
||||
|
||||
/* Allocate a new page. This page will become the right-sibling of
|
||||
** pPage. Make the parent page writable, so that the new divider cell
|
||||
@@ -7391,7 +7351,6 @@ static void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){
|
||||
*/
|
||||
pTo->isInit = 0;
|
||||
rc = btreeInitPage(pTo);
|
||||
if( rc==SQLITE_OK ) rc = btreeComputeFreeSpace(pTo);
|
||||
if( rc!=SQLITE_OK ){
|
||||
*pRC = rc;
|
||||
return;
|
||||
@@ -7500,7 +7459,6 @@ static int balance_nonroot(
|
||||
if( !aOvflSpace ){
|
||||
return SQLITE_NOMEM_BKPT;
|
||||
}
|
||||
assert( pParent->nFree>=0 );
|
||||
|
||||
/* Find the sibling pages to balance. Also locate the cells in pParent
|
||||
** that divide the siblings. An attempt is made to find NN siblings on
|
||||
@@ -7540,13 +7498,7 @@ static int balance_nonroot(
|
||||
memset(apOld, 0, (i+1)*sizeof(MemPage*));
|
||||
goto balance_cleanup;
|
||||
}
|
||||
if( apOld[i]->nFree<0 ){
|
||||
rc = btreeComputeFreeSpace(apOld[i]);
|
||||
if( rc ){
|
||||
memset(apOld, 0, (i)*sizeof(MemPage*));
|
||||
goto balance_cleanup;
|
||||
}
|
||||
}
|
||||
nMaxCells += 1+apOld[i]->nCell+apOld[i]->nOverflow;
|
||||
if( (i--)==0 ) break;
|
||||
|
||||
if( pParent->nOverflow && i+nxDiv==pParent->aiOvfl[0] ){
|
||||
@@ -7590,7 +7542,6 @@ static int balance_nonroot(
|
||||
|
||||
/* Make nMaxCells a multiple of 4 in order to preserve 8-byte
|
||||
** alignment */
|
||||
nMaxCells = nOld*(MX_CELL(pBt) + ArraySize(pParent->apOvfl));
|
||||
nMaxCells = (nMaxCells + 3)&~3;
|
||||
|
||||
/*
|
||||
@@ -7601,7 +7552,7 @@ static int balance_nonroot(
|
||||
+ nMaxCells*sizeof(u16) /* b.szCell */
|
||||
+ pBt->pageSize; /* aSpace1 */
|
||||
|
||||
assert( szScratch<=7*(int)pBt->pageSize );
|
||||
assert( szScratch<=6*(int)pBt->pageSize );
|
||||
b.apCell = sqlite3StackAllocRaw(0, szScratch );
|
||||
if( b.apCell==0 ){
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
@@ -7741,15 +7692,11 @@ static int balance_nonroot(
|
||||
MemPage *p = apOld[i];
|
||||
b.apEnd[k] = p->aDataEnd;
|
||||
b.ixNx[k] = cntOld[i];
|
||||
if( k && b.ixNx[k]==b.ixNx[k-1] ){
|
||||
k--; /* Omit b.ixNx[] entry for child pages with no cells */
|
||||
}
|
||||
if( !leafData ){
|
||||
k++;
|
||||
b.apEnd[k] = pParent->aDataEnd;
|
||||
b.ixNx[k] = cntOld[i]+1;
|
||||
}
|
||||
assert( p->nFree>=0 );
|
||||
szNew[i] = usableSpace - p->nFree;
|
||||
for(j=0; j<p->nOverflow; j++){
|
||||
szNew[i] += 2 + p->xCellSize(p, p->apOvfl[j]);
|
||||
@@ -7975,17 +7922,18 @@ static int balance_nonroot(
|
||||
if( ISAUTOVACUUM ){
|
||||
MemPage *pOld;
|
||||
MemPage *pNew = pOld = apNew[0];
|
||||
u8 *aOld = pNew->aData;
|
||||
int cntOldNext = pNew->nCell + pNew->nOverflow;
|
||||
int usableSize = pBt->usableSize;
|
||||
int iNew = 0;
|
||||
int iOld = 0;
|
||||
|
||||
for(i=0; i<b.nCell; i++){
|
||||
u8 *pCell = b.apCell[i];
|
||||
while( i==cntOldNext ){
|
||||
iOld++;
|
||||
assert( iOld<nNew || iOld<nOld );
|
||||
pOld = iOld<nNew ? apNew[iOld] : apOld[iOld];
|
||||
if( i==cntOldNext ){
|
||||
pOld = (++iOld)<nNew ? apNew[iOld] : apOld[iOld];
|
||||
cntOldNext += pOld->nCell + pOld->nOverflow + !leafData;
|
||||
aOld = pOld->aData;
|
||||
}
|
||||
if( i==cntNew[iNew] ){
|
||||
pNew = apNew[++iNew];
|
||||
@@ -8000,7 +7948,7 @@ static int balance_nonroot(
|
||||
** overflow cell), we can skip updating the pointer map entries. */
|
||||
if( iOld>=nNew
|
||||
|| pNew->pgno!=aPgno[iOld]
|
||||
|| !SQLITE_WITHIN(pCell,pOld->aData,pOld->aDataEnd)
|
||||
|| !SQLITE_WITHIN(pCell,aOld,&aOld[usableSize])
|
||||
){
|
||||
if( !leafCorrection ){
|
||||
ptrmapPut(pBt, get4byte(pCell), PTRMAP_BTREE, pNew->pgno, &rc);
|
||||
@@ -8151,8 +8099,7 @@ static int balance_nonroot(
|
||||
rc = defragmentPage(apNew[0], -1);
|
||||
testcase( rc!=SQLITE_OK );
|
||||
assert( apNew[0]->nFree ==
|
||||
(get2byteNotZero(&apNew[0]->aData[5]) - apNew[0]->cellOffset
|
||||
- apNew[0]->nCell*2)
|
||||
(get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2)
|
||||
|| rc!=SQLITE_OK
|
||||
);
|
||||
copyNodeContent(apNew[0], pParent, &rc);
|
||||
@@ -8251,7 +8198,7 @@ static int balance_deeper(MemPage *pRoot, MemPage **ppChild){
|
||||
}
|
||||
assert( sqlite3PagerIswriteable(pChild->pDbPage) );
|
||||
assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
|
||||
assert( pChild->nCell==pRoot->nCell || CORRUPT_DB );
|
||||
assert( pChild->nCell==pRoot->nCell );
|
||||
|
||||
TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno));
|
||||
|
||||
@@ -8293,7 +8240,6 @@ static int balance(BtCursor *pCur){
|
||||
int iPage = pCur->iPage;
|
||||
MemPage *pPage = pCur->pPage;
|
||||
|
||||
if( NEVER(pPage->nFree<0) && btreeComputeFreeSpace(pPage) ) break;
|
||||
if( iPage==0 ){
|
||||
if( pPage->nOverflow ){
|
||||
/* The root page of the b-tree is overfull. In this case call the
|
||||
@@ -8322,9 +8268,6 @@ static int balance(BtCursor *pCur){
|
||||
int const iIdx = pCur->aiIdx[iPage-1];
|
||||
|
||||
rc = sqlite3PagerWrite(pParent->pDbPage);
|
||||
if( rc==SQLITE_OK && pParent->nFree<0 ){
|
||||
rc = btreeComputeFreeSpace(pParent);
|
||||
}
|
||||
if( rc==SQLITE_OK ){
|
||||
#ifndef SQLITE_OMIT_QUICKBALANCE
|
||||
if( pPage->intKeyLeaf
|
||||
@@ -8671,10 +8614,6 @@ int sqlite3BtreeInsert(
|
||||
pPage = pCur->pPage;
|
||||
assert( pPage->intKey || pX->nKey>=0 );
|
||||
assert( pPage->leaf || !pPage->intKey );
|
||||
if( pPage->nFree<0 ){
|
||||
rc = btreeComputeFreeSpace(pPage);
|
||||
if( rc ) return rc;
|
||||
}
|
||||
|
||||
TRACE(("INSERT: table=%d nkey=%lld ndata=%d page=%d %s\n",
|
||||
pCur->pgnoRoot, pX->nKey, pX->nData, pPage->pgno,
|
||||
@@ -8817,18 +8756,14 @@ int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
|
||||
assert( pCur->curFlags & BTCF_WriteFlag );
|
||||
assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );
|
||||
assert( !hasReadConflicts(p, pCur->pgnoRoot) );
|
||||
assert( (flags & ~(BTREE_SAVEPOSITION | BTREE_AUXDELETE))==0 );
|
||||
if( pCur->eState==CURSOR_REQUIRESEEK ){
|
||||
rc = btreeRestoreCursorPosition(pCur);
|
||||
if( rc ) return rc;
|
||||
}
|
||||
assert( pCur->ix<pCur->pPage->nCell );
|
||||
assert( pCur->eState==CURSOR_VALID );
|
||||
assert( (flags & ~(BTREE_SAVEPOSITION | BTREE_AUXDELETE))==0 );
|
||||
|
||||
iCellDepth = pCur->iPage;
|
||||
iCellIdx = pCur->ix;
|
||||
pPage = pCur->pPage;
|
||||
pCell = findCell(pPage, iCellIdx);
|
||||
if( pPage->nFree<0 && btreeComputeFreeSpace(pPage) ) return SQLITE_CORRUPT;
|
||||
|
||||
/* If the bPreserve flag is set to true, then the cursor position must
|
||||
** be preserved following this delete operation. If the current delete
|
||||
@@ -8899,10 +8834,6 @@ int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
|
||||
Pgno n;
|
||||
unsigned char *pTmp;
|
||||
|
||||
if( pLeaf->nFree<0 ){
|
||||
rc = btreeComputeFreeSpace(pLeaf);
|
||||
if( rc ) return rc;
|
||||
}
|
||||
if( iCellDepth<pCur->iPage-1 ){
|
||||
n = pCur->apPage[iCellDepth+1]->pgno;
|
||||
}else{
|
||||
@@ -9261,9 +9192,6 @@ static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
|
||||
assert( sqlite3BtreeHoldsMutex(p) );
|
||||
assert( p->inTrans==TRANS_WRITE );
|
||||
assert( iTable>=2 );
|
||||
if( iTable>btreePagecount(pBt) ){
|
||||
return SQLITE_CORRUPT_BKPT;
|
||||
}
|
||||
|
||||
rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
|
||||
if( rc ) return rc;
|
||||
@@ -9612,10 +9540,10 @@ static void checkList(
|
||||
IntegrityCk *pCheck, /* Integrity checking context */
|
||||
int isFreeList, /* True for a freelist. False for overflow page list */
|
||||
int iPage, /* Page number for first page in the list */
|
||||
u32 N /* Expected number of pages in the list */
|
||||
int N /* Expected number of pages in the list */
|
||||
){
|
||||
int i;
|
||||
u32 expected = N;
|
||||
int expected = N;
|
||||
int nErrAtStart = pCheck->nErr;
|
||||
while( iPage!=0 && pCheck->mxErr ){
|
||||
DbPage *pOvflPage;
|
||||
@@ -9797,11 +9725,6 @@ static int checkTreePage(
|
||||
"btreeInitPage() returns error code %d", rc);
|
||||
goto end_of_check;
|
||||
}
|
||||
if( (rc = btreeComputeFreeSpace(pPage))!=0 ){
|
||||
assert( rc==SQLITE_CORRUPT );
|
||||
checkAppendMsg(pCheck, "free space corruption", rc);
|
||||
goto end_of_check;
|
||||
}
|
||||
data = pPage->aData;
|
||||
hdr = pPage->hdrOffset;
|
||||
|
||||
@@ -9874,7 +9797,7 @@ static int checkTreePage(
|
||||
|
||||
/* Check the content overflow list */
|
||||
if( info.nPayload>info.nLocal ){
|
||||
u32 nPage; /* Number of pages on the overflow chain */
|
||||
int nPage; /* Number of pages on the overflow chain */
|
||||
Pgno pgnoOvfl; /* First page of the overflow chain */
|
||||
assert( pc + info.nSize - 4 <= usableSize );
|
||||
nPage = (info.nPayload - info.nLocal + usableSize - 5)/(usableSize - 4);
|
||||
@@ -9934,9 +9857,9 @@ static int checkTreePage(
|
||||
i = get2byte(&data[hdr+1]);
|
||||
while( i>0 ){
|
||||
int size, j;
|
||||
assert( (u32)i<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
|
||||
assert( (u32)i<=usableSize-4 ); /* Enforced by btreeInitPage() */
|
||||
size = get2byte(&data[i+2]);
|
||||
assert( (u32)(i+size)<=usableSize ); /* due to btreeComputeFreeSpace() */
|
||||
assert( (u32)(i+size)<=usableSize ); /* Enforced by btreeInitPage() */
|
||||
btreeHeapInsert(heap, (((u32)i)<<16)|(i+size-1));
|
||||
/* EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a
|
||||
** big-endian integer which is the offset in the b-tree page of the next
|
||||
@@ -9945,8 +9868,8 @@ static int checkTreePage(
|
||||
j = get2byte(&data[i]);
|
||||
/* EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of
|
||||
** increasing offset. */
|
||||
assert( j==0 || j>i+size ); /* Enforced by btreeComputeFreeSpace() */
|
||||
assert( (u32)j<=usableSize-4 ); /* Enforced by btreeComputeFreeSpace() */
|
||||
assert( j==0 || j>i+size ); /* Enforced by btreeInitPage() */
|
||||
assert( (u32)j<=usableSize-4 ); /* Enforced by btreeInitPage() */
|
||||
i = j;
|
||||
}
|
||||
/* Analyze the min-heap looking for overlap between cells and/or
|
||||
|
||||
@@ -301,6 +301,9 @@ struct BtreePayload {
|
||||
int sqlite3BtreeInsert(BtCursor*, const BtreePayload *pPayload,
|
||||
int flags, int seekResult);
|
||||
int sqlite3BtreeFirst(BtCursor*, int *pRes);
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
void sqlite3BtreeSkipNext(BtCursor*);
|
||||
#endif
|
||||
int sqlite3BtreeLast(BtCursor*, int *pRes);
|
||||
int sqlite3BtreeNext(BtCursor*, int flags);
|
||||
int sqlite3BtreeEof(BtCursor*);
|
||||
|
||||
+1
-1
@@ -286,7 +286,7 @@ struct MemPage {
|
||||
u16 maxLocal; /* Copy of BtShared.maxLocal or BtShared.maxLeaf */
|
||||
u16 minLocal; /* Copy of BtShared.minLocal or BtShared.minLeaf */
|
||||
u16 cellOffset; /* Index in aData of first cell pointer */
|
||||
int nFree; /* Number of free bytes on the page. -1 for unknown */
|
||||
u16 nFree; /* Number of free bytes on the page */
|
||||
u16 nCell; /* Number of cells on this page, local and ovfl */
|
||||
u16 maskPage; /* Mask for page offset */
|
||||
u16 aiOvfl[4]; /* Insert the i-th overflow cell before the aiOvfl-th
|
||||
|
||||
+3
-15
@@ -260,12 +260,7 @@ void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
|
||||
zSql = sqlite3VMPrintf(db, zFormat, ap);
|
||||
va_end(ap);
|
||||
if( zSql==0 ){
|
||||
/* This can result either from an OOM or because the formatted string
|
||||
** exceeds SQLITE_LIMIT_LENGTH. In the latter case, we need to set
|
||||
** an error */
|
||||
if( !db->mallocFailed ) pParse->rc = SQLITE_TOOBIG;
|
||||
pParse->nErr++;
|
||||
return;
|
||||
return; /* A malloc must have failed */
|
||||
}
|
||||
pParse->nested++;
|
||||
memcpy(saveBuf, PARSE_TAIL(pParse), PARSE_TAIL_SZ);
|
||||
@@ -1405,8 +1400,7 @@ void sqlite3AddPrimaryKey(
|
||||
&& sortOrder!=SQLITE_SO_DESC
|
||||
){
|
||||
if( IN_RENAME_OBJECT && pList ){
|
||||
Expr *pCExpr = sqlite3ExprSkipCollate(pList->a[0].pExpr);
|
||||
sqlite3RenameTokenRemap(pParse, &pTab->iPKey, pCExpr);
|
||||
sqlite3RenameTokenRemap(pParse, &pTab->iPKey, pList->a[0].pExpr);
|
||||
}
|
||||
pTab->iPKey = iCol;
|
||||
pTab->keyConf = (u8)onError;
|
||||
@@ -1827,7 +1821,6 @@ static void convertToWithoutRowidTable(Parse *pParse, Table *pTab){
|
||||
pTab->iPKey = -1;
|
||||
}else{
|
||||
pPk = sqlite3PrimaryKeyIndex(pTab);
|
||||
assert( pPk!=0 );
|
||||
|
||||
/*
|
||||
** Remove all redundant columns from the PRIMARY KEY. For example, change
|
||||
@@ -1997,11 +1990,6 @@ void sqlite3EndTable(
|
||||
if( p->tnum==1 ) p->tabFlags |= TF_Readonly;
|
||||
}
|
||||
|
||||
assert( (p->tabFlags & TF_HasPrimaryKey)==0
|
||||
|| p->iPKey>=0 || sqlite3PrimaryKeyIndex(p)!=0 );
|
||||
assert( (p->tabFlags & TF_HasPrimaryKey)!=0
|
||||
|| (p->iPKey<0 && sqlite3PrimaryKeyIndex(p)==0) );
|
||||
|
||||
/* Special processing for WITHOUT ROWID Tables */
|
||||
if( tabOpts & TF_WithoutRowid ){
|
||||
if( (p->tabFlags & TF_Autoincrement) ){
|
||||
@@ -3155,13 +3143,13 @@ void sqlite3CreateIndex(
|
||||
assert( pParse->nErr==0 );
|
||||
if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0
|
||||
&& db->init.busy==0
|
||||
&& pTblName!=0
|
||||
#if SQLITE_USER_AUTHENTICATION
|
||||
&& sqlite3UserAuthTable(pTab->zName)==0
|
||||
#endif
|
||||
#ifdef SQLITE_ALLOW_SQLITE_MASTER_INDEX
|
||||
&& sqlite3StrICmp(&pTab->zName[7],"master")!=0
|
||||
#endif
|
||||
&& sqlite3StrNICmp(&pTab->zName[7],"altertab_",9)!=0
|
||||
){
|
||||
sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
|
||||
goto exit_create_index;
|
||||
|
||||
+33
-7
@@ -2552,11 +2552,14 @@ int sqlite3FindInIndex(
|
||||
eType = IN_INDEX_EPH;
|
||||
if( inFlags & IN_INDEX_LOOP ){
|
||||
pParse->nQueryLoop = 0;
|
||||
if( pX->pLeft->iColumn<0 && !ExprHasProperty(pX, EP_xIsSelect) ){
|
||||
eType = IN_INDEX_ROWID;
|
||||
}
|
||||
}else if( prRhsHasNull ){
|
||||
*prRhsHasNull = rMayHaveNull = ++pParse->nMem;
|
||||
}
|
||||
assert( pX->op==TK_IN );
|
||||
sqlite3CodeRhsOfIN(pParse, pX, iTab);
|
||||
sqlite3CodeRhsOfIN(pParse, pX, iTab, eType==IN_INDEX_ROWID);
|
||||
if( rMayHaveNull ){
|
||||
sqlite3SetHasNullFlag(v, iTab, rMayHaveNull);
|
||||
}
|
||||
@@ -2657,6 +2660,12 @@ void sqlite3VectorErrorMsg(Parse *pParse, Expr *pExpr){
|
||||
** however the cursor number returned might not be the same, as it might
|
||||
** have been duplicated using OP_OpenDup.
|
||||
**
|
||||
** If parameter isRowid is non-zero, then LHS of the IN operator is guaranteed
|
||||
** to be a non-null integer. In this case, the ephemeral table can be an
|
||||
** table B-Tree that keyed by only integers. The more general cases uses
|
||||
** an index B-Tree which can have arbitrary keys, but is slower to both
|
||||
** read and write.
|
||||
**
|
||||
** If the LHS expression ("x" in the examples) is a column value, or
|
||||
** the SELECT statement returns a column value, then the affinity of that
|
||||
** column is used to build the index keys. If both 'x' and the
|
||||
@@ -2668,7 +2677,8 @@ void sqlite3VectorErrorMsg(Parse *pParse, Expr *pExpr){
|
||||
void sqlite3CodeRhsOfIN(
|
||||
Parse *pParse, /* Parsing context */
|
||||
Expr *pExpr, /* The IN operator */
|
||||
int iTab /* Use this cursor number */
|
||||
int iTab, /* Use this cursor number */
|
||||
int isRowid /* If true, LHS is a rowid */
|
||||
){
|
||||
int addrOnce = 0; /* Address of the OP_Once instruction at top */
|
||||
int addr; /* Address of OP_OpenEphemeral instruction */
|
||||
@@ -2721,12 +2731,14 @@ void sqlite3CodeRhsOfIN(
|
||||
/* Check to see if this is a vector IN operator */
|
||||
pLeft = pExpr->pLeft;
|
||||
nVal = sqlite3ExprVectorSize(pLeft);
|
||||
assert( !isRowid || nVal==1 );
|
||||
|
||||
/* Construct the ephemeral table that will contain the content of
|
||||
** RHS of the IN operator.
|
||||
*/
|
||||
pExpr->iTable = iTab;
|
||||
addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, nVal);
|
||||
addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral,
|
||||
pExpr->iTable, (isRowid?0:nVal));
|
||||
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
|
||||
if( ExprHasProperty(pExpr, EP_xIsSelect) ){
|
||||
VdbeComment((v, "Result of SELECT %u", pExpr->x.pSelect->selId));
|
||||
@@ -2734,7 +2746,7 @@ void sqlite3CodeRhsOfIN(
|
||||
VdbeComment((v, "RHS of IN operator"));
|
||||
}
|
||||
#endif
|
||||
pKeyInfo = sqlite3KeyInfoAlloc(pParse->db, nVal, 1);
|
||||
pKeyInfo = isRowid ? 0 : sqlite3KeyInfoAlloc(pParse->db, nVal, 1);
|
||||
|
||||
if( ExprHasProperty(pExpr, EP_xIsSelect) ){
|
||||
/* Case 1: expr IN (SELECT ...)
|
||||
@@ -2748,6 +2760,7 @@ void sqlite3CodeRhsOfIN(
|
||||
ExplainQueryPlan((pParse, 1, "%sLIST SUBQUERY %d",
|
||||
addrOnce?"":"CORRELATED ", pSelect->selId
|
||||
));
|
||||
assert( !isRowid );
|
||||
/* If the LHS and RHS of the IN operator do not match, that
|
||||
** error will have been caught long before we reach this point. */
|
||||
if( ALWAYS(pEList->nExpr==nVal) ){
|
||||
@@ -2800,8 +2813,10 @@ void sqlite3CodeRhsOfIN(
|
||||
/* Loop through each expression in <exprlist>. */
|
||||
r1 = sqlite3GetTempReg(pParse);
|
||||
r2 = sqlite3GetTempReg(pParse);
|
||||
if( isRowid ) sqlite3VdbeAddOp4(v, OP_Blob, 0, r2, 0, "", P4_STATIC);
|
||||
for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
|
||||
Expr *pE2 = pItem->pExpr;
|
||||
int iValToIns;
|
||||
|
||||
/* If the expression is not constant then we will need to
|
||||
** disable the test that was generated above that makes sure
|
||||
@@ -2814,9 +2829,20 @@ void sqlite3CodeRhsOfIN(
|
||||
}
|
||||
|
||||
/* Evaluate the expression and insert it into the temp table */
|
||||
r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
|
||||
sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
|
||||
sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r2, r3, 1);
|
||||
if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
|
||||
sqlite3VdbeAddOp3(v, OP_InsertInt, iTab, r2, iValToIns);
|
||||
}else{
|
||||
r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
|
||||
if( isRowid ){
|
||||
sqlite3VdbeAddOp2(v, OP_MustBeInt, r3,
|
||||
sqlite3VdbeCurrentAddr(v)+2);
|
||||
VdbeCoverage(v);
|
||||
sqlite3VdbeAddOp3(v, OP_Insert, iTab, r2, r3);
|
||||
}else{
|
||||
sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
|
||||
sqlite3VdbeAddOp4Int(v, OP_IdxInsert, iTab, r2, r3, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
sqlite3ReleaseTempReg(pParse, r1);
|
||||
sqlite3ReleaseTempReg(pParse, r2);
|
||||
|
||||
@@ -1806,10 +1806,6 @@ static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
|
||||
if( ALWAYS(pDef) ){
|
||||
pDef->funcFlags |= flagVal;
|
||||
}
|
||||
pDef = sqlite3FindFunction(db, zName, 3, SQLITE_UTF8, 0);
|
||||
if( pDef ){
|
||||
pDef->funcFlags |= flagVal;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+4
-9
@@ -1669,9 +1669,7 @@ void sqlite3GenerateConstraintChecks(
|
||||
sqlite3VdbeAddOp3(v, OP_MakeRecord, regIdx, pIdx->nColumn, aRegIdx[ix]);
|
||||
VdbeComment((v, "for %s", pIdx->zName));
|
||||
#ifdef SQLITE_ENABLE_NULL_TRIM
|
||||
if( pIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){
|
||||
sqlite3SetMakeRecordP5(v, pIdx->pTable);
|
||||
}
|
||||
if( pIdx->idxType==2 ) sqlite3SetMakeRecordP5(v, pIdx->pTable);
|
||||
#endif
|
||||
|
||||
/* In an UPDATE operation, if this index is the PRIMARY KEY index
|
||||
@@ -1921,13 +1919,10 @@ void sqlite3CompleteInsertion(
|
||||
pik_flags |= (update_flags & OPFLAG_SAVEPOSITION);
|
||||
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
|
||||
if( update_flags==0 ){
|
||||
int r = sqlite3GetTempReg(pParse);
|
||||
sqlite3VdbeAddOp2(v, OP_Integer, 0, r);
|
||||
sqlite3VdbeAddOp4(v, OP_Insert,
|
||||
iIdxCur+i, aRegIdx[i], r, (char*)pTab, P4_TABLE
|
||||
sqlite3VdbeAddOp4(v, OP_InsertInt,
|
||||
iIdxCur+i, aRegIdx[i], 0, (char*)pTab, P4_TABLE
|
||||
);
|
||||
sqlite3VdbeChangeP5(v, OPFLAG_ISNOOP);
|
||||
sqlite3ReleaseTempReg(pParse, r);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -2415,7 +2410,7 @@ static int xferOptimization(
|
||||
sqlite3VdbeAddOp1(v, OP_SeekEnd, iDest);
|
||||
}
|
||||
}
|
||||
if( !HasRowid(pSrc) && pDestIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){
|
||||
if( !HasRowid(pSrc) && pDestIdx->idxType==2 ){
|
||||
idxInsFlags |= OPFLAG_NCHANGE;
|
||||
}
|
||||
sqlite3VdbeAddOp2(v, OP_IdxInsert, iDest, regData);
|
||||
|
||||
@@ -843,8 +843,6 @@ int sqlite3_db_config(sqlite3 *db, int op, ...){
|
||||
{ SQLITE_DBCONFIG_TRIGGER_EQP, SQLITE_TriggerEQP },
|
||||
{ SQLITE_DBCONFIG_RESET_DATABASE, SQLITE_ResetDatabase },
|
||||
{ SQLITE_DBCONFIG_DEFENSIVE, SQLITE_Defensive },
|
||||
{ SQLITE_DBCONFIG_WRITABLE_SCHEMA, SQLITE_WriteSchema|
|
||||
SQLITE_NoSchemaError },
|
||||
};
|
||||
unsigned int i;
|
||||
rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
|
||||
|
||||
@@ -93,6 +93,7 @@ void sqlite3MemoryBarrier(void){
|
||||
SQLITE_MEMORY_BARRIER;
|
||||
#elif defined(__GNUC__) && GCC_VERSION>=4001000
|
||||
__sync_synchronize();
|
||||
# define sqlite3MemoryBarrier_IS_RELIABLE 1
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,10 @@ void sqlite3MemoryBarrier(void){
|
||||
SQLITE_MEMORY_BARRIER;
|
||||
#elif defined(__GNUC__)
|
||||
__sync_synchronize();
|
||||
# define sqlite3MemoryBarrier_IS_RELIABLE 1
|
||||
#elif MSVC_VERSION>=1300
|
||||
_ReadWriteBarrier();
|
||||
# define sqlite3MemoryBarrier_IS_RELIABLE 1
|
||||
#elif defined(MemoryBarrier)
|
||||
MemoryBarrier();
|
||||
#endif
|
||||
|
||||
@@ -4893,8 +4893,10 @@ static void unixShmBarrier(
|
||||
assert( fd->pMethods->xLock==nolockLock
|
||||
|| unixFileMutexNotheld((unixFile*)fd)
|
||||
);
|
||||
#ifndef sqlite3MemoryBarrier_IS_RELIABLE
|
||||
unixEnterMutex(); /* Also mutex, for redundancy */
|
||||
unixLeaveMutex();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -4174,8 +4174,10 @@ static void winShmBarrier(
|
||||
){
|
||||
UNUSED_PARAMETER(fd);
|
||||
sqlite3MemoryBarrier(); /* compiler-defined memory barrier */
|
||||
#ifndef sqlite3MemoryBarrier_IS_RELIABLE
|
||||
winShmEnterMutex(); /* Also mutex, for redundancy */
|
||||
winShmLeaveMutex();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+4
-17
@@ -837,9 +837,6 @@ static const unsigned char aJournalMagic[] = {
|
||||
int sqlite3PagerDirectReadOk(Pager *pPager, Pgno pgno){
|
||||
if( pPager->fd->pMethods==0 ) return 0;
|
||||
if( sqlite3PCacheIsDirty(pPager->pPCache) ) return 0;
|
||||
#ifdef SQLITE_HAS_CODEC
|
||||
if( pPager->xCodec!=0 ) return 0;
|
||||
#endif
|
||||
#ifndef SQLITE_OMIT_WAL
|
||||
if( pPager->pWal ){
|
||||
u32 iRead = 0;
|
||||
@@ -3789,14 +3786,8 @@ int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nReserve){
|
||||
rc = sqlite3OsFileSize(pPager->fd, &nByte);
|
||||
}
|
||||
if( rc==SQLITE_OK ){
|
||||
/* 8 bytes of zeroed overrun space is sufficient so that the b-tree
|
||||
* cell header parser will never run off the end of the allocation */
|
||||
pNew = (char *)sqlite3PageMalloc(pageSize+8);
|
||||
if( !pNew ){
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
}else{
|
||||
memset(pNew+pageSize, 0, 8);
|
||||
}
|
||||
pNew = (char *)sqlite3PageMalloc(pageSize);
|
||||
if( !pNew ) rc = SQLITE_NOMEM_BKPT;
|
||||
}
|
||||
|
||||
if( rc==SQLITE_OK ){
|
||||
@@ -7177,12 +7168,8 @@ int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, int isCommit){
|
||||
*/
|
||||
pPg->flags &= ~PGHDR_NEED_SYNC;
|
||||
pPgOld = sqlite3PagerLookup(pPager, pgno);
|
||||
assert( !pPgOld || pPgOld->nRef==1 || CORRUPT_DB );
|
||||
assert( !pPgOld || pPgOld->nRef==1 );
|
||||
if( pPgOld ){
|
||||
if( pPgOld->nRef>1 ){
|
||||
sqlite3PagerUnrefNotNull(pPgOld);
|
||||
return SQLITE_CORRUPT_BKPT;
|
||||
}
|
||||
pPg->flags |= (pPgOld->flags&PGHDR_NEED_SYNC);
|
||||
if( pPager->tempFile ){
|
||||
/* Do not discard pages from an in-memory database since we might
|
||||
@@ -7710,7 +7697,7 @@ int sqlite3PagerSnapshotCheck(Pager *pPager, sqlite3_snapshot *pSnapshot){
|
||||
*/
|
||||
void sqlite3PagerSnapshotUnlock(Pager *pPager){
|
||||
assert( pPager->pWal );
|
||||
sqlite3WalSnapshotUnlock(pPager->pWal);
|
||||
return sqlite3WalSnapshotUnlock(pPager->pWal);
|
||||
}
|
||||
|
||||
#endif /* SQLITE_ENABLE_SNAPSHOT */
|
||||
|
||||
+15
-37
@@ -218,7 +218,6 @@ columnname(A) ::= nm(A) typetoken(Y). {sqlite3AddColumn(pParse,&A,&Y);}
|
||||
%endif SQLITE_OMIT_COMPOUND_SELECT
|
||||
%ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
CURRENT FOLLOWING PARTITION PRECEDING RANGE UNBOUNDED
|
||||
EXCLUDE GROUPS OTHERS TIES
|
||||
%endif SQLITE_OMIT_WINDOWFUNC
|
||||
REINDEX RENAME CTIME_KW IF
|
||||
.
|
||||
@@ -1634,14 +1633,13 @@ wqlist(A) ::= wqlist(A) COMMA nm(X) eidlist_opt(Y) AS LP select(Z) RP. {
|
||||
windowdefn_list(A) ::= windowdefn(Z). { A = Z; }
|
||||
windowdefn_list(A) ::= windowdefn_list(Y) COMMA windowdefn(Z). {
|
||||
assert( Z!=0 );
|
||||
sqlite3WindowChain(pParse, Z, Y);
|
||||
Z->pNextWin = Y;
|
||||
A = Z;
|
||||
}
|
||||
|
||||
%type windowdefn {Window*}
|
||||
%destructor windowdefn {sqlite3WindowDelete(pParse->db, $$);}
|
||||
windowdefn(A) ::= nm(X) AS LP window(Y) RP. {
|
||||
windowdefn(A) ::= nm(X) AS window(Y). {
|
||||
if( ALWAYS(Y) ){
|
||||
Y->zName = sqlite3DbStrNDup(pParse->db, X.z, X.n);
|
||||
}
|
||||
@@ -1669,38 +1667,29 @@ windowdefn(A) ::= nm(X) AS LP window(Y) RP. {
|
||||
%type frame_bound_e {struct FrameBound}
|
||||
%destructor frame_bound_e {sqlite3ExprDelete(pParse->db, $$.pExpr);}
|
||||
|
||||
window(A) ::= PARTITION BY nexprlist(X) orderby_opt(Y) frame_opt(Z). {
|
||||
A = sqlite3WindowAssemble(pParse, Z, X, Y, 0);
|
||||
}
|
||||
window(A) ::= nm(W) PARTITION BY nexprlist(X) orderby_opt(Y) frame_opt(Z). {
|
||||
A = sqlite3WindowAssemble(pParse, Z, X, Y, &W);
|
||||
}
|
||||
window(A) ::= ORDER BY sortlist(Y) frame_opt(Z). {
|
||||
A = sqlite3WindowAssemble(pParse, Z, 0, Y, 0);
|
||||
}
|
||||
window(A) ::= nm(W) ORDER BY sortlist(Y) frame_opt(Z). {
|
||||
A = sqlite3WindowAssemble(pParse, Z, 0, Y, &W);
|
||||
}
|
||||
window(A) ::= frame_opt(Z). {
|
||||
window(A) ::= LP part_opt(X) orderby_opt(Y) frame_opt(Z) RP. {
|
||||
A = Z;
|
||||
}
|
||||
window(A) ::= nm(W) frame_opt(Z). {
|
||||
A = sqlite3WindowAssemble(pParse, Z, 0, 0, &W);
|
||||
if( ALWAYS(A) ){
|
||||
A->pPartition = X;
|
||||
A->pOrderBy = Y;
|
||||
}
|
||||
}
|
||||
|
||||
part_opt(A) ::= PARTITION BY nexprlist(X). { A = X; }
|
||||
part_opt(A) ::= . { A = 0; }
|
||||
|
||||
frame_opt(A) ::= . {
|
||||
A = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
|
||||
A = sqlite3WindowAlloc(pParse, TK_RANGE, TK_UNBOUNDED, 0, TK_CURRENT, 0);
|
||||
}
|
||||
frame_opt(A) ::= range_or_rows(X) frame_bound_s(Y) frame_exclude_opt(Z). {
|
||||
A = sqlite3WindowAlloc(pParse, X, Y.eType, Y.pExpr, TK_CURRENT, 0, Z);
|
||||
frame_opt(A) ::= range_or_rows(X) frame_bound_s(Y). {
|
||||
A = sqlite3WindowAlloc(pParse, X, Y.eType, Y.pExpr, TK_CURRENT, 0);
|
||||
}
|
||||
frame_opt(A) ::= range_or_rows(X) BETWEEN frame_bound_s(Y) AND frame_bound_e(Z) frame_exclude_opt(W). {
|
||||
A = sqlite3WindowAlloc(pParse, X, Y.eType, Y.pExpr, Z.eType, Z.pExpr, W);
|
||||
frame_opt(A) ::= range_or_rows(X) BETWEEN frame_bound_s(Y) AND frame_bound_e(Z). {
|
||||
A = sqlite3WindowAlloc(pParse, X, Y.eType, Y.pExpr, Z.eType, Z.pExpr);
|
||||
}
|
||||
|
||||
range_or_rows(A) ::= RANGE. { A = TK_RANGE; }
|
||||
range_or_rows(A) ::= ROWS. { A = TK_ROWS; }
|
||||
range_or_rows(A) ::= GROUPS. { A = TK_GROUPS;}
|
||||
|
||||
|
||||
frame_bound_s(A) ::= frame_bound(X). { A = X; }
|
||||
@@ -1712,24 +1701,13 @@ frame_bound(A) ::= expr(X) PRECEDING. { A.eType = TK_PRECEDING; A.pExpr = X; }
|
||||
frame_bound(A) ::= CURRENT ROW. { A.eType = TK_CURRENT ; A.pExpr = 0; }
|
||||
frame_bound(A) ::= expr(X) FOLLOWING. { A.eType = TK_FOLLOWING; A.pExpr = X; }
|
||||
|
||||
%type frame_exclude_opt {u8}
|
||||
frame_exclude_opt(A) ::= . { A = 0; }
|
||||
frame_exclude_opt(A) ::= EXCLUDE frame_exclude(X). { A = X; }
|
||||
|
||||
%type frame_exclude {u8}
|
||||
frame_exclude(A) ::= NO OTHERS. { A = 0; }
|
||||
frame_exclude(A) ::= CURRENT ROW. { A = TK_CURRENT; }
|
||||
frame_exclude(A) ::= GROUP. { A = TK_GROUP; }
|
||||
frame_exclude(A) ::= TIES. { A = TK_TIES; }
|
||||
|
||||
|
||||
%type window_clause {Window*}
|
||||
%destructor window_clause {sqlite3WindowListDelete(pParse->db, $$);}
|
||||
window_clause(A) ::= WINDOW windowdefn_list(B). { A = B; }
|
||||
|
||||
%type over_clause {Window*}
|
||||
%destructor over_clause {sqlite3WindowDelete(pParse->db, $$);}
|
||||
over_clause(A) ::= filter_opt(W) OVER LP window(Z) RP. {
|
||||
over_clause(A) ::= filter_opt(W) OVER window(Z). {
|
||||
A = Z;
|
||||
assert( A!=0 );
|
||||
A->pFilter = W;
|
||||
|
||||
+4
-4
@@ -136,7 +136,7 @@ static char et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){
|
||||
static void setStrAccumError(StrAccum *p, u8 eError){
|
||||
assert( eError==SQLITE_NOMEM || eError==SQLITE_TOOBIG );
|
||||
p->accError = eError;
|
||||
if( p->mxAlloc ) sqlite3_str_reset(p);
|
||||
p->nAlloc = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -166,7 +166,6 @@ static char *getTextArg(PrintfArguments *p){
|
||||
*/
|
||||
static char *printfTempBuf(sqlite3_str *pAccum, sqlite3_int64 n){
|
||||
char *z;
|
||||
if( pAccum->accError ) return 0;
|
||||
if( n>pAccum->nAlloc && n>pAccum->mxAlloc ){
|
||||
setStrAccumError(pAccum, SQLITE_TOOBIG);
|
||||
return 0;
|
||||
@@ -886,8 +885,9 @@ static int sqlite3StrAccumEnlarge(StrAccum *p, int N){
|
||||
return 0;
|
||||
}
|
||||
if( p->mxAlloc==0 ){
|
||||
N = p->nAlloc - p->nChar - 1;
|
||||
setStrAccumError(p, SQLITE_TOOBIG);
|
||||
return p->nAlloc - p->nChar - 1;
|
||||
return N;
|
||||
}else{
|
||||
char *zOld = isMalloced(p) ? p->zText : 0;
|
||||
i64 szNew = p->nChar;
|
||||
@@ -959,7 +959,7 @@ void sqlite3_str_append(sqlite3_str *p, const char *z, int N){
|
||||
assert( z!=0 || N==0 );
|
||||
assert( p->zText!=0 || p->nChar==0 || p->accError );
|
||||
assert( N>=0 );
|
||||
assert( p->accError==0 || p->nAlloc==0 || p->mxAlloc==0 );
|
||||
assert( p->accError==0 || p->nAlloc==0 );
|
||||
if( p->nChar+N >= p->nAlloc ){
|
||||
enlargeAndAppend(p,z,N);
|
||||
}else if( N ){
|
||||
|
||||
+22
-57
@@ -435,10 +435,6 @@ static int lookupName(
|
||||
sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs);
|
||||
return WRC_Abort;
|
||||
}
|
||||
if( (pNC->ncFlags&NC_AllowWin)==0 && ExprHasProperty(pOrig, EP_Win) ){
|
||||
sqlite3ErrorMsg(pParse, "misuse of aliased window function %s",zAs);
|
||||
return WRC_Abort;
|
||||
}
|
||||
if( sqlite3ExprVectorSize(pOrig)!=1 ){
|
||||
sqlite3ErrorMsg(pParse, "row value misused");
|
||||
return WRC_Abort;
|
||||
@@ -729,7 +725,6 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
const char *zId; /* The function name. */
|
||||
FuncDef *pDef; /* Information about the function */
|
||||
u8 enc = ENC(pParse->db); /* The database encoding */
|
||||
int savedAllowFlags = (pNC->ncFlags & (NC_AllowAgg | NC_AllowWin));
|
||||
|
||||
assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
|
||||
zId = pExpr->u.zToken;
|
||||
@@ -851,11 +846,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
pNC->nErr++;
|
||||
}
|
||||
if( is_agg ){
|
||||
/* Window functions may not be arguments of aggregate functions.
|
||||
** Or arguments of other window functions. But aggregate functions
|
||||
** may be arguments for window functions. */
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
pNC->ncFlags &= ~(NC_AllowWin | (!pExpr->y.pWin ? NC_AllowAgg : 0));
|
||||
pNC->ncFlags &= ~(pExpr->y.pWin ? NC_AllowWin : NC_AllowAgg);
|
||||
#else
|
||||
pNC->ncFlags &= ~NC_AllowAgg;
|
||||
#endif
|
||||
@@ -876,7 +868,7 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
pExpr->y.pWin->pNextWin = pSel->pWin;
|
||||
pSel->pWin = pExpr->y.pWin;
|
||||
}
|
||||
pNC->ncFlags |= NC_HasWin;
|
||||
pNC->ncFlags |= NC_AllowWin;
|
||||
}else
|
||||
#endif /* SQLITE_OMIT_WINDOWFUNC */
|
||||
{
|
||||
@@ -894,8 +886,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){
|
||||
pNC2->ncFlags |= NC_HasAgg | (pDef->funcFlags & SQLITE_FUNC_MINMAX);
|
||||
|
||||
}
|
||||
pNC->ncFlags |= NC_AllowAgg;
|
||||
}
|
||||
pNC->ncFlags |= savedAllowFlags;
|
||||
}
|
||||
/* FIX ME: Compute pExpr->affinity based on the expected return
|
||||
** type of the function
|
||||
@@ -1251,38 +1243,6 @@ int sqlite3ResolveOrderGroupBy(
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
/*
|
||||
** Walker callback for resolveRemoveWindows().
|
||||
*/
|
||||
static int resolveRemoveWindowsCb(Walker *pWalker, Expr *pExpr){
|
||||
if( ExprHasProperty(pExpr, EP_WinFunc) ){
|
||||
Window **pp;
|
||||
for(pp=&pWalker->u.pSelect->pWin; *pp; pp=&(*pp)->pNextWin){
|
||||
if( *pp==pExpr->y.pWin ){
|
||||
*pp = (*pp)->pNextWin;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return WRC_Continue;
|
||||
}
|
||||
|
||||
/*
|
||||
** Remove any Window objects owned by the expression pExpr from the
|
||||
** Select.pWin list of Select object pSelect.
|
||||
*/
|
||||
static void resolveRemoveWindows(Select *pSelect, Expr *pExpr){
|
||||
Walker sWalker;
|
||||
memset(&sWalker, 0, sizeof(Walker));
|
||||
sWalker.xExprCallback = resolveRemoveWindowsCb;
|
||||
sWalker.u.pSelect = pSelect;
|
||||
sqlite3WalkExpr(&sWalker, pExpr);
|
||||
}
|
||||
#else
|
||||
# define resolveRemoveWindows(x,y)
|
||||
#endif
|
||||
|
||||
/*
|
||||
** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.
|
||||
** The Name context of the SELECT statement is pNC. zType is either
|
||||
@@ -1349,10 +1309,19 @@ static int resolveOrderGroupBy(
|
||||
}
|
||||
for(j=0; j<pSelect->pEList->nExpr; j++){
|
||||
if( sqlite3ExprCompare(0, pE, pSelect->pEList->a[j].pExpr, -1)==0 ){
|
||||
/* Since this expresion is being changed into a reference
|
||||
** to an identical expression in the result set, remove all Window
|
||||
** objects belonging to the expression from the Select.pWin list. */
|
||||
resolveRemoveWindows(pSelect, pE);
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
if( ExprHasProperty(pE, EP_WinFunc) ){
|
||||
/* Since this window function is being changed into a reference
|
||||
** to the same window function the result set, remove the instance
|
||||
** of this window function from the Select.pWin list. */
|
||||
Window **pp;
|
||||
for(pp=&pSelect->pWin; *pp; pp=&(*pp)->pNextWin){
|
||||
if( *pp==pE->y.pWin ){
|
||||
*pp = (*pp)->pNextWin;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
pItem->u.x.iOrderByCol = j+1;
|
||||
}
|
||||
}
|
||||
@@ -1432,7 +1401,7 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
|
||||
*/
|
||||
for(i=0; i<p->pSrc->nSrc; i++){
|
||||
struct SrcList_item *pItem = &p->pSrc->a[i];
|
||||
if( pItem->pSelect && (pItem->pSelect->selFlags & SF_Resolved)==0 ){
|
||||
if( pItem->pSelect ){
|
||||
NameContext *pNC; /* Used to iterate name contexts */
|
||||
int nRef = 0; /* Refcount for pOuterNC and outer contexts */
|
||||
const char *zSavedContext = pParse->zAuthContext;
|
||||
@@ -1564,7 +1533,6 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
if( IN_RENAME_OBJECT ){
|
||||
Window *pWin;
|
||||
for(pWin=p->pWinDefn; pWin; pWin=pWin->pNextWin){
|
||||
@@ -1575,7 +1543,6 @@ static int resolveSelectStep(Walker *pWalker, Select *p){
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If this is part of a compound SELECT, check that it has the right
|
||||
** number of expressions in the select list. */
|
||||
@@ -1656,8 +1623,8 @@ int sqlite3ResolveExprNames(
|
||||
Walker w;
|
||||
|
||||
if( pExpr==0 ) return SQLITE_OK;
|
||||
savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg|NC_HasWin);
|
||||
pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg|NC_HasWin);
|
||||
savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg);
|
||||
pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg);
|
||||
w.pParse = pNC->pParse;
|
||||
w.xExprCallback = resolveExprStep;
|
||||
w.xSelectCallback = resolveSelectStep;
|
||||
@@ -1673,11 +1640,9 @@ int sqlite3ResolveExprNames(
|
||||
#if SQLITE_MAX_EXPR_DEPTH>0
|
||||
w.pParse->nHeight -= pExpr->nHeight;
|
||||
#endif
|
||||
assert( EP_Agg==NC_HasAgg );
|
||||
assert( EP_Win==NC_HasWin );
|
||||
testcase( pNC->ncFlags & NC_HasAgg );
|
||||
testcase( pNC->ncFlags & NC_HasWin );
|
||||
ExprSetProperty(pExpr, pNC->ncFlags & (NC_HasAgg|NC_HasWin) );
|
||||
if( pNC->ncFlags & NC_HasAgg ){
|
||||
ExprSetProperty(pExpr, EP_Agg);
|
||||
}
|
||||
pNC->ncFlags |= savedHasAgg;
|
||||
return pNC->nErr>0 || w.pParse->nErr>0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -5306,7 +5306,7 @@ static void finalizeAggFunctions(Parse *pParse, AggInfo *pAggInfo){
|
||||
**
|
||||
** If regAcc is non-zero and there are no min() or max() aggregates
|
||||
** in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator
|
||||
** registers if register regAcc contains 0. The caller will take care
|
||||
** registers i register regAcc contains 0. The caller will take care
|
||||
** of setting and clearing regAcc.
|
||||
*/
|
||||
static void updateAccumulator(Parse *pParse, int regAcc, AggInfo *pAggInfo){
|
||||
|
||||
+30
-245
@@ -2747,66 +2747,6 @@ static void restore_debug_trace_modes(void){
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Create the TEMP table used to store parameter bindings */
|
||||
static void bind_table_init(ShellState *p){
|
||||
int wrSchema = 0;
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, -1, &wrSchema);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, 1, 0);
|
||||
sqlite3_exec(p->db,
|
||||
"CREATE TABLE IF NOT EXISTS temp.sqlite_parameters(\n"
|
||||
" key TEXT PRIMARY KEY,\n"
|
||||
" value ANY\n"
|
||||
") WITHOUT ROWID;",
|
||||
0, 0, 0);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, wrSchema, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
** Bind parameters on a prepared statement.
|
||||
**
|
||||
** Parameter bindings are taken from a TEMP table of the form:
|
||||
**
|
||||
** CREATE TEMP TABLE sqlite_parameters(key TEXT PRIMARY KEY, value)
|
||||
** WITHOUT ROWID;
|
||||
**
|
||||
** No bindings occur if this table does not exist. The special character '$'
|
||||
** is included in the table name to help prevent collisions with actual tables.
|
||||
** The table must be in the TEMP schema.
|
||||
*/
|
||||
static void bind_prepared_stmt(ShellState *pArg, sqlite3_stmt *pStmt){
|
||||
int nVar;
|
||||
int i;
|
||||
int rc;
|
||||
sqlite3_stmt *pQ = 0;
|
||||
|
||||
nVar = sqlite3_bind_parameter_count(pStmt);
|
||||
if( nVar==0 ) return; /* Nothing to do */
|
||||
if( sqlite3_table_column_metadata(pArg->db, "TEMP", "sqlite_parameters",
|
||||
"key", 0, 0, 0, 0, 0)!=SQLITE_OK ){
|
||||
return; /* Parameter table does not exist */
|
||||
}
|
||||
rc = sqlite3_prepare_v2(pArg->db,
|
||||
"SELECT value FROM temp.sqlite_parameters"
|
||||
" WHERE key=?1", -1, &pQ, 0);
|
||||
if( rc || pQ==0 ) return;
|
||||
for(i=1; i<=nVar; i++){
|
||||
char zNum[30];
|
||||
const char *zVar = sqlite3_bind_parameter_name(pStmt, i);
|
||||
if( zVar==0 ){
|
||||
sqlite3_snprintf(sizeof(zNum),zNum,"?%d",i);
|
||||
zVar = zNum;
|
||||
}
|
||||
sqlite3_bind_text(pQ, 1, zVar, -1, SQLITE_STATIC);
|
||||
if( sqlite3_step(pQ)==SQLITE_ROW ){
|
||||
sqlite3_bind_value(pStmt, i, sqlite3_column_value(pQ, 0));
|
||||
}else{
|
||||
sqlite3_bind_null(pStmt, i);
|
||||
}
|
||||
sqlite3_reset(pQ);
|
||||
}
|
||||
sqlite3_finalize(pQ);
|
||||
}
|
||||
|
||||
/*
|
||||
** Run a prepared statement
|
||||
*/
|
||||
@@ -3059,7 +2999,7 @@ static int shell_exec(
|
||||
}
|
||||
|
||||
/* Show the EXPLAIN QUERY PLAN if .eqp is on */
|
||||
if( pArg && pArg->autoEQP && sqlite3_stmt_isexplain(pStmt)==0 ){
|
||||
if( pArg && pArg->autoEQP && sqlite3_strlike("EXPLAIN%",zStmtSql,0)!=0 ){
|
||||
sqlite3_stmt *pExplain;
|
||||
char *zEQP;
|
||||
int triggerEQP = 0;
|
||||
@@ -3108,10 +3048,13 @@ static int shell_exec(
|
||||
if( pArg ){
|
||||
pArg->cMode = pArg->mode;
|
||||
if( pArg->autoExplain ){
|
||||
if( sqlite3_stmt_isexplain(pStmt)==1 ){
|
||||
if( sqlite3_column_count(pStmt)==8
|
||||
&& sqlite3_strlike("EXPLAIN%", zStmtSql,0)==0
|
||||
){
|
||||
pArg->cMode = MODE_Explain;
|
||||
}
|
||||
if( sqlite3_stmt_isexplain(pStmt)==2 ){
|
||||
if( sqlite3_column_count(pStmt)==4
|
||||
&& sqlite3_strlike("EXPLAIN QUERY PLAN%", zStmtSql,0)==0 ){
|
||||
pArg->cMode = MODE_EQP;
|
||||
}
|
||||
}
|
||||
@@ -3123,7 +3066,6 @@ static int shell_exec(
|
||||
}
|
||||
}
|
||||
|
||||
bind_prepared_stmt(pArg, pStmt);
|
||||
exec_prepared_stmt(pArg, pStmt);
|
||||
explain_data_delete(pArg);
|
||||
eqp_render(pArg);
|
||||
@@ -3453,8 +3395,7 @@ static const char *(azHelp[]) = {
|
||||
".archive ... Manage SQL archives",
|
||||
" Each command must have exactly one of the following options:",
|
||||
" -c, --create Create a new archive",
|
||||
" -u, --update Add files or update files with changed mtime",
|
||||
" -i, --insert Like -u but always add even if mtime unchanged",
|
||||
" -u, --update Update or add files to an existing archive",
|
||||
" -t, --list List contents of archive",
|
||||
" -x, --extract Extract files from archive",
|
||||
" Optional arguments:",
|
||||
@@ -3556,13 +3497,6 @@ static const char *(azHelp[]) = {
|
||||
" --zip FILE is a ZIP archive",
|
||||
".output ?FILE? Send output to FILE or stdout if FILE is omitted",
|
||||
" If FILE begins with '|' then open it as a pipe.",
|
||||
".parameter CMD ... Manage SQL parameter bindings",
|
||||
" clear Erase all bindings",
|
||||
" init Initialize the TEMP table that holds bindings",
|
||||
" list List the current parameter bindings",
|
||||
" set PARAMETER VALUE Given SQL parameter PARAMETER a value of VALUE",
|
||||
" PARAMETER should start with '$', ':', '@', or '?'",
|
||||
" unset PARAMETER Remove PARAMETER from the binding table",
|
||||
".print STRING... Print literal STRING",
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
".progress N Invoke progress handler after every N opcodes",
|
||||
@@ -4775,7 +4709,7 @@ static int shell_dbinfo_command(ShellState *p, int nArg, char **azArg){
|
||||
{ "schema size:",
|
||||
"SELECT total(length(sql)) FROM %s" },
|
||||
};
|
||||
int i, rc;
|
||||
int i;
|
||||
unsigned iDataVersion;
|
||||
char *zSchemaTab;
|
||||
char *zDb = nArg>=2 ? azArg[1] : "main";
|
||||
@@ -4783,19 +4717,8 @@ static int shell_dbinfo_command(ShellState *p, int nArg, char **azArg){
|
||||
unsigned char aHdr[100];
|
||||
open_db(p, 0);
|
||||
if( p->db==0 ) return 1;
|
||||
rc = sqlite3_prepare_v2(p->db,
|
||||
"SELECT data FROM sqlite_dbpage(?1) WHERE pgno=1",
|
||||
-1, &pStmt, 0);
|
||||
if( rc ){
|
||||
if( !sqlite3_compileoption_used("ENABLE_DBPAGE_VTAB") ){
|
||||
utf8_printf(stderr, "the \".dbinfo\" command requires the "
|
||||
"-DSQLITE_ENABLE_DBPAGE_VTAB compile-time options\n");
|
||||
}else{
|
||||
utf8_printf(stderr, "error: %s\n", sqlite3_errmsg(p->db));
|
||||
}
|
||||
sqlite3_finalize(pStmt);
|
||||
return 1;
|
||||
}
|
||||
sqlite3_prepare_v2(p->db,"SELECT data FROM sqlite_dbpage(?1) WHERE pgno=1",
|
||||
-1, &pStmt, 0);
|
||||
sqlite3_bind_text(pStmt, 1, zDb, -1, SQLITE_STATIC);
|
||||
if( sqlite3_step(pStmt)==SQLITE_ROW
|
||||
&& sqlite3_column_bytes(pStmt,0)>100
|
||||
@@ -5389,20 +5312,19 @@ static int arErrorMsg(ArCommand *pAr, const char *zFmt, ...){
|
||||
** Values for ArCommand.eCmd.
|
||||
*/
|
||||
#define AR_CMD_CREATE 1
|
||||
#define AR_CMD_UPDATE 2
|
||||
#define AR_CMD_INSERT 3
|
||||
#define AR_CMD_EXTRACT 4
|
||||
#define AR_CMD_LIST 5
|
||||
#define AR_CMD_HELP 6
|
||||
#define AR_CMD_EXTRACT 2
|
||||
#define AR_CMD_LIST 3
|
||||
#define AR_CMD_UPDATE 4
|
||||
#define AR_CMD_HELP 5
|
||||
|
||||
/*
|
||||
** Other (non-command) switches.
|
||||
*/
|
||||
#define AR_SWITCH_VERBOSE 7
|
||||
#define AR_SWITCH_FILE 8
|
||||
#define AR_SWITCH_DIRECTORY 9
|
||||
#define AR_SWITCH_APPEND 10
|
||||
#define AR_SWITCH_DRYRUN 11
|
||||
#define AR_SWITCH_VERBOSE 6
|
||||
#define AR_SWITCH_FILE 7
|
||||
#define AR_SWITCH_DIRECTORY 8
|
||||
#define AR_SWITCH_APPEND 9
|
||||
#define AR_SWITCH_DRYRUN 10
|
||||
|
||||
static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){
|
||||
switch( eSwitch ){
|
||||
@@ -5410,7 +5332,6 @@ static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){
|
||||
case AR_CMD_EXTRACT:
|
||||
case AR_CMD_LIST:
|
||||
case AR_CMD_UPDATE:
|
||||
case AR_CMD_INSERT:
|
||||
case AR_CMD_HELP:
|
||||
if( pAr->eCmd ){
|
||||
return arErrorMsg(pAr, "multiple command options");
|
||||
@@ -5457,7 +5378,6 @@ static int arParseCommand(
|
||||
} aSwitch[] = {
|
||||
{ "create", 'c', AR_CMD_CREATE, 0 },
|
||||
{ "extract", 'x', AR_CMD_EXTRACT, 0 },
|
||||
{ "insert", 'i', AR_CMD_INSERT, 0 },
|
||||
{ "list", 't', AR_CMD_LIST, 0 },
|
||||
{ "update", 'u', AR_CMD_UPDATE, 0 },
|
||||
{ "help", 'h', AR_CMD_HELP, 0 },
|
||||
@@ -5793,12 +5713,7 @@ static int arExecSql(ArCommand *pAr, const char *zSql){
|
||||
|
||||
|
||||
/*
|
||||
** Implementation of .ar "create", "insert", and "update" commands.
|
||||
**
|
||||
** create -> Create a new SQL archive
|
||||
** insert -> Insert or reinsert all files listed
|
||||
** update -> Insert files that have changed or that were not
|
||||
** previously in the archive
|
||||
** Implementation of .ar "create" and "update" commands.
|
||||
**
|
||||
** Create the "sqlar" table in the database if it does not already exist.
|
||||
** Then add each file in the azFile[] array to the archive. Directories
|
||||
@@ -5806,14 +5721,11 @@ static int arExecSql(ArCommand *pAr, const char *zSql){
|
||||
** printed on stdout for each file archived.
|
||||
**
|
||||
** The create command is the same as update, except that it drops
|
||||
** any existing "sqlar" table before beginning. The "insert" command
|
||||
** always overwrites every file named on the command-line, where as
|
||||
** "update" only overwrites if the size or mtime or mode has changed.
|
||||
** any existing "sqlar" table before beginning.
|
||||
*/
|
||||
static int arCreateOrUpdateCommand(
|
||||
ArCommand *pAr, /* Command arguments and options */
|
||||
int bUpdate, /* true for a --create. */
|
||||
int bOnlyIfChanged /* Only update if file has changed */
|
||||
int bUpdate /* true for a --create. false for --update */
|
||||
){
|
||||
const char *zCreate =
|
||||
"CREATE TABLE IF NOT EXISTS sqlar(\n"
|
||||
@@ -5835,24 +5747,22 @@ static int arCreateOrUpdateCommand(
|
||||
" WHEN 'd' THEN 0\n"
|
||||
" ELSE -1 END,\n"
|
||||
" sqlar_compress(data)\n"
|
||||
" FROM fsdir(%Q,%Q) AS disk\n"
|
||||
" WHERE lsmode(mode) NOT LIKE '?%%'%s;"
|
||||
,
|
||||
" FROM fsdir(%Q,%Q)\n"
|
||||
" WHERE lsmode(mode) NOT LIKE '?%%';",
|
||||
"REPLACE INTO %s(name,mode,mtime,data)\n"
|
||||
" SELECT\n"
|
||||
" %s,\n"
|
||||
" mode,\n"
|
||||
" mtime,\n"
|
||||
" data\n"
|
||||
" FROM fsdir(%Q,%Q) AS disk\n"
|
||||
" WHERE lsmode(mode) NOT LIKE '?%%'%s;"
|
||||
" FROM fsdir(%Q,%Q)\n"
|
||||
" WHERE lsmode(mode) NOT LIKE '?%%';"
|
||||
};
|
||||
int i; /* For iterating through azFile[] */
|
||||
int rc; /* Return code */
|
||||
const char *zTab = 0; /* SQL table into which to insert */
|
||||
char *zSql;
|
||||
char zTemp[50];
|
||||
char *zExists = 0;
|
||||
|
||||
arExecSql(pAr, "PRAGMA page_size=512");
|
||||
rc = arExecSql(pAr, "SAVEPOINT ar;");
|
||||
@@ -5883,21 +5793,10 @@ static int arCreateOrUpdateCommand(
|
||||
}
|
||||
rc = arExecSql(pAr, zCreate);
|
||||
}
|
||||
if( bOnlyIfChanged ){
|
||||
zExists = sqlite3_mprintf(
|
||||
" AND NOT EXISTS("
|
||||
"SELECT 1 FROM %s AS mem"
|
||||
" WHERE mem.name=disk.name"
|
||||
" AND mem.mtime=disk.mtime"
|
||||
" AND mem.mode=disk.mode)", zTab);
|
||||
}else{
|
||||
zExists = sqlite3_mprintf("");
|
||||
}
|
||||
if( zExists==0 ) rc = SQLITE_NOMEM;
|
||||
for(i=0; i<pAr->nArg && rc==SQLITE_OK; i++){
|
||||
char *zSql2 = sqlite3_mprintf(zInsertFmt[pAr->bZip], zTab,
|
||||
pAr->bVerbose ? "shell_putsnl(name)" : "name",
|
||||
pAr->azArg[i], pAr->zDir, zExists);
|
||||
pAr->azArg[i], pAr->zDir);
|
||||
rc = arExecSql(pAr, zSql2);
|
||||
sqlite3_free(zSql2);
|
||||
}
|
||||
@@ -5912,7 +5811,6 @@ end_ar_transaction:
|
||||
sqlite3_free(zSql);
|
||||
}
|
||||
}
|
||||
sqlite3_free(zExists);
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -5951,8 +5849,7 @@ static int arDotCommand(
|
||||
}else if( cmd.zFile ){
|
||||
int flags;
|
||||
if( cmd.bAppend ) eDbType = SHELL_OPEN_APPENDVFS;
|
||||
if( cmd.eCmd==AR_CMD_CREATE || cmd.eCmd==AR_CMD_INSERT
|
||||
|| cmd.eCmd==AR_CMD_UPDATE ){
|
||||
if( cmd.eCmd==AR_CMD_CREATE || cmd.eCmd==AR_CMD_UPDATE ){
|
||||
flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE;
|
||||
}else{
|
||||
flags = SQLITE_OPEN_READONLY;
|
||||
@@ -5989,7 +5886,7 @@ static int arDotCommand(
|
||||
|
||||
switch( cmd.eCmd ){
|
||||
case AR_CMD_CREATE:
|
||||
rc = arCreateOrUpdateCommand(&cmd, 0, 0);
|
||||
rc = arCreateOrUpdateCommand(&cmd, 0);
|
||||
break;
|
||||
|
||||
case AR_CMD_EXTRACT:
|
||||
@@ -6004,13 +5901,9 @@ static int arDotCommand(
|
||||
arUsage(pState->out);
|
||||
break;
|
||||
|
||||
case AR_CMD_INSERT:
|
||||
rc = arCreateOrUpdateCommand(&cmd, 1, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
assert( cmd.eCmd==AR_CMD_UPDATE );
|
||||
rc = arCreateOrUpdateCommand(&cmd, 1, 1);
|
||||
rc = arCreateOrUpdateCommand(&cmd, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -7135,114 +7028,6 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
}
|
||||
}else
|
||||
|
||||
if( c=='p' && n>=3 && strncmp(azArg[0], "parameter", n)==0 ){
|
||||
open_db(p,0);
|
||||
if( nArg<=1 ) goto parameter_syntax_error;
|
||||
|
||||
/* .parameter clear
|
||||
** Clear all bind parameters by dropping the TEMP table that holds them.
|
||||
*/
|
||||
if( nArg==2 && strcmp(azArg[1],"clear")==0 ){
|
||||
int wrSchema = 0;
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, -1, &wrSchema);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, 1, 0);
|
||||
sqlite3_exec(p->db, "DROP TABLE IF EXISTS temp.sqlite_parameters;",
|
||||
0, 0, 0);
|
||||
sqlite3_db_config(p->db, SQLITE_DBCONFIG_WRITABLE_SCHEMA, wrSchema, 0);
|
||||
}else
|
||||
|
||||
/* .parameter list
|
||||
** List all bind parameters.
|
||||
*/
|
||||
if( nArg==2 && strcmp(azArg[1],"list")==0 ){
|
||||
sqlite3_stmt *pStmt = 0;
|
||||
int rx;
|
||||
int len = 0;
|
||||
rx = sqlite3_prepare_v2(p->db,
|
||||
"SELECT max(length(key)) "
|
||||
"FROM temp.sqlite_parameters;", -1, &pStmt, 0);
|
||||
if( rx==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW ){
|
||||
len = sqlite3_column_int(pStmt, 0);
|
||||
if( len>40 ) len = 40;
|
||||
}
|
||||
sqlite3_finalize(pStmt);
|
||||
pStmt = 0;
|
||||
if( len ){
|
||||
rx = sqlite3_prepare_v2(p->db,
|
||||
"SELECT key, quote(value) "
|
||||
"FROM temp.sqlite_parameters;", -1, &pStmt, 0);
|
||||
while( sqlite3_step(pStmt)==SQLITE_ROW ){
|
||||
utf8_printf(p->out, "%-*s %s\n", len, sqlite3_column_text(pStmt,0),
|
||||
sqlite3_column_text(pStmt,1));
|
||||
}
|
||||
sqlite3_finalize(pStmt);
|
||||
}
|
||||
}else
|
||||
|
||||
/* .parameter init
|
||||
** Make sure the TEMP table used to hold bind parameters exists.
|
||||
** Create it if necessary.
|
||||
*/
|
||||
if( nArg==2 && strcmp(azArg[1],"init")==0 ){
|
||||
bind_table_init(p);
|
||||
}else
|
||||
|
||||
/* .parameter set NAME VALUE
|
||||
** Set or reset a bind parameter. NAME should be the full parameter
|
||||
** name exactly as it appears in the query. (ex: $abc, @def). The
|
||||
** VALUE can be in either SQL literal notation, or if not it will be
|
||||
** understood to be a text string.
|
||||
*/
|
||||
if( nArg==4 && strcmp(azArg[1],"set")==0 ){
|
||||
int rx;
|
||||
char *zSql;
|
||||
sqlite3_stmt *pStmt;
|
||||
const char *zKey = azArg[2];
|
||||
const char *zValue = azArg[3];
|
||||
bind_table_init(p);
|
||||
zSql = sqlite3_mprintf(
|
||||
"REPLACE INTO temp.sqlite_parameters(key,value)"
|
||||
"VALUES(%Q,%s);", zKey, zValue);
|
||||
if( zSql==0 ) shell_out_of_memory();
|
||||
pStmt = 0;
|
||||
rx = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
|
||||
sqlite3_free(zSql);
|
||||
if( rx!=SQLITE_OK ){
|
||||
sqlite3_finalize(pStmt);
|
||||
pStmt = 0;
|
||||
zSql = sqlite3_mprintf(
|
||||
"REPLACE INTO temp.sqlite_parameters(key,value)"
|
||||
"VALUES(%Q,%Q);", zKey, zValue);
|
||||
if( zSql==0 ) shell_out_of_memory();
|
||||
rx = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0);
|
||||
sqlite3_free(zSql);
|
||||
if( rx!=SQLITE_OK ){
|
||||
utf8_printf(p->out, "Error: %s\n", sqlite3_errmsg(p->db));
|
||||
sqlite3_finalize(pStmt);
|
||||
pStmt = 0;
|
||||
rc = 1;
|
||||
}
|
||||
}
|
||||
sqlite3_step(pStmt);
|
||||
sqlite3_finalize(pStmt);
|
||||
}else
|
||||
|
||||
/* .parameter unset NAME
|
||||
** Remove the NAME binding from the parameter binding table, if it
|
||||
** exists.
|
||||
*/
|
||||
if( nArg==3 && strcmp(azArg[1],"unset")==0 ){
|
||||
char *zSql = sqlite3_mprintf(
|
||||
"DELETE FROM temp.sqlite_parameters WHERE key=%Q", azArg[2]);
|
||||
if( zSql==0 ) shell_out_of_memory();
|
||||
sqlite3_exec(p->db, zSql, 0, 0, 0);
|
||||
sqlite3_free(zSql);
|
||||
}else
|
||||
/* If no command name matches, show a syntax error */
|
||||
parameter_syntax_error:
|
||||
showHelp(p->out, "parameter");
|
||||
}else
|
||||
|
||||
if( c=='p' && n>=3 && strncmp(azArg[0], "print", n)==0 ){
|
||||
int i;
|
||||
for(i=1; i<nArg; i++){
|
||||
|
||||
+6
-35
@@ -189,9 +189,6 @@ int sqlite3_libversion_number(void);
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
int sqlite3_compileoption_used(const char *zOptName);
|
||||
const char *sqlite3_compileoption_get(int N);
|
||||
#else
|
||||
# define sqlite3_compileoption_used(X) 0
|
||||
# define sqlite3_compileoption_get(X) ((void*)0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -2089,8 +2086,8 @@ struct sqlite3_mem_methods {
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]]
|
||||
** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
|
||||
** <dd> ^This option is used to enable or disable the
|
||||
** [fts3_tokenizer()] function which is part of the
|
||||
** <dd> ^This option is used to enable or disable the two-argument
|
||||
** version of the [fts3_tokenizer()] function which is part of the
|
||||
** [FTS3] full-text search engine extension.
|
||||
** There should be two additional arguments.
|
||||
** The first argument is an integer which is 0 to disable fts3_tokenizer() or
|
||||
@@ -2202,17 +2199,6 @@ struct sqlite3_mem_methods {
|
||||
** <li> Direct writes to [shadow tables].
|
||||
** </ul>
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBCONFIG_WRITABLE_SCHEMA]] <dt>SQLITE_DBCONFIG_WRITABLE_SCHEMA</dt>
|
||||
** <dd>The SQLITE_DBCONFIG_WRITABLE_SCHEMA option activates or deactivates the
|
||||
** "writable_schema" flag. This has the same effect and is logically equivalent
|
||||
** to setting [PRAGMA writable_schema=ON] or [PRAGMA writable_schema=OFF].
|
||||
** The first argument to this setting is an integer which is 0 to disable
|
||||
** the writable_schema, positive to enable writable_schema, or negative to
|
||||
** leave the setting unchanged. The second parameter is a pointer to an
|
||||
** integer into which is written 0 or 1 to indicate whether the writable_schema
|
||||
** is enabled or disabled following this call.
|
||||
** </dd>
|
||||
** </dl>
|
||||
*/
|
||||
#define SQLITE_DBCONFIG_MAINDBNAME 1000 /* const char* */
|
||||
@@ -2226,8 +2212,7 @@ struct sqlite3_mem_methods {
|
||||
#define SQLITE_DBCONFIG_TRIGGER_EQP 1008 /* int int* */
|
||||
#define SQLITE_DBCONFIG_RESET_DATABASE 1009 /* int int* */
|
||||
#define SQLITE_DBCONFIG_DEFENSIVE 1010 /* int int* */
|
||||
#define SQLITE_DBCONFIG_WRITABLE_SCHEMA 1011 /* int int* */
|
||||
#define SQLITE_DBCONFIG_MAX 1011 /* Largest DBCONFIG */
|
||||
#define SQLITE_DBCONFIG_MAX 1010 /* Largest DBCONFIG */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Enable Or Disable Extended Result Codes
|
||||
@@ -2384,7 +2369,7 @@ int sqlite3_changes(sqlite3*);
|
||||
** not. ^Changes to a view that are intercepted by INSTEAD OF triggers
|
||||
** are not counted.
|
||||
**
|
||||
** The [sqlite3_total_changes(D)] interface only reports the number
|
||||
** This the [sqlite3_total_changes(D)] interface only reports the number
|
||||
** of rows that changed due to SQL statement run against database
|
||||
** connection D. Any changes by other database connections are ignored.
|
||||
** To detect changes against a database file from other database
|
||||
@@ -3909,18 +3894,6 @@ const char *sqlite3_normalized_sql(sqlite3_stmt *pStmt);
|
||||
*/
|
||||
int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Query The EXPLAIN Setting For A Prepared Statement
|
||||
** METHOD: sqlite3_stmt
|
||||
**
|
||||
** ^The sqlite3_stmt_isexplain(S) interface returns 1 if the
|
||||
** prepared statement S is an EXPLAIN statement, or 2 if the
|
||||
** statement S is an EXPLAIN QUERY PLAN.
|
||||
** ^The sqlite3_stmt_isexplain(S) interface returns 0 if S is
|
||||
** an ordinary statement or a NULL pointer.
|
||||
*/
|
||||
int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Determine If A Prepared Statement Has Been Reset
|
||||
** METHOD: sqlite3_stmt
|
||||
@@ -4060,9 +4033,7 @@ typedef struct sqlite3_context sqlite3_context;
|
||||
** ^The fifth argument to the BLOB and string binding interfaces
|
||||
** is a destructor used to dispose of the BLOB or
|
||||
** string after SQLite has finished with it. ^The destructor is called
|
||||
** to dispose of the BLOB or string even if the call to the bind API fails,
|
||||
** except the destructor is not called if the third parameter is a NULL
|
||||
** pointer or the fourth parameter is negative.
|
||||
** to dispose of the BLOB or string even if the call to bind API fails.
|
||||
** ^If the fifth argument is
|
||||
** the special value [SQLITE_STATIC], then SQLite assumes that the
|
||||
** information is in static, unmanaged space and does not need to be freed.
|
||||
@@ -5820,7 +5791,7 @@ sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
|
||||
** associated with database N of connection D. ^The main database file
|
||||
** has the name "main". If there is no attached database N on the database
|
||||
** connection D, or if database N is a temporary or in-memory database, then
|
||||
** this function will return either a NULL pointer or an empty string.
|
||||
** a NULL pointer is returned.
|
||||
**
|
||||
** ^The filename returned by this function is the output of the
|
||||
** xFullPathname method of the [VFS]. ^In other words, the filename
|
||||
|
||||
+12
-25
@@ -1691,6 +1691,7 @@ struct FuncDestructor {
|
||||
#define SQLITE_FUNC_AFFINITY 0x4000 /* Built-in affinity() function */
|
||||
#define SQLITE_FUNC_OFFSET 0x8000 /* Built-in sqlite_offset() function */
|
||||
#define SQLITE_FUNC_WINDOW 0x00010000 /* Built-in window-only function */
|
||||
#define SQLITE_FUNC_WINDOW_SIZE 0x20000 /* Requires partition size as arg. */
|
||||
#define SQLITE_FUNC_INTERNAL 0x00040000 /* For use by NestedParse() only */
|
||||
|
||||
/*
|
||||
@@ -2496,16 +2497,12 @@ struct Expr {
|
||||
|
||||
/*
|
||||
** The following are the meanings of bits in the Expr.flags field.
|
||||
** Value restrictions:
|
||||
**
|
||||
** EP_Agg == NC_HasAgg == SF_HasAgg
|
||||
** EP_Win == NC_HasWin
|
||||
*/
|
||||
#define EP_FromJoin 0x000001 /* Originates in ON/USING clause of outer join */
|
||||
#define EP_Distinct 0x000002 /* Aggregate function with DISTINCT keyword */
|
||||
#define EP_Agg 0x000002 /* Contains one or more aggregate functions */
|
||||
#define EP_HasFunc 0x000004 /* Contains one or more functions of any kind */
|
||||
#define EP_FixedCol 0x000008 /* TK_Column with a known fixed value */
|
||||
#define EP_Agg 0x000010 /* Contains one or more aggregate functions */
|
||||
#define EP_Distinct 0x000010 /* Aggregate function with DISTINCT keyword */
|
||||
#define EP_VarSelect 0x000020 /* pSelect is correlated, not constant */
|
||||
#define EP_DblQuoted 0x000040 /* token.z was originally in "..." */
|
||||
#define EP_InfixFunc 0x000080 /* True for an infix function: LIKE, GLOB, etc */
|
||||
@@ -2516,7 +2513,7 @@ struct Expr {
|
||||
#define EP_Skip 0x001000 /* COLLATE, AS, or UNLIKELY */
|
||||
#define EP_Reduced 0x002000 /* Expr struct EXPR_REDUCEDSIZE bytes only */
|
||||
#define EP_TokenOnly 0x004000 /* Expr struct EXPR_TOKENONLYSIZE bytes only */
|
||||
#define EP_Win 0x008000 /* Contains window functions */
|
||||
#define EP_Static 0x008000 /* Held in memory not obtained from malloc() */
|
||||
#define EP_MemToken 0x010000 /* Need to sqlite3DbFree() Expr.zToken */
|
||||
#define EP_NoReduce 0x020000 /* Cannot EXPRDUP_REDUCE this Expr */
|
||||
#define EP_Unlikely 0x040000 /* unlikely() or likelihood() function */
|
||||
@@ -2528,7 +2525,6 @@ struct Expr {
|
||||
#define EP_WinFunc 0x1000000 /* TK_FUNCTION with Expr.y.pWin set */
|
||||
#define EP_Subrtn 0x2000000 /* Uses Expr.y.sub. TK_IN, _SELECT, or _EXISTS */
|
||||
#define EP_Quoted 0x4000000 /* TK_ID was originally quoted */
|
||||
#define EP_Static 0x8000000 /* Held in memory not obtained from malloc() */
|
||||
|
||||
/*
|
||||
** The EP_Propagate mask is a set of properties that automatically propagate
|
||||
@@ -2768,9 +2764,8 @@ struct NameContext {
|
||||
** Allowed values for the NameContext, ncFlags field.
|
||||
**
|
||||
** Value constraints (all checked via assert()):
|
||||
** NC_HasAgg == SF_HasAgg == EP_Agg
|
||||
** NC_HasAgg == SF_HasAgg
|
||||
** NC_MinMaxAgg == SF_MinMaxAgg == SQLITE_FUNC_MINMAX
|
||||
** NC_HasWin == EP_Win
|
||||
**
|
||||
*/
|
||||
#define NC_AllowAgg 0x0001 /* Aggregate functions are allowed here */
|
||||
@@ -2786,7 +2781,6 @@ struct NameContext {
|
||||
#define NC_MinMaxAgg 0x1000 /* min/max aggregates seen. See note above */
|
||||
#define NC_Complex 0x2000 /* True if a function or subquery seen */
|
||||
#define NC_AllowWin 0x4000 /* Window functions are allowed here */
|
||||
#define NC_HasWin 0x8000 /* One or more window functions seen */
|
||||
|
||||
/*
|
||||
** An instance of the following object describes a single ON CONFLICT
|
||||
@@ -3542,7 +3536,7 @@ struct TreeView {
|
||||
#endif /* SQLITE_DEBUG */
|
||||
|
||||
/*
|
||||
** This object is used in various ways, all related to window functions
|
||||
** This object is used in varioius ways, all related to window functions
|
||||
**
|
||||
** (1) A single instance of this structure is attached to the
|
||||
** the Expr.pWin field for each window function in an expression tree.
|
||||
@@ -3557,18 +3551,15 @@ struct TreeView {
|
||||
** object on a linked list attached to Select.pWinDefn.
|
||||
**
|
||||
** The uses (1) and (2) are really the same Window object that just happens
|
||||
** to be accessible in two different ways. Use case (3) are separate objects.
|
||||
** to be accessible in two different ways. Use (3) is are separate objects.
|
||||
*/
|
||||
struct Window {
|
||||
char *zName; /* Name of window (may be NULL) */
|
||||
char *zBase; /* Name of base window for chaining (may be NULL) */
|
||||
ExprList *pPartition; /* PARTITION BY clause */
|
||||
ExprList *pOrderBy; /* ORDER BY clause */
|
||||
u8 eFrmType; /* TK_RANGE, TK_GROUPS, TK_ROWS, or 0 */
|
||||
u8 eType; /* TK_RANGE or TK_ROWS */
|
||||
u8 eStart; /* UNBOUNDED, CURRENT, PRECEDING or FOLLOWING */
|
||||
u8 eEnd; /* UNBOUNDED, CURRENT, PRECEDING or FOLLOWING */
|
||||
u8 bImplicitFrame; /* True if frame was implicitly specified */
|
||||
u8 eExclude; /* TK_NO, TK_CURRENT, TK_TIES, TK_GROUP, or 0 */
|
||||
Expr *pStart; /* Expression for "<expr> PRECEDING" */
|
||||
Expr *pEnd; /* Expression for "<expr> FOLLOWING" */
|
||||
Window *pNextWin; /* Next window function belonging to this SELECT */
|
||||
@@ -3579,19 +3570,17 @@ struct Window {
|
||||
int regResult;
|
||||
int csrApp; /* Function cursor (used by min/max) */
|
||||
int regApp; /* Function register (also used by min/max) */
|
||||
int regPart; /* Array of registers for PARTITION BY values */
|
||||
int regPart; /* First in a set of registers holding PARTITION BY
|
||||
** and ORDER BY values for the window */
|
||||
Expr *pOwner; /* Expression object this window is attached to */
|
||||
int nBufferCol; /* Number of columns in buffer table */
|
||||
int iArgCol; /* Offset of first argument for this function */
|
||||
int regOne; /* Register containing constant value 1 */
|
||||
int regStartRowid;
|
||||
int regEndRowid;
|
||||
};
|
||||
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
void sqlite3WindowDelete(sqlite3*, Window*);
|
||||
void sqlite3WindowListDelete(sqlite3 *db, Window *p);
|
||||
Window *sqlite3WindowAlloc(Parse*, int, int, Expr*, int , Expr*, u8);
|
||||
Window *sqlite3WindowAlloc(Parse*, int, int, Expr*, int , Expr*);
|
||||
void sqlite3WindowAttach(Parse*, Expr*, Window*);
|
||||
int sqlite3WindowCompare(Parse*, Window*, Window*);
|
||||
void sqlite3WindowCodeInit(Parse*, Window*);
|
||||
@@ -3602,8 +3591,6 @@ void sqlite3WindowUpdate(Parse*, Window*, Window*, FuncDef*);
|
||||
Window *sqlite3WindowDup(sqlite3 *db, Expr *pOwner, Window *p);
|
||||
Window *sqlite3WindowListDup(sqlite3 *db, Window *p);
|
||||
void sqlite3WindowFunctions(void);
|
||||
void sqlite3WindowChain(Parse*, Window*, Window*);
|
||||
Window *sqlite3WindowAssemble(Parse*, Window*, ExprList*, ExprList*, Token*);
|
||||
#else
|
||||
# define sqlite3WindowDelete(a,b)
|
||||
# define sqlite3WindowFunctions()
|
||||
@@ -4294,7 +4281,7 @@ void sqlite3AlterRenameColumn(Parse*, SrcList*, Token*, Token*);
|
||||
int sqlite3GetToken(const unsigned char *, int *);
|
||||
void sqlite3NestedParse(Parse*, const char*, ...);
|
||||
void sqlite3ExpirePreparedStatements(sqlite3*, int);
|
||||
void sqlite3CodeRhsOfIN(Parse*, Expr*, int);
|
||||
void sqlite3CodeRhsOfIN(Parse*, Expr*, int, int);
|
||||
int sqlite3CodeSubselect(Parse*, Expr*);
|
||||
void sqlite3SelectPrep(Parse*, Select*, NameContext*);
|
||||
void sqlite3SelectWrongNumTermsError(Parse *pParse, Select *p);
|
||||
|
||||
+51
-174
@@ -93,14 +93,6 @@ typedef struct SqliteDb SqliteDb;
|
||||
/*
|
||||
** New SQL functions can be created as TCL scripts. Each such function
|
||||
** is described by an instance of the following structure.
|
||||
**
|
||||
** Variable eType may be set to SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT,
|
||||
** SQLITE_BLOB or SQLITE_NULL. If it is SQLITE_NULL, then the implementation
|
||||
** attempts to determine the type of the result based on the Tcl object.
|
||||
** If it is SQLITE_TEXT or SQLITE_BLOB, then a text (sqlite3_result_text())
|
||||
** or blob (sqlite3_result_blob()) is returned. If it is SQLITE_INTEGER
|
||||
** or SQLITE_FLOAT, then an attempt is made to return an integer or float
|
||||
** value, falling back to float and then text if this is not possible.
|
||||
*/
|
||||
typedef struct SqlFunc SqlFunc;
|
||||
struct SqlFunc {
|
||||
@@ -108,7 +100,6 @@ struct SqlFunc {
|
||||
Tcl_Obj *pScript; /* The Tcl_Obj representation of the script */
|
||||
SqliteDb *pDb; /* Database connection that owns this function */
|
||||
int useEvalObjv; /* True if it is safe to use Tcl_EvalObjv */
|
||||
int eType; /* Type of value to return */
|
||||
char *zName; /* Name of this function */
|
||||
SqlFunc *pNext; /* Next function on the list of them all */
|
||||
};
|
||||
@@ -159,7 +150,6 @@ struct SqliteDb {
|
||||
char *zTraceV2; /* The trace_v2 callback routine */
|
||||
char *zProfile; /* The profile callback routine */
|
||||
char *zProgress; /* The progress callback routine */
|
||||
char *zBindFallback; /* Callback to invoke on a binding miss */
|
||||
char *zAuth; /* The authorization callback routine */
|
||||
int disableAuth; /* Disable the authorizer if it exists */
|
||||
char *zNull; /* Text to substitute for an SQL NULL value */
|
||||
@@ -550,9 +540,6 @@ static void SQLITE_TCLAPI DbDeleteCmd(void *db){
|
||||
if( pDb->zProfile ){
|
||||
Tcl_Free(pDb->zProfile);
|
||||
}
|
||||
if( pDb->zBindFallback ){
|
||||
Tcl_Free(pDb->zBindFallback);
|
||||
}
|
||||
if( pDb->zAuth ){
|
||||
Tcl_Free(pDb->zAuth);
|
||||
}
|
||||
@@ -1008,54 +995,27 @@ static void tclSqlFunc(sqlite3_context *context, int argc, sqlite3_value**argv){
|
||||
u8 *data;
|
||||
const char *zType = (pVar->typePtr ? pVar->typePtr->name : "");
|
||||
char c = zType[0];
|
||||
int eType = p->eType;
|
||||
|
||||
if( eType==SQLITE_NULL ){
|
||||
if( c=='b' && strcmp(zType,"bytearray")==0 && pVar->bytes==0 ){
|
||||
/* Only return a BLOB type if the Tcl variable is a bytearray and
|
||||
** has no string representation. */
|
||||
eType = SQLITE_BLOB;
|
||||
}else if( (c=='b' && strcmp(zType,"boolean")==0)
|
||||
|| (c=='w' && strcmp(zType,"wideInt")==0)
|
||||
|| (c=='i' && strcmp(zType,"int")==0)
|
||||
){
|
||||
eType = SQLITE_INTEGER;
|
||||
}else if( c=='d' && strcmp(zType,"double")==0 ){
|
||||
eType = SQLITE_FLOAT;
|
||||
}else{
|
||||
eType = SQLITE_TEXT;
|
||||
}
|
||||
if( c=='b' && strcmp(zType,"bytearray")==0 && pVar->bytes==0 ){
|
||||
/* Only return a BLOB type if the Tcl variable is a bytearray and
|
||||
** has no string representation. */
|
||||
data = Tcl_GetByteArrayFromObj(pVar, &n);
|
||||
sqlite3_result_blob(context, data, n, SQLITE_TRANSIENT);
|
||||
}else if( c=='b' && strcmp(zType,"boolean")==0 ){
|
||||
Tcl_GetIntFromObj(0, pVar, &n);
|
||||
sqlite3_result_int(context, n);
|
||||
}else if( c=='d' && strcmp(zType,"double")==0 ){
|
||||
double r;
|
||||
Tcl_GetDoubleFromObj(0, pVar, &r);
|
||||
sqlite3_result_double(context, r);
|
||||
}else if( (c=='w' && strcmp(zType,"wideInt")==0) ||
|
||||
(c=='i' && strcmp(zType,"int")==0) ){
|
||||
Tcl_WideInt v;
|
||||
Tcl_GetWideIntFromObj(0, pVar, &v);
|
||||
sqlite3_result_int64(context, v);
|
||||
}else{
|
||||
data = (unsigned char *)Tcl_GetStringFromObj(pVar, &n);
|
||||
sqlite3_result_text(context, (char *)data, n, SQLITE_TRANSIENT);
|
||||
}
|
||||
|
||||
switch( eType ){
|
||||
case SQLITE_BLOB: {
|
||||
data = Tcl_GetByteArrayFromObj(pVar, &n);
|
||||
sqlite3_result_blob(context, data, n, SQLITE_TRANSIENT);
|
||||
break;
|
||||
}
|
||||
case SQLITE_INTEGER: {
|
||||
Tcl_WideInt v;
|
||||
if( TCL_OK==Tcl_GetWideIntFromObj(0, pVar, &v) ){
|
||||
sqlite3_result_int64(context, v);
|
||||
break;
|
||||
}
|
||||
/* fall-through */
|
||||
}
|
||||
case SQLITE_FLOAT: {
|
||||
double r;
|
||||
if( TCL_OK==Tcl_GetDoubleFromObj(0, pVar, &r) ){
|
||||
sqlite3_result_double(context, r);
|
||||
break;
|
||||
}
|
||||
/* fall-through */
|
||||
}
|
||||
default: {
|
||||
data = (unsigned char *)Tcl_GetStringFromObj(pVar, &n);
|
||||
sqlite3_result_text(context, (char *)data, n, SQLITE_TRANSIENT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1305,8 +1265,6 @@ static int dbPrepareAndBind(
|
||||
int iParm = 0; /* Next free entry in apParm */
|
||||
char c;
|
||||
int i;
|
||||
int needResultReset = 0; /* Need to invoke Tcl_ResetResult() */
|
||||
int rc = SQLITE_OK; /* Value to return */
|
||||
Tcl_Interp *interp = pDb->interp;
|
||||
|
||||
*ppPreStmt = 0;
|
||||
@@ -1394,25 +1352,6 @@ static int dbPrepareAndBind(
|
||||
const char *zVar = sqlite3_bind_parameter_name(pStmt, i);
|
||||
if( zVar!=0 && (zVar[0]=='$' || zVar[0]==':' || zVar[0]=='@') ){
|
||||
Tcl_Obj *pVar = Tcl_GetVar2Ex(interp, &zVar[1], 0, 0);
|
||||
if( pVar==0 && pDb->zBindFallback!=0 ){
|
||||
Tcl_Obj *pCmd;
|
||||
int rx;
|
||||
pCmd = Tcl_NewStringObj(pDb->zBindFallback, -1);
|
||||
Tcl_IncrRefCount(pCmd);
|
||||
Tcl_ListObjAppendElement(interp, pCmd, Tcl_NewStringObj(zVar,-1));
|
||||
if( needResultReset ) Tcl_ResetResult(interp);
|
||||
needResultReset = 1;
|
||||
rx = Tcl_EvalObjEx(interp, pCmd, TCL_EVAL_DIRECT);
|
||||
Tcl_DecrRefCount(pCmd);
|
||||
if( rx==TCL_OK ){
|
||||
pVar = Tcl_GetObjResult(interp);
|
||||
}else if( rx==TCL_ERROR ){
|
||||
rc = TCL_ERROR;
|
||||
break;
|
||||
}else{
|
||||
pVar = 0;
|
||||
}
|
||||
}
|
||||
if( pVar ){
|
||||
int n;
|
||||
u8 *data;
|
||||
@@ -1448,14 +1387,12 @@ static int dbPrepareAndBind(
|
||||
}else{
|
||||
sqlite3_bind_null(pStmt, i);
|
||||
}
|
||||
if( needResultReset ) Tcl_ResetResult(pDb->interp);
|
||||
}
|
||||
}
|
||||
pPreStmt->nParm = iParm;
|
||||
*ppPreStmt = pPreStmt;
|
||||
if( needResultReset && rc==TCL_OK ) Tcl_ResetResult(pDb->interp);
|
||||
|
||||
return rc;
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1914,36 +1851,35 @@ static int SQLITE_TCLAPI DbObjCmd(
|
||||
int choice;
|
||||
int rc = TCL_OK;
|
||||
static const char *DB_strs[] = {
|
||||
"authorizer", "backup", "bind_fallback",
|
||||
"busy", "cache", "changes",
|
||||
"close", "collate", "collation_needed",
|
||||
"commit_hook", "complete", "copy",
|
||||
"deserialize", "enable_load_extension", "errorcode",
|
||||
"eval", "exists", "function",
|
||||
"incrblob", "interrupt", "last_insert_rowid",
|
||||
"nullvalue", "onecolumn", "preupdate",
|
||||
"profile", "progress", "rekey",
|
||||
"restore", "rollback_hook", "serialize",
|
||||
"status", "timeout", "total_changes",
|
||||
"trace", "trace_v2", "transaction",
|
||||
"unlock_notify", "update_hook", "version",
|
||||
"wal_hook", 0
|
||||
"authorizer", "backup", "busy",
|
||||
"cache", "changes", "close",
|
||||
"collate", "collation_needed", "commit_hook",
|
||||
"complete", "copy", "deserialize",
|
||||
"enable_load_extension", "errorcode", "eval",
|
||||
"exists", "function", "incrblob",
|
||||
"interrupt", "last_insert_rowid", "nullvalue",
|
||||
"onecolumn", "preupdate", "profile",
|
||||
"progress", "rekey", "restore",
|
||||
"rollback_hook", "serialize", "status",
|
||||
"timeout", "total_changes", "trace",
|
||||
"trace_v2", "transaction", "unlock_notify",
|
||||
"update_hook", "version", "wal_hook",
|
||||
0
|
||||
};
|
||||
enum DB_enum {
|
||||
DB_AUTHORIZER, DB_BACKUP, DB_BIND_FALLBACK,
|
||||
DB_BUSY, DB_CACHE, DB_CHANGES,
|
||||
DB_CLOSE, DB_COLLATE, DB_COLLATION_NEEDED,
|
||||
DB_COMMIT_HOOK, DB_COMPLETE, DB_COPY,
|
||||
DB_DESERIALIZE, DB_ENABLE_LOAD_EXTENSION,DB_ERRORCODE,
|
||||
DB_EVAL, DB_EXISTS, DB_FUNCTION,
|
||||
DB_INCRBLOB, DB_INTERRUPT, DB_LAST_INSERT_ROWID,
|
||||
DB_NULLVALUE, DB_ONECOLUMN, DB_PREUPDATE,
|
||||
DB_PROFILE, DB_PROGRESS, DB_REKEY,
|
||||
DB_RESTORE, DB_ROLLBACK_HOOK, DB_SERIALIZE,
|
||||
DB_STATUS, DB_TIMEOUT, DB_TOTAL_CHANGES,
|
||||
DB_TRACE, DB_TRACE_V2, DB_TRANSACTION,
|
||||
DB_UNLOCK_NOTIFY, DB_UPDATE_HOOK, DB_VERSION,
|
||||
DB_WAL_HOOK
|
||||
DB_AUTHORIZER, DB_BACKUP, DB_BUSY,
|
||||
DB_CACHE, DB_CHANGES, DB_CLOSE,
|
||||
DB_COLLATE, DB_COLLATION_NEEDED, DB_COMMIT_HOOK,
|
||||
DB_COMPLETE, DB_COPY, DB_DESERIALIZE,
|
||||
DB_ENABLE_LOAD_EXTENSION, DB_ERRORCODE, DB_EVAL,
|
||||
DB_EXISTS, DB_FUNCTION, DB_INCRBLOB,
|
||||
DB_INTERRUPT, DB_LAST_INSERT_ROWID, DB_NULLVALUE,
|
||||
DB_ONECOLUMN, DB_PREUPDATE, DB_PROFILE,
|
||||
DB_PROGRESS, DB_REKEY, DB_RESTORE,
|
||||
DB_ROLLBACK_HOOK, DB_SERIALIZE, DB_STATUS,
|
||||
DB_TIMEOUT, DB_TOTAL_CHANGES, DB_TRACE,
|
||||
DB_TRACE_V2, DB_TRANSACTION, DB_UNLOCK_NOTIFY,
|
||||
DB_UPDATE_HOOK, DB_VERSION, DB_WAL_HOOK
|
||||
};
|
||||
/* don't leave trailing commas on DB_enum, it confuses the AIX xlc compiler */
|
||||
|
||||
@@ -2065,49 +2001,6 @@ static int SQLITE_TCLAPI DbObjCmd(
|
||||
break;
|
||||
}
|
||||
|
||||
/* $db bind_fallback ?CALLBACK?
|
||||
**
|
||||
** When resolving bind parameters in an SQL statement, if the parameter
|
||||
** cannot be associated with a TCL variable then invoke CALLBACK with a
|
||||
** single argument that is the name of the parameter and use the return
|
||||
** value of the CALLBACK as the binding. If CALLBACK returns something
|
||||
** other than TCL_OK or TCL_ERROR then bind a NULL.
|
||||
**
|
||||
** If CALLBACK is an empty string, then revert to the default behavior
|
||||
** which is to set the binding to NULL.
|
||||
**
|
||||
** If CALLBACK returns an error, that causes the statement execution to
|
||||
** abort. Hence, to configure a connection so that it throws an error
|
||||
** on an attempt to bind an unknown variable, do something like this:
|
||||
**
|
||||
** proc bind_error {name} {error "no such variable: $name"}
|
||||
** db bind_fallback bind_error
|
||||
*/
|
||||
case DB_BIND_FALLBACK: {
|
||||
if( objc>3 ){
|
||||
Tcl_WrongNumArgs(interp, 2, objv, "?CALLBACK?");
|
||||
return TCL_ERROR;
|
||||
}else if( objc==2 ){
|
||||
if( pDb->zBindFallback ){
|
||||
Tcl_AppendResult(interp, pDb->zBindFallback, (char*)0);
|
||||
}
|
||||
}else{
|
||||
char *zCallback;
|
||||
int len;
|
||||
if( pDb->zBindFallback ){
|
||||
Tcl_Free(pDb->zBindFallback);
|
||||
}
|
||||
zCallback = Tcl_GetStringFromObj(objv[2], &len);
|
||||
if( zCallback && len>0 ){
|
||||
pDb->zBindFallback = Tcl_Alloc( len + 1 );
|
||||
memcpy(pDb->zBindFallback, zCallback, len+1);
|
||||
}else{
|
||||
pDb->zBindFallback = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* $db busy ?CALLBACK?
|
||||
**
|
||||
** Invoke the given callback if an SQL statement attempts to open
|
||||
@@ -2753,7 +2646,6 @@ deserialize_error:
|
||||
char *zName;
|
||||
int nArg = -1;
|
||||
int i;
|
||||
int eType = SQLITE_NULL;
|
||||
if( objc<4 ){
|
||||
Tcl_WrongNumArgs(interp, 2, objv, "NAME ?SWITCHES? SCRIPT");
|
||||
return TCL_ERROR;
|
||||
@@ -2761,7 +2653,7 @@ deserialize_error:
|
||||
for(i=3; i<(objc-1); i++){
|
||||
const char *z = Tcl_GetString(objv[i]);
|
||||
int n = strlen30(z);
|
||||
if( n>1 && strncmp(z, "-argcount",n)==0 ){
|
||||
if( n>2 && strncmp(z, "-argcount",n)==0 ){
|
||||
if( i==(objc-2) ){
|
||||
Tcl_AppendResult(interp, "option requires an argument: ", z,(char*)0);
|
||||
return TCL_ERROR;
|
||||
@@ -2774,25 +2666,11 @@ deserialize_error:
|
||||
}
|
||||
i++;
|
||||
}else
|
||||
if( n>1 && strncmp(z, "-deterministic",n)==0 ){
|
||||
if( n>2 && strncmp(z, "-deterministic",n)==0 ){
|
||||
flags |= SQLITE_DETERMINISTIC;
|
||||
}else
|
||||
if( n>1 && strncmp(z, "-returntype", n)==0 ){
|
||||
const char *azType[] = {"integer", "real", "text", "blob", "any", 0};
|
||||
assert( SQLITE_INTEGER==1 && SQLITE_FLOAT==2 && SQLITE_TEXT==3 );
|
||||
assert( SQLITE_BLOB==4 && SQLITE_NULL==5 );
|
||||
if( i==(objc-2) ){
|
||||
Tcl_AppendResult(interp, "option requires an argument: ", z,(char*)0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
i++;
|
||||
if( Tcl_GetIndexFromObj(interp, objv[i], azType, "type", 0, &eType) ){
|
||||
return TCL_ERROR;
|
||||
}
|
||||
eType++;
|
||||
}else{
|
||||
Tcl_AppendResult(interp, "bad option \"", z,
|
||||
"\": must be -argcount, -deterministic or -returntype", (char*)0
|
||||
"\": must be -argcount or -deterministic", (char*)0
|
||||
);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
@@ -2808,7 +2686,6 @@ deserialize_error:
|
||||
pFunc->pScript = pScript;
|
||||
Tcl_IncrRefCount(pScript);
|
||||
pFunc->useEvalObjv = safeToUseEvalObjv(interp, pScript);
|
||||
pFunc->eType = eType;
|
||||
rc = sqlite3_create_function(pDb->db, zName, nArg, flags,
|
||||
pFunc, tclSqlFunc, 0, 0);
|
||||
if( rc!=SQLITE_OK ){
|
||||
|
||||
-28
@@ -2674,33 +2674,6 @@ static int SQLITE_TCLAPI test_stmt_readonly(
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
** Usage: sqlite3_stmt_isexplain STMT
|
||||
**
|
||||
** Return 1, 2, or 0 respectively if STMT is an EXPLAIN statement, an
|
||||
** EXPLAIN QUERY PLAN statement or an ordinary statement or NULL pointer.
|
||||
*/
|
||||
static int SQLITE_TCLAPI test_stmt_isexplain(
|
||||
void * clientData,
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *CONST objv[]
|
||||
){
|
||||
sqlite3_stmt *pStmt;
|
||||
int rc;
|
||||
|
||||
if( objc!=2 ){
|
||||
Tcl_AppendResult(interp, "wrong # args: should be \"",
|
||||
Tcl_GetStringFromObj(objv[0], 0), " STMT", 0);
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR;
|
||||
rc = sqlite3_stmt_isexplain(pStmt);
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
** Usage: sqlite3_stmt_busy STMT
|
||||
**
|
||||
@@ -7867,7 +7840,6 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
|
||||
#endif
|
||||
{ "sqlite3_next_stmt", test_next_stmt ,0 },
|
||||
{ "sqlite3_stmt_readonly", test_stmt_readonly ,0 },
|
||||
{ "sqlite3_stmt_isexplain", test_stmt_isexplain,0 },
|
||||
{ "sqlite3_stmt_busy", test_stmt_busy ,0 },
|
||||
{ "uses_stmt_journal", uses_stmt_journal ,0 },
|
||||
|
||||
|
||||
@@ -237,10 +237,14 @@ static int fsdirNext(sqlite3_vtab_cursor *cur){
|
||||
|
||||
if( pCsr->pDir ){
|
||||
struct DIRENT *pRes = 0;
|
||||
#if defined(__MINGW_H)
|
||||
pRes = readdir(pCsr->pDir);
|
||||
if( pRes!=0 ){
|
||||
memcpy(&pCsr->entry, pRes, sizeof(struct DIRENT));
|
||||
}
|
||||
#else
|
||||
readdir_r(pCsr->pDir, &pCsr->entry, &pRes);
|
||||
#endif
|
||||
if( pRes==0 ){
|
||||
closedir(pCsr->pDir);
|
||||
pCsr->pDir = 0;
|
||||
|
||||
+1
-1
@@ -560,10 +560,10 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
|
||||
int lastTokenParsed = -1; /* type of the previous token */
|
||||
sqlite3 *db = pParse->db; /* The database connection */
|
||||
int mxSqlLen; /* Max length of an SQL string */
|
||||
VVA_ONLY( u8 startedWithOom = db->mallocFailed );
|
||||
#ifdef sqlite3Parser_ENGINEALWAYSONSTACK
|
||||
yyParser sEngine; /* Space to hold the Lemon-generated Parser object */
|
||||
#endif
|
||||
VVA_ONLY( u8 startedWithOom = db->mallocFailed );
|
||||
|
||||
assert( zSql!=0 );
|
||||
mxSqlLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];
|
||||
|
||||
+6
-44
@@ -309,62 +309,24 @@ void sqlite3TreeViewBound(
|
||||
** Generate a human-readable explanation for a Window object
|
||||
*/
|
||||
void sqlite3TreeViewWindow(TreeView *pView, const Window *pWin, u8 more){
|
||||
int nElement = 0;
|
||||
if( pWin->pFilter ){
|
||||
sqlite3TreeViewItem(pView, "FILTER", 1);
|
||||
sqlite3TreeViewExpr(pView, pWin->pFilter, 0);
|
||||
sqlite3TreeViewPop(pView);
|
||||
}
|
||||
pView = sqlite3TreeViewPush(pView, more);
|
||||
if( pWin->zName ){
|
||||
sqlite3TreeViewLine(pView, "OVER %s (%p)", pWin->zName, pWin);
|
||||
sqlite3TreeViewLine(pView, "OVER %s", pWin->zName);
|
||||
}else{
|
||||
sqlite3TreeViewLine(pView, "OVER (%p)", pWin);
|
||||
}
|
||||
if( pWin->zBase ) nElement++;
|
||||
if( pWin->pOrderBy ) nElement++;
|
||||
if( pWin->eFrmType ) nElement++;
|
||||
if( pWin->eExclude ) nElement++;
|
||||
if( pWin->zBase ){
|
||||
sqlite3TreeViewPush(pView, (--nElement)>0);
|
||||
sqlite3TreeViewLine(pView, "window: %s", pWin->zBase);
|
||||
sqlite3TreeViewPop(pView);
|
||||
sqlite3TreeViewLine(pView, "OVER");
|
||||
}
|
||||
if( pWin->pPartition ){
|
||||
sqlite3TreeViewExprList(pView, pWin->pPartition, nElement>0,"PARTITION-BY");
|
||||
sqlite3TreeViewExprList(pView, pWin->pPartition, 1, "PARTITION-BY");
|
||||
}
|
||||
if( pWin->pOrderBy ){
|
||||
sqlite3TreeViewExprList(pView, pWin->pOrderBy, (--nElement)>0, "ORDER-BY");
|
||||
sqlite3TreeViewExprList(pView, pWin->pOrderBy, 1, "ORDER-BY");
|
||||
}
|
||||
if( pWin->eFrmType ){
|
||||
char zBuf[30];
|
||||
const char *zFrmType = "ROWS";
|
||||
if( pWin->eFrmType==TK_RANGE ) zFrmType = "RANGE";
|
||||
if( pWin->eFrmType==TK_GROUPS ) zFrmType = "GROUPS";
|
||||
sqlite3_snprintf(sizeof(zBuf),zBuf,"%s%s",zFrmType,
|
||||
pWin->bImplicitFrame ? " (implied)" : "");
|
||||
sqlite3TreeViewItem(pView, zBuf, (--nElement)>0);
|
||||
if( pWin->eType ){
|
||||
sqlite3TreeViewItem(pView, pWin->eType==TK_RANGE ? "RANGE" : "ROWS", 0);
|
||||
sqlite3TreeViewBound(pView, pWin->eStart, pWin->pStart, 1);
|
||||
sqlite3TreeViewBound(pView, pWin->eEnd, pWin->pEnd, 0);
|
||||
sqlite3TreeViewPop(pView);
|
||||
}
|
||||
if( pWin->eExclude ){
|
||||
char zBuf[30];
|
||||
const char *zExclude;
|
||||
switch( pWin->eExclude ){
|
||||
case TK_NO: zExclude = "NO OTHERS"; break;
|
||||
case TK_CURRENT: zExclude = "CURRENT ROW"; break;
|
||||
case TK_GROUP: zExclude = "GROUP"; break;
|
||||
case TK_TIES: zExclude = "TIES"; break;
|
||||
default:
|
||||
sqlite3_snprintf(sizeof(zBuf),zBuf,"invalid(%d)", pWin->eExclude);
|
||||
zExclude = zBuf;
|
||||
break;
|
||||
}
|
||||
sqlite3TreeViewPush(pView, 0);
|
||||
sqlite3TreeViewLine(pView, "EXCLUDE %s", zExclude);
|
||||
sqlite3TreeViewPop(pView);
|
||||
}
|
||||
sqlite3TreeViewPop(pView);
|
||||
}
|
||||
#endif /* SQLITE_OMIT_WINDOWFUNC */
|
||||
|
||||
+1
-6
@@ -143,7 +143,7 @@ int sqlite3RunVacuum(
|
||||
char **pzErrMsg, /* Write error message here */
|
||||
sqlite3 *db, /* Database connection */
|
||||
int iDb, /* Which attached DB to vacuum */
|
||||
sqlite3_value *pOut /* Write results here, if not NULL. VACUUM INTO */
|
||||
sqlite3_value *pOut /* Write results here, if not NULL */
|
||||
){
|
||||
int rc = SQLITE_OK; /* Return code from service routines */
|
||||
Btree *pMain; /* The database being vacuumed */
|
||||
@@ -152,7 +152,6 @@ int sqlite3RunVacuum(
|
||||
u64 saved_flags; /* Saved value of db->flags */
|
||||
int saved_nChange; /* Saved value of db->nChange */
|
||||
int saved_nTotalChange; /* Saved value of db->nTotalChange */
|
||||
u32 saved_openFlags; /* Saved value of db->openFlags */
|
||||
u8 saved_mTrace; /* Saved trace settings */
|
||||
Db *pDb = 0; /* Database to detach at end of vacuum */
|
||||
int isMemDb; /* True if vacuuming a :memory: database */
|
||||
@@ -169,15 +168,12 @@ int sqlite3RunVacuum(
|
||||
sqlite3SetString(pzErrMsg, db,"cannot VACUUM - SQL statements in progress");
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
saved_openFlags = db->openFlags;
|
||||
if( pOut ){
|
||||
if( sqlite3_value_type(pOut)!=SQLITE_TEXT ){
|
||||
sqlite3SetString(pzErrMsg, db, "non-text filename");
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
zOut = (const char*)sqlite3_value_text(pOut);
|
||||
db->openFlags &= ~SQLITE_OPEN_READONLY;
|
||||
db->openFlags |= SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE;
|
||||
}else{
|
||||
zOut = "";
|
||||
}
|
||||
@@ -216,7 +212,6 @@ int sqlite3RunVacuum(
|
||||
*/
|
||||
nDb = db->nDb;
|
||||
rc = execSqlF(db, pzErrMsg, "ATTACH %Q AS vacuum_db", zOut);
|
||||
db->openFlags = saved_openFlags;
|
||||
if( rc!=SQLITE_OK ) goto end_of_vacuum;
|
||||
assert( (db->nDb-1)==nDb );
|
||||
pDb = &db->aDb[nDb];
|
||||
|
||||
+58
-38
@@ -622,15 +622,6 @@ int sqlite3VdbeExec(
|
||||
|
||||
assert( p->magic==VDBE_MAGIC_RUN ); /* sqlite3_step() verifies this */
|
||||
sqlite3VdbeEnter(p);
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
if( db->xProgress ){
|
||||
u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
|
||||
assert( 0 < db->nProgressOps );
|
||||
nProgressLimit = db->nProgressOps - (iPrior % db->nProgressOps);
|
||||
}else{
|
||||
nProgressLimit = 0xffffffff;
|
||||
}
|
||||
#endif
|
||||
if( p->rc==SQLITE_NOMEM ){
|
||||
/* This happens if a malloc() inside a call to sqlite3_column_text() or
|
||||
** sqlite3_column_text16() failed. */
|
||||
@@ -644,6 +635,15 @@ int sqlite3VdbeExec(
|
||||
db->busyHandler.nBusy = 0;
|
||||
if( db->u1.isInterrupted ) goto abort_due_to_interrupt;
|
||||
sqlite3VdbeIOTraceSql(p);
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
if( db->xProgress ){
|
||||
u32 iPrior = p->aCounter[SQLITE_STMTSTATUS_VM_STEP];
|
||||
assert( 0 < db->nProgressOps );
|
||||
nProgressLimit = db->nProgressOps - (iPrior % db->nProgressOps);
|
||||
}else{
|
||||
nProgressLimit = 0xffffffff;
|
||||
}
|
||||
#endif
|
||||
#ifdef SQLITE_DEBUG
|
||||
sqlite3BeginBenignMalloc();
|
||||
if( p->pc==0
|
||||
@@ -819,11 +819,10 @@ check_for_interrupt:
|
||||
** If the progress callback returns non-zero, exit the virtual machine with
|
||||
** a return code SQLITE_ABORT.
|
||||
*/
|
||||
while( nVmStep>=nProgressLimit && db->xProgress!=0 ){
|
||||
if( nVmStep>=nProgressLimit && db->xProgress!=0 ){
|
||||
assert( db->nProgressOps!=0 );
|
||||
nProgressLimit += db->nProgressOps;
|
||||
nProgressLimit = nVmStep + db->nProgressOps - (nVmStep%db->nProgressOps);
|
||||
if( db->xProgress(db->pProgressArg) ){
|
||||
nProgressLimit = 0xffffffff;
|
||||
rc = SQLITE_INTERRUPT;
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
@@ -1102,7 +1101,6 @@ case OP_String8: { /* same as TK_STRING, out2 */
|
||||
if( encoding!=SQLITE_UTF8 ){
|
||||
rc = sqlite3VdbeMemSetStr(pOut, pOp->p4.z, -1, SQLITE_UTF8, SQLITE_STATIC);
|
||||
assert( rc==SQLITE_OK || rc==SQLITE_TOOBIG );
|
||||
if( rc ) goto too_big;
|
||||
if( SQLITE_OK!=sqlite3VdbeChangeEncoding(pOut, encoding) ) goto no_mem;
|
||||
assert( pOut->szMalloc>0 && pOut->zMalloc==pOut->z );
|
||||
assert( VdbeMemDynamic(pOut)==0 );
|
||||
@@ -1115,6 +1113,7 @@ case OP_String8: { /* same as TK_STRING, out2 */
|
||||
pOp->p4.z = pOut->z;
|
||||
pOp->p1 = pOut->n;
|
||||
}
|
||||
testcase( rc==SQLITE_TOOBIG );
|
||||
#endif
|
||||
if( pOp->p1>db->aLimit[SQLITE_LIMIT_LENGTH] ){
|
||||
goto too_big;
|
||||
@@ -1369,6 +1368,18 @@ case OP_ResultRow: {
|
||||
assert( pOp->p1>0 );
|
||||
assert( pOp->p1+pOp->p2<=(p->nMem+1 - p->nCursor)+1 );
|
||||
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
/* Run the progress counter just before returning.
|
||||
*/
|
||||
if( db->xProgress!=0
|
||||
&& nVmStep>=nProgressLimit
|
||||
&& db->xProgress(db->pProgressArg)!=0
|
||||
){
|
||||
rc = SQLITE_INTERRUPT;
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* If this statement has violated immediate foreign key constraints, do
|
||||
** not return the number of rows modified. And do not RELEASE the statement
|
||||
** transaction. It needs to be rolled back. */
|
||||
@@ -1918,6 +1929,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
|
||||
** OP_Eq or OP_Ne) then take the jump or not depending on whether
|
||||
** or not both operands are null.
|
||||
*/
|
||||
assert( pOp->opcode==OP_Eq || pOp->opcode==OP_Ne );
|
||||
assert( (flags1 & MEM_Cleared)==0 );
|
||||
assert( (pOp->p5 & SQLITE_JUMPIFNULL)==0 || CORRUPT_DB );
|
||||
testcase( (pOp->p5 & SQLITE_JUMPIFNULL)!=0 );
|
||||
@@ -1926,7 +1938,7 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
|
||||
){
|
||||
res = 0; /* Operands are equal */
|
||||
}else{
|
||||
res = ((flags3 & MEM_Null) ? -1 : +1); /* Operands are not equal */
|
||||
res = 1; /* Operands are not equal */
|
||||
}
|
||||
}else{
|
||||
/* SQLITE_NULLEQ is clear and at least one operand is NULL,
|
||||
@@ -2594,15 +2606,15 @@ case OP_Column: {
|
||||
zEndHdr = zData + aOffset[0];
|
||||
testcase( zHdr>=zEndHdr );
|
||||
do{
|
||||
if( (pC->aType[i] = t = zHdr[0])<0x80 ){
|
||||
if( (t = zHdr[0])<0x80 ){
|
||||
zHdr++;
|
||||
offset64 += sqlite3VdbeOneByteSerialTypeLen(t);
|
||||
}else{
|
||||
zHdr += sqlite3GetVarint32(zHdr, &t);
|
||||
pC->aType[i] = t;
|
||||
offset64 += sqlite3VdbeSerialTypeLen(t);
|
||||
}
|
||||
aOffset[++i] = (u32)(offset64 & 0xffffffff);
|
||||
pC->aType[i++] = t;
|
||||
aOffset[i] = (u32)(offset64 & 0xffffffff);
|
||||
}while( i<=p2 && zHdr<zEndHdr );
|
||||
|
||||
/* The record is corrupt if any of the following are true:
|
||||
@@ -3605,7 +3617,6 @@ case OP_OpenDup: {
|
||||
pCx->pKeyInfo = pOrig->pKeyInfo;
|
||||
pCx->isTable = pOrig->isTable;
|
||||
pCx->pgnoRoot = pOrig->pgnoRoot;
|
||||
pCx->isOrdered = pOrig->isOrdered;
|
||||
rc = sqlite3BtreeCursor(pOrig->pBtx, pCx->pgnoRoot, BTREE_WRCSR,
|
||||
pCx->pKeyInfo, pCx->uc.pCursor);
|
||||
/* The sqlite3BtreeCursor() routine can only fail for the first cursor
|
||||
@@ -4569,7 +4580,14 @@ case OP_NewRowid: { /* out2 */
|
||||
** This instruction only works on tables. The equivalent instruction
|
||||
** for indices is OP_IdxInsert.
|
||||
*/
|
||||
case OP_Insert: {
|
||||
/* Opcode: InsertInt P1 P2 P3 P4 P5
|
||||
** Synopsis: intkey=P3 data=r[P2]
|
||||
**
|
||||
** This works exactly like OP_Insert except that the key is the
|
||||
** integer value P3, not the value of the integer stored in register P3.
|
||||
*/
|
||||
case OP_Insert:
|
||||
case OP_InsertInt: {
|
||||
Mem *pData; /* MEM cell holding data for the record to be inserted */
|
||||
Mem *pKey; /* MEM cell holding key for the record */
|
||||
VdbeCursor *pC; /* Cursor to table into which insert is written */
|
||||
@@ -4590,11 +4608,16 @@ case OP_Insert: {
|
||||
REGISTER_TRACE(pOp->p2, pData);
|
||||
sqlite3VdbeIncrWriteCounter(p, pC);
|
||||
|
||||
pKey = &aMem[pOp->p3];
|
||||
assert( pKey->flags & MEM_Int );
|
||||
assert( memIsValid(pKey) );
|
||||
REGISTER_TRACE(pOp->p3, pKey);
|
||||
x.nKey = pKey->u.i;
|
||||
if( pOp->opcode==OP_Insert ){
|
||||
pKey = &aMem[pOp->p3];
|
||||
assert( pKey->flags & MEM_Int );
|
||||
assert( memIsValid(pKey) );
|
||||
REGISTER_TRACE(pOp->p3, pKey);
|
||||
x.nKey = pKey->u.i;
|
||||
}else{
|
||||
assert( pOp->opcode==OP_InsertInt );
|
||||
x.nKey = pOp->p3;
|
||||
}
|
||||
|
||||
if( pOp->p4type==P4_TABLE && HAS_UPDATE_HOOK(db) ){
|
||||
assert( pC->iDb>=0 );
|
||||
@@ -5114,7 +5137,7 @@ case OP_Sort: { /* jump */
|
||||
p->aCounter[SQLITE_STMTSTATUS_SORT]++;
|
||||
/* Fall through into OP_Rewind */
|
||||
}
|
||||
/* Opcode: Rewind P1 P2 * * *
|
||||
/* Opcode: Rewind P1 P2 * * P5
|
||||
**
|
||||
** The next use of the Rowid or Column or Next instruction for P1
|
||||
** will refer to the first entry in the database table or index.
|
||||
@@ -5122,6 +5145,10 @@ case OP_Sort: { /* jump */
|
||||
** If the table or index is not empty, fall through to the following
|
||||
** instruction.
|
||||
**
|
||||
** If P5 is non-zero and the table is not empty, then the "skip-next"
|
||||
** flag is set on the cursor so that the next OP_Next instruction
|
||||
** executed on it is a no-op.
|
||||
**
|
||||
** This opcode leaves the cursor configured to move in forward order,
|
||||
** from the beginning toward the end. In other words, the cursor is
|
||||
** configured to use Next, not Prev.
|
||||
@@ -5132,7 +5159,6 @@ case OP_Rewind: { /* jump */
|
||||
int res;
|
||||
|
||||
assert( pOp->p1>=0 && pOp->p1<p->nCursor );
|
||||
assert( pOp->p5==0 );
|
||||
pC = p->apCsr[pOp->p1];
|
||||
assert( pC!=0 );
|
||||
assert( isSorter(pC)==(pOp->opcode==OP_SorterSort) );
|
||||
@@ -5147,6 +5173,9 @@ case OP_Rewind: { /* jump */
|
||||
pCrsr = pC->uc.pCursor;
|
||||
assert( pCrsr );
|
||||
rc = sqlite3BtreeFirst(pCrsr, &res);
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
if( pOp->p5 ) sqlite3BtreeSkipNext(pCrsr);
|
||||
#endif
|
||||
pC->deferredMoveto = 0;
|
||||
pC->cacheStatus = CACHE_STALE;
|
||||
}
|
||||
@@ -6156,7 +6185,8 @@ case OP_Program: { /* jump */
|
||||
}
|
||||
#endif
|
||||
pOp = &aOp[-1];
|
||||
goto check_for_interrupt;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/* Opcode: Param P1 P2 * * *
|
||||
@@ -6528,7 +6558,6 @@ case OP_AggFinal: {
|
||||
assert( (pMem->flags & ~(MEM_Null|MEM_Agg))==0 );
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
if( pOp->p3 ){
|
||||
memAboutToChange(p, &aMem[pOp->p3]);
|
||||
rc = sqlite3VdbeMemAggValue(pMem, &aMem[pOp->p3], pOp->p4.pFunc);
|
||||
pMem = &aMem[pOp->p3];
|
||||
}else
|
||||
@@ -7566,16 +7595,7 @@ abort_due_to_error:
|
||||
** release the mutexes on btrees that were acquired at the
|
||||
** top. */
|
||||
vdbe_return:
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
while( nVmStep>=nProgressLimit && db->xProgress!=0 ){
|
||||
nProgressLimit += db->nProgressOps;
|
||||
if( db->xProgress(db->pProgressArg) ){
|
||||
nProgressLimit = 0xffffffff;
|
||||
rc = SQLITE_INTERRUPT;
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
testcase( nVmStep>0 );
|
||||
p->aCounter[SQLITE_STMTSTATUS_VM_STEP] += (int)nVmStep;
|
||||
sqlite3VdbeLeave(p);
|
||||
assert( rc!=SQLITE_OK || nExtraDelete==0
|
||||
|
||||
+26
-31
@@ -1120,10 +1120,10 @@ int sqlite3_column_type(sqlite3_stmt *pStmt, int i){
|
||||
** or a constant) then useTypes 2, 3, and 4 return NULL.
|
||||
*/
|
||||
static const void *columnName(
|
||||
sqlite3_stmt *pStmt, /* The statement */
|
||||
int N, /* Which column to get the name for */
|
||||
int useUtf16, /* True to return the name as UTF16 */
|
||||
int useType /* What type of name */
|
||||
sqlite3_stmt *pStmt,
|
||||
int N,
|
||||
const void *(*xFunc)(Mem*),
|
||||
int useType
|
||||
){
|
||||
const void *ret;
|
||||
Vdbe *p;
|
||||
@@ -1144,15 +1144,8 @@ static const void *columnName(
|
||||
N += useType*n;
|
||||
sqlite3_mutex_enter(db->mutex);
|
||||
assert( db->mallocFailed==0 );
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
if( useUtf16 ){
|
||||
ret = sqlite3_value_text16((sqlite3_value*)&p->aColName[N]);
|
||||
}else
|
||||
#endif
|
||||
{
|
||||
ret = sqlite3_value_text((sqlite3_value*)&p->aColName[N]);
|
||||
}
|
||||
/* A malloc may have failed inside of the _text() call. If this
|
||||
ret = xFunc(&p->aColName[N]);
|
||||
/* A malloc may have failed inside of the xFunc() call. If this
|
||||
** is the case, clear the mallocFailed flag and return NULL.
|
||||
*/
|
||||
if( db->mallocFailed ){
|
||||
@@ -1169,11 +1162,13 @@ static const void *columnName(
|
||||
** statement pStmt.
|
||||
*/
|
||||
const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 0, COLNAME_NAME);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 1, COLNAME_NAME);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1192,11 +1187,13 @@ const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
|
||||
** of the result set of SQL statement pStmt.
|
||||
*/
|
||||
const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 0, COLNAME_DECLTYPE);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 1, COLNAME_DECLTYPE);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
|
||||
}
|
||||
#endif /* SQLITE_OMIT_UTF16 */
|
||||
#endif /* SQLITE_OMIT_DECLTYPE */
|
||||
@@ -1208,11 +1205,13 @@ const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
|
||||
** anything else which is not an unambiguous reference to a database column.
|
||||
*/
|
||||
const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 0, COLNAME_DATABASE);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 1, COLNAME_DATABASE);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
|
||||
}
|
||||
#endif /* SQLITE_OMIT_UTF16 */
|
||||
|
||||
@@ -1222,11 +1221,13 @@ const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
|
||||
** anything else which is not an unambiguous reference to a database column.
|
||||
*/
|
||||
const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 0, COLNAME_TABLE);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 1, COLNAME_TABLE);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
|
||||
}
|
||||
#endif /* SQLITE_OMIT_UTF16 */
|
||||
|
||||
@@ -1236,11 +1237,13 @@ const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
|
||||
** anything else which is not an unambiguous reference to a database column.
|
||||
*/
|
||||
const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 0, COLNAME_COLUMN);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_UTF16
|
||||
const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
|
||||
return columnName(pStmt, N, 1, COLNAME_COLUMN);
|
||||
return columnName(
|
||||
pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
|
||||
}
|
||||
#endif /* SQLITE_OMIT_UTF16 */
|
||||
#endif /* SQLITE_ENABLE_COLUMN_METADATA */
|
||||
@@ -1608,14 +1611,6 @@ int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
|
||||
return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;
|
||||
}
|
||||
|
||||
/*
|
||||
** Return 1 if the statement is an EXPLAIN and return 2 if the
|
||||
** statement is an EXPLAIN QUERY PLAN
|
||||
*/
|
||||
int sqlite3_stmt_isexplain(sqlite3_stmt *pStmt){
|
||||
return pStmt ? ((Vdbe*)pStmt)->explain : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** Return true if the prepared statement is in need of being reset.
|
||||
*/
|
||||
|
||||
@@ -637,7 +637,6 @@ int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
|
||||
int opcode = pOp->opcode;
|
||||
if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename
|
||||
|| opcode==OP_VDestroy
|
||||
|| (opcode==OP_Function0 && pOp->p4.pFunc->funcFlags&SQLITE_FUNC_INTERNAL)
|
||||
|| ((opcode==OP_Halt || opcode==OP_HaltIfNull)
|
||||
&& ((pOp->p1)!=SQLITE_OK && pOp->p2==OE_Abort))
|
||||
){
|
||||
|
||||
+5
-5
@@ -3335,11 +3335,11 @@ static int whereLoopAddVirtual(
|
||||
rc = whereLoopAddVirtualOne(pBuilder, mPrereq, ALLBITS, 0, p, mNoOmit, &bIn);
|
||||
|
||||
/* If the call to xBestIndex() with all terms enabled produced a plan
|
||||
** that does not require any source tables (IOW: a plan with mBest==0)
|
||||
** and does not use an IN(...) operator, then there is no point in making
|
||||
** any further calls to xBestIndex() since they will all return the same
|
||||
** result (if the xBestIndex() implementation is sane). */
|
||||
if( rc==SQLITE_OK && ((mBest = (pNew->prereq & ~mPrereq))!=0 || bIn) ){
|
||||
** that does not require any source tables (IOW: a plan with mBest==0),
|
||||
** then there is no point in making any further calls to xBestIndex()
|
||||
** since they will all return the same result (if the xBestIndex()
|
||||
** implementation is sane). */
|
||||
if( rc==SQLITE_OK && (mBest = (pNew->prereq & ~mPrereq))!=0 ){
|
||||
int seenZero = 0; /* True if a plan with no prereqs seen */
|
||||
int seenZeroNoIN = 0; /* Plan with no prereqs and no IN(...) seen */
|
||||
Bitmask mPrev = 0;
|
||||
|
||||
+2
-41
@@ -582,6 +582,7 @@ static int codeEqualityTerm(
|
||||
if( pLoop->aLTerm[i]->pExpr==pX ){
|
||||
int iOut = iReg + i - iEq;
|
||||
if( eType==IN_INDEX_ROWID ){
|
||||
testcase( nEq>1 ); /* Happens with a UNIQUE index on ROWID */
|
||||
pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iOut);
|
||||
}else{
|
||||
int iCol = aiMap ? aiMap[iMap++] : 0;
|
||||
@@ -1159,34 +1160,6 @@ static void whereIndexExprTrans(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** The pTruth expression is always true because it is the WHERE clause
|
||||
** a partial index that is driving a query loop. Look through all of the
|
||||
** WHERE clause terms on the query, and if any of those terms must be
|
||||
** true because pTruth is true, then mark those WHERE clause terms as
|
||||
** coded.
|
||||
*/
|
||||
static void whereApplyPartialIndexConstraints(
|
||||
Expr *pTruth,
|
||||
int iTabCur,
|
||||
WhereClause *pWC
|
||||
){
|
||||
int i;
|
||||
WhereTerm *pTerm;
|
||||
while( pTruth->op==TK_AND ){
|
||||
whereApplyPartialIndexConstraints(pTruth->pLeft, iTabCur, pWC);
|
||||
pTruth = pTruth->pRight;
|
||||
}
|
||||
for(i=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
|
||||
Expr *pExpr;
|
||||
if( pTerm->wtFlags & TERM_CODED ) continue;
|
||||
pExpr = pTerm->pExpr;
|
||||
if( sqlite3ExprCompare(0, pExpr, pTruth, iTabCur)==0 ){
|
||||
pTerm->wtFlags |= TERM_CODED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Generate code for the start of the iLevel-th loop in the WHERE clause
|
||||
** implementation described by pWInfo.
|
||||
@@ -1371,9 +1344,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
sqlite3VdbeAddOp3(v, OP_SeekRowid, iCur, addrNxt, iRowidReg);
|
||||
VdbeCoverage(v);
|
||||
pLevel->op = OP_Noop;
|
||||
if( (pTerm->prereqAll & pLevel->notReady)==0 ){
|
||||
pTerm->wtFlags |= TERM_CODED;
|
||||
}
|
||||
}else if( (pLoop->wsFlags & WHERE_IPK)!=0
|
||||
&& (pLoop->wsFlags & WHERE_COLUMN_RANGE)!=0
|
||||
){
|
||||
@@ -1796,14 +1766,6 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
whereIndexExprTrans(pIdx, iCur, iIdxCur, pWInfo);
|
||||
}
|
||||
|
||||
/* If a partial index is driving the loop, try to eliminate WHERE clause
|
||||
** terms from the query that must be true due to the WHERE clause of
|
||||
** the partial index
|
||||
*/
|
||||
if( pIdx->pPartIdxWhere ){
|
||||
whereApplyPartialIndexConstraints(pIdx->pPartIdxWhere, iCur, pWC);
|
||||
}
|
||||
|
||||
/* Record the instruction used to terminate the loop. */
|
||||
if( pLoop->wsFlags & WHERE_ONEROW ){
|
||||
pLevel->op = OP_Noop;
|
||||
@@ -2197,9 +2159,8 @@ Bitmask sqlite3WhereCodeOneLoopStart(
|
||||
u32 x = pLevel->iLikeRepCntr;
|
||||
if( x>0 ){
|
||||
skipLikeAddr = sqlite3VdbeAddOp1(v, (x&1)?OP_IfNot:OP_If,(int)(x>>1));
|
||||
VdbeCoverageIf(v, (x&1)==1);
|
||||
VdbeCoverageIf(v, (x&1)==0);
|
||||
}
|
||||
VdbeCoverage(v);
|
||||
#endif
|
||||
}
|
||||
#ifdef WHERETRACE_ENABLED /* 0xffff */
|
||||
|
||||
@@ -1520,12 +1520,6 @@ Bitmask sqlite3WhereExprUsageNN(WhereMaskSet *pMaskSet, Expr *p){
|
||||
}else if( p->x.pList ){
|
||||
mask |= sqlite3WhereExprListUsage(pMaskSet, p->x.pList);
|
||||
}
|
||||
#ifndef SQLITE_OMIT_WINDOWFUNC
|
||||
if( p->op==TK_FUNCTION && p->y.pWin ){
|
||||
mask |= sqlite3WhereExprListUsage(pMaskSet, p->y.pWin->pPartition);
|
||||
mask |= sqlite3WhereExprListUsage(pMaskSet, p->y.pWin->pOrderBy);
|
||||
}
|
||||
#endif
|
||||
return mask;
|
||||
}
|
||||
Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){
|
||||
|
||||
+1003
-1444
File diff suppressed because it is too large
Load Diff
@@ -179,7 +179,6 @@ do_execsql_test 4.3 {
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
ifcapable windowfunc {
|
||||
do_execsql_test 5.0 {
|
||||
CREATE TABLE t2(a);
|
||||
CREATE TRIGGER r2 AFTER INSERT ON t2 WHEN new.a NOT NULL BEGIN
|
||||
@@ -236,7 +235,6 @@ do_execsql_test 5.2 {
|
||||
do_execsql_test 5.3 {
|
||||
INSERT INTO t2x VALUES(1);
|
||||
} {}
|
||||
} ;# windowfunc
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ ifcapable !altertable {
|
||||
return
|
||||
}
|
||||
|
||||
ifcapable windowfunc {
|
||||
do_execsql_test 1.0 {
|
||||
CREATE TABLE t1(a, b);
|
||||
CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN
|
||||
@@ -41,7 +40,6 @@ do_execsql_test 1.2 {
|
||||
do_execsql_test 1.3 {
|
||||
INSERT INTO t1 VALUES(1, 2);
|
||||
}
|
||||
} ;# windowfunc
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
@@ -81,64 +79,7 @@ do_execsql_test 3.2 {
|
||||
SELECT sql FROM sqlite_master WHERE name = 'v1'
|
||||
} {{CREATE VIEW v1 AS SELECT * FROM t1 WHERE a=1 OR (bbb IN ())}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_execsql_test 4.0 {
|
||||
CREATE TABLE t1(a, b);
|
||||
CREATE TABLE t3(e, f);
|
||||
CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN
|
||||
INSERT INTO t2 VALUES(new.a, new.b);
|
||||
END;
|
||||
}
|
||||
|
||||
do_catchsql_test 4.1.2 {
|
||||
BEGIN;
|
||||
ALTER TABLE t3 RENAME TO t4;
|
||||
} {1 {error in trigger tr1: no such table: main.t2}}
|
||||
do_execsql_test 4.1.2 {
|
||||
COMMIT;
|
||||
}
|
||||
do_execsql_test 4.1.3 {
|
||||
SELECT * FROM sqlite_master WHERE type='table' AND name!='t1';
|
||||
} {table t3 t3 3 {CREATE TABLE t3(e, f)}}
|
||||
|
||||
|
||||
do_catchsql_test 4.2.1 {
|
||||
BEGIN;
|
||||
ALTER TABLE t3 RENAME e TO eee;
|
||||
} {1 {error in trigger tr1: no such table: main.t2}}
|
||||
do_execsql_test 4.2.2 {
|
||||
COMMIT;
|
||||
}
|
||||
do_execsql_test 4.2.3 {
|
||||
SELECT * FROM sqlite_master WHERE type='table' AND name!='t1';
|
||||
} {table t3 t3 3 {CREATE TABLE t3(e, f)}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_execsql_test 5.0 {
|
||||
CREATE TABLE t1 (
|
||||
c1 integer, c2, PRIMARY KEY(c1 collate rtrim),
|
||||
UNIQUE(c2)
|
||||
)
|
||||
}
|
||||
do_execsql_test 5.1 {
|
||||
ALTER TABLE t1 RENAME c1 TO c3;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_execsql_test 6.0 {
|
||||
CREATE TEMPORARY TABLE Table0 (
|
||||
Col0 INTEGER,
|
||||
PRIMARY KEY(Col0 COLLATE RTRIM),
|
||||
FOREIGN KEY (Col0) REFERENCES Table0
|
||||
);
|
||||
}
|
||||
|
||||
do_execsql_test 6.1 {
|
||||
ALTER TABLE Table0 RENAME Col0 TO Col0;
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@ do_execsql_test 2.1 {
|
||||
# Segfault due to multiple uses of the same subquery where the
|
||||
# subquery is implemented via coroutine.
|
||||
#
|
||||
ifcapable windowfunc {
|
||||
sqlite3 db :memory:
|
||||
do_execsql_test 3.0 {
|
||||
-- This is the original test case reported on the mailing list
|
||||
@@ -167,8 +166,6 @@ do_execsql_test 3.0 {
|
||||
AND (albums.id IN (1, 2)))
|
||||
));
|
||||
} {1 Ar}
|
||||
} ;# windowfunc
|
||||
|
||||
# The remaining test cases were discovered (by Dan) during trouble-shooting
|
||||
sqlite3 db :memory:
|
||||
do_execsql_test 3.1 {
|
||||
|
||||
@@ -266,62 +266,5 @@ do_execsql_test 3.5 {
|
||||
4 0 ValueB 4 0 ValueB
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# If there is an IN(..) condition in the WHERE clause of a query on a
|
||||
# virtual table, the xBestIndex method is first invoked with the IN(...)
|
||||
# represented by a "usable" SQLITE_INDEX_CONSTRAINT_EQ constraint. If
|
||||
# the virtual table elects to use the IN(...) constraint, then the
|
||||
# xBestIndex method is invoked again, this time with the IN(...) marked
|
||||
# as "not usable". Depending on the relative costs of the two plans as
|
||||
# defined by the virtual table implementation, and the cardinality of the
|
||||
# IN(...) operator, SQLite chooses the most efficient plan.
|
||||
#
|
||||
# At one point the second invocation of xBestIndex() was only being made
|
||||
# for join queries. The following tests check that this problem has been
|
||||
# fixed.
|
||||
#
|
||||
proc vtab_command {method args} {
|
||||
switch -- $method {
|
||||
xConnect {
|
||||
return "CREATE TABLE t1(a, b, c, d)"
|
||||
}
|
||||
|
||||
xBestIndex {
|
||||
set clist [lindex $args 0]
|
||||
lappend ::bestindex_calls $clist
|
||||
set ret "cost 1000000 idxnum 555"
|
||||
for {set i 0} {$i < [llength $clist]} {incr i} {
|
||||
array set C [lindex $clist $i]
|
||||
if {$C(usable)} { lappend ret use $i }
|
||||
}
|
||||
return $ret
|
||||
}
|
||||
}
|
||||
return {}
|
||||
}
|
||||
|
||||
do_execsql_test 4.0 {
|
||||
CREATE VIRTUAL TABLE x1 USING tcl(vtab_command);
|
||||
} {}
|
||||
|
||||
do_test 4.1 {
|
||||
set ::bestindex_calls [list]
|
||||
execsql {
|
||||
SELECT * FROM x1 WHERE a=? AND b BETWEEN ? AND ? AND c IN (1, 2, 3, 4);
|
||||
}
|
||||
set ::bestindex_calls
|
||||
} [list \
|
||||
[list {op eq column 0 usable 1} \
|
||||
{op eq column 2 usable 1} \
|
||||
{op ge column 1 usable 1} \
|
||||
{op le column 1 usable 1} \
|
||||
] \
|
||||
[list {op eq column 0 usable 1} \
|
||||
{op eq column 2 usable 0} \
|
||||
{op ge column 1 usable 1} \
|
||||
{op le column 1 usable 1}
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
+1
-21
@@ -115,30 +115,10 @@ ifcapable wal {
|
||||
test_is_readonly capi3d-2.8 {PRAGMA application_id=1234} 0
|
||||
test_is_readonly capi3d-2.9 {VACUUM} 0
|
||||
test_is_readonly capi3d-2.10 {PRAGMA integrity_check} 1
|
||||
do_test capi3-2.49 {
|
||||
do_test capi3-2.99 {
|
||||
sqlite3_stmt_readonly 0
|
||||
} 1
|
||||
|
||||
|
||||
# Tests for the is-explain interface.
|
||||
#
|
||||
proc test_is_explain {testname sql truth} {
|
||||
do_test $testname [format {
|
||||
set DB [sqlite3_connection_pointer db]
|
||||
set STMT [sqlite3_prepare $DB {%s} -1 TAIL]
|
||||
set rc [sqlite3_stmt_isexplain $STMT]
|
||||
sqlite3_finalize $STMT
|
||||
set rc
|
||||
} $sql] $truth
|
||||
}
|
||||
|
||||
test_is_explain capi3d-2.51 {SELECT * FROM sqlite_master} 0
|
||||
test_is_explain capi3d-2.52 { explain SELECT * FROM sqlite_master} 1
|
||||
test_is_explain capi3d-2.53 { Explain Query Plan select * FROM sqlite_master} 2
|
||||
do_test capi3-2.99 {
|
||||
sqlite3_stmt_isexplain 0
|
||||
} 0
|
||||
|
||||
# Tests for sqlite3_stmt_busy
|
||||
#
|
||||
do_test capi3d-3.1 {
|
||||
|
||||
+10
-8
@@ -95,11 +95,11 @@ do_test corrupt2-1.4 {
|
||||
close $f
|
||||
|
||||
sqlite3 db2 corrupt.db
|
||||
# Note: This test is no longer meaningful due to the deferred computation
|
||||
# of MemPage.nFree
|
||||
catchsql {PRAGMA quick_check} db2
|
||||
} {0 {{*** in database main ***
|
||||
Page 1: free space corruption}}}
|
||||
catchsql "
|
||||
$::presql
|
||||
SELECT * FROM sqlite_master;
|
||||
" db2
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
do_test corrupt2-1.5 {
|
||||
db2 close
|
||||
@@ -118,9 +118,11 @@ do_test corrupt2-1.5 {
|
||||
close $f
|
||||
|
||||
sqlite3 db2 corrupt.db
|
||||
catchsql {PRAGMA quick_check} db2
|
||||
} {0 {{*** in database main ***
|
||||
Page 1: free space corruption}}}
|
||||
catchsql "
|
||||
$::presql
|
||||
SELECT * FROM sqlite_master;
|
||||
" db2
|
||||
} {1 {database disk image is malformed}}
|
||||
db2 close
|
||||
|
||||
# Corrupt a database by having 2 indices of the same name:
|
||||
|
||||
+2
-3
@@ -111,9 +111,8 @@ proc restore_file {} {
|
||||
do_test corruptD-1.1.1 {
|
||||
incr_change_counter
|
||||
hexio_write test.db [expr 1024+1] FFFF
|
||||
catchsql { PRAGMA quick_check }
|
||||
} {0 {{*** in database main ***
|
||||
Page 2: free space corruption}}}
|
||||
catchsql { SELECT * FROM t1 ORDER BY rowid }
|
||||
} {1 {database disk image is malformed}}
|
||||
do_test corruptD-1.1.2 {
|
||||
incr_change_counter
|
||||
hexio_write test.db [expr 1024+1] [hexio_render_int32 1021]
|
||||
|
||||
@@ -68,15 +68,9 @@ do_test 1.2 {
|
||||
do_execsql_test 1.3 {
|
||||
INSERT INTO t1 VALUES(randomblob(20));
|
||||
}
|
||||
|
||||
# This test no longer functions due to the deferred computation of
|
||||
# MemPage.nFree.
|
||||
#
|
||||
if 0 {
|
||||
do_catchsql_test 1.4 {
|
||||
INSERT INTO t1 VALUES(randomblob(90));
|
||||
} {1 {database disk image is malformed}}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
|
||||
+3
-119
@@ -123,20 +123,15 @@ do_test 1.0 {
|
||||
do_catchsql_test 1.1 {
|
||||
PRAGMA cell_size_check = off;
|
||||
DROP INDEX t1x1;
|
||||
} {1 {database disk image is malformed}}
|
||||
} {1 {no such index: t1x1}}
|
||||
|
||||
do_catchsql_test 1.2 {
|
||||
SELECT sum(s+length(b)) FROM t1 WHERE a IN (110,10,150) AND q IS NULL;
|
||||
} {1 {database disk image is malformed}}
|
||||
} {1 {no such table: t1}}
|
||||
|
||||
do_catchsql_test 1.3 {
|
||||
REINDEX t1;
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
do_catchsql_test 1.4 {
|
||||
PRAGMA integrity_check
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
} {1 {unable to identify the object to be reindexed}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
@@ -727,115 +722,4 @@ do_catchsql_test 7.1 {
|
||||
SELECT * FROM sqlite_master;
|
||||
} {1 {malformed database schema (t1x1) - invalid rootpage}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_test 8.0 {
|
||||
sqlite3 db {}
|
||||
db deserialize [decode_hexdb {
|
||||
| size 2048 pagesize 512 filename a.db
|
||||
| page 1 offset 0
|
||||
| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
|
||||
| 16: 02 00 01 01 00 40 20 20 ff ff 00 0c 00 00 00 07 .....@ ........
|
||||
| 32: 0b 00 00 00 00 00 00 00 00 00 00 08 9c 00 00 04 ................
|
||||
| 48: 00 00 00 e0 09 00 00 01 00 00 00 01 00 00 00 00 ................
|
||||
| 64: 00 00 00 00 f2 ff 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c ................
|
||||
| 96: 00 2e 2c 50 0d 00 00 00 06 01 06 00 01 da 01 b0 ..,P............
|
||||
| 112: 05 56 01 86 01 2a 01 06 00 00 00 00 00 06 00 00 .V...*..........
|
||||
| 128: 00 ff 00 00 ff ff ff e1 00 00 00 00 00 00 00 00 ................
|
||||
| 144: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 ................
|
||||
| 160: 00 00 00 00 00 00 00 00 f2 00 00 00 00 00 00 00 ................
|
||||
| 176: 00 00 f9 ff ff ff ff ff ff ff 00 00 00 5f 00 fb ............._..
|
||||
| 192: 00 00 00 00 00 00 00 00 00 e1 ff 00 00 00 00 00 ................
|
||||
| 208: 00 00 10 00 00 00 00 00 1e 00 00 00 fe 00 00 00 ................
|
||||
| 224: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ca 00 ................
|
||||
| 240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 35 ...............5
|
||||
| 256: 00 00 00 00 ef ff 22 07 06 17 11 11 01 30 39 38 .............098
|
||||
| 272: 62 6c 65 74 38 38 74 04 43 52 45 41 54 45 20 54 blet88t.CREATE T
|
||||
| 288: 41 42 4c 45 20 74 34 28 87 29 2a 06 06 17 13 11 ABLE t4(.)*.....
|
||||
| 304: 01 3f 69 4f 64 65 78 74 33 78 74 40 05 43 52 45 .?iOdext3xt@.CRE
|
||||
| 320: 41 54 45 20 49 6e 44 45 58 20 74 33 78 20 4f 4e ATE InDEX t3x ON
|
||||
| 336: 20 74 33 28 78 29 2e 04 06 17 15 11 01 45 69 6e t3(x).......Ein
|
||||
| 352: 00 04 00 00 34 63 64 74 3d 05 43 52 45 41 54 45 ....4cdt=.CREATE
|
||||
| 368: 20 49 4e 44 45 58 20 63 74 64 32 20 4f 4e 20 74 INDEX ctd2 ON t
|
||||
| 384: 32 28 0a 0c 44 29 28 05 06 17 11 11 01 3d 74 6c 2(..D)(......=tl
|
||||
| 400: 62 61 d4 65 33 74 33 04 43 52 45 41 54 45 20 54 ba.e3t3.CREATE T
|
||||
| 416: 41 42 4c 45 20 74 33 28 63 2c 78 2c 65 2c 66 29 ABLE t3(c,x,e,f)
|
||||
| 432: 28 02 06 17 11 11 01 3d 74 61 62 6c 65 74 32 74 (......=tablet2t
|
||||
| 448: 32 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 2.CREATE TABLE t
|
||||
| 464: 32 28 63 2c 64 2c 65 2c 66 29 24 01 06 17 11 11 2(c,d,e,f)$.....
|
||||
| 480: 01 35 74 60 62 6c 65 74 31 74 31 02 43 52 45 41 .5t`blet1t1.CREA
|
||||
| 496: 54 45 20 54 41 42 4c 45 20 74 30 28 61 2c 62 29 TE TABLE t0(a,b)
|
||||
| page 2 offset 512
|
||||
| 0: 0d 00 ff 11 04 01 cf 80 01 fa 01 09 00 de 01 cf ................
|
||||
| 16: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 ................
|
||||
| 32: 00 00 08 00 00 00 00 00 00 11 00 00 00 00 00 13 ................
|
||||
| 48: 00 00 00 00 00 00 00 00 00 00 00 01 00 e0 ff ff ................
|
||||
| 64: ff d2 ff ff ff 00 f8 ff ff ff 00 00 00 00 00 00 ................
|
||||
| 80: 00 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| 96: 00 00 00 00 ff de 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| 112: 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 .............@..
|
||||
| 128: 2a 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 *...............
|
||||
| 144: 00 00 00 00 00 21 00 00 00 00 00 00 00 00 00 00 .....!..........
|
||||
| 160: 01 64 00 00 00 00 04 80 ff ff ff 00 00 00 00 00 .d..............
|
||||
| 176: 00 00 00 00 00 00 00 00 1f 00 00 00 00 00 00 00 ................
|
||||
| 192: 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 ..@.............
|
||||
| 208: b5 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 .......@........
|
||||
| 224: 00 00 00 f6 00 ee ff ff ff 00 00 00 00 00 00 00 ................
|
||||
| 272: f2 00 00 00 00 00 00 00 00 00 f9 ff ff ff ff ff ................
|
||||
| 288: ff ff 00 00 00 5f 00 fb 00 00 00 00 00 00 00 00 ....._..........
|
||||
| 320: 1e 00 00 00 fe 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| 336: 00 00 00 00 00 00 ca 00 00 00 00 00 00 00 ff ec ................
|
||||
| 352: 00 00 00 00 00 00 00 32 00 00 00 00 ef ff 22 07 .......2........
|
||||
| 368: 06 17 11 11 01 30 74 61 62 6c 65 74 38 38 74 04 .....0tablet88t.
|
||||
| 384: 43 52 45 41 54 45 20 54 41 42 4c 45 20 8c cb d7 CREATE TABLE ...
|
||||
| 400: 78 d6 d5 f9 f9 17 13 11 01 3f 69 4f 64 65 78 74 x........?iOdext
|
||||
| 416: 33 78 74 33 05 43 52 45 41 54 45 26 49 6e 44 45 3xt3.CREATE&InDE
|
||||
| 432: 58 20 74 33 78 00 00 00 00 00 00 00 00 00 00 00 X t3x...........
|
||||
| 464: 00 00 00 00 00 13 76 65 6e 65 69 67 68 74 13 03 ......veneight..
|
||||
| 480: 03 40 07 07 15 00 54 45 20 49 4e 44 45 58 20 74 .@....TE INDEX t
|
||||
| 496: 31 63 64 20 4f 4e 20 74 ce d7 f5 f0 44 09 01 02 1cd ON t....D...
|
||||
| page 3 offset 1024
|
||||
| 0: 0d 00 00 00 48 01 54 00 01 f6 e2 ec 01 c5 01 aa ....H.T.........
|
||||
| 16: 30 34 28 87 29 32 06 f5 16 13 11 01 8e 61 24 64 04(.)2.......a$d
|
||||
| 32: 65 78 74 37 78 1f 33 6d 6d 6d 6d 6d 00 00 04 06 ext7x.3mmmmm....
|
||||
| 48: 6d 41 6d 6d 6e 6d 6d 00 00 02 00 6d 6d 6d 6d 6d mAmmnmm....mmmmm
|
||||
| 64: 15 11 01 45 45 45 45 45 45 45 45 45 45 45 45 45 ...EEEEEEEEEEEEE
|
||||
| 80: 45 45 45 45 45 45 45 45 45 45 45 00 45 63 74 64 EEEEEEEEEEE.Ectd
|
||||
| 96: 34 20 4f 4e 20 61 62 6c 5d 74 38 38 74 04 43 52 4 ON abl]t88t.CR
|
||||
| 112: 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 87 29 EATE TABLE t4(.)
|
||||
| 128: 2a 06 06 13 13 01 00 00 00 4f 64 6e 78 74 33 44 *........Odnxt3D
|
||||
| 144: 74 13 05 43 52 45 41 54 45 20 49 6e 44 45 00 00 t..CREATE InDE..
|
||||
| 160: 00 00 00 00 00 00 00 f9 ff ff ff ff ff ff ff 00 ................
|
||||
| 176: 00 00 5f 00 fb 00 00 2d 00 00 00 00 00 00 00 00 .._....-........
|
||||
| 192: 00 00 00 00 00 00 00 00 00 00 00 00 00 1e 00 00 ................
|
||||
| 208: 00 fe 00 00 00 00 17 15 11 01 45 69 6e 64 65 2e ..........Einde.
|
||||
| 224: 5b 38 63 64 74 3d 05 43 52 45 41 54 45 20 49 4e [8cdt=.CREATE IN
|
||||
| 240: 44 45 58 20 63 20 64 32 20 4f 4e 20 74 32 28 0a DEX c d2 ON t2(.
|
||||
| 256: 0c 44 32 05 00 10 00 00 11 11 3d 74 6c 62 61 d4 .D2.......=tlba.
|
||||
| 272: 65 33 74 33 04 43 52 45 41 54 45 20 54 41 42 4c e3t3.CREATE TABL
|
||||
| 288: 45 20 74 36 ff ff 7f ff 43 52 45 41 54 45 20 49 E t6....CREATE I
|
||||
| 304: 73 71 6c 69 74 65 5f 73 65 71 75 65 6e 63 65 28 sqlite_sequence(
|
||||
| 320: 0a 0c 44 29 28 05 06 17 11 11 01 3d 74 6c 62 61 ..D)(......=tlba
|
||||
| 336: 20 00 00 00 33 04 43 52 45 41 54 45 20 54 41 42 ...3.CREATE TAB
|
||||
| 352: 4c 45 20 74 33 28 63 2c 78 2c 65 2c 66 29 28 02 LE t3(c,x,e,f)(.
|
||||
| 368: 06 00 00 7f ff 40 41 54 45 20 49 6e 44 45 58 20 .....@ATE InDEX
|
||||
| 384: 74 33 78 20 4f 4e 20 74 31 28 78 29 2e 04 06 17 t3x ON t1(x)....
|
||||
| 400: 15 11 01 45 69 6e 64 65 2e 74 34 63 64 74 3d 05 ...Einde.t4cdt=.
|
||||
| 416: 00 00 00 00 00 00 00 00 00 00 00 4d 00 00 00 00 ...........M....
|
||||
| 432: 01 00 00 00 00 00 00 05 00 00 10 00 00 00 00 00 ................
|
||||
| 448: 00 01 00 00 00 00 01 00 00 00 00 07 40 14 00 00 ............@...
|
||||
| 464: 00 00 21 00 40 18 00 00 00 00 00 00 40 1c 00 00 ..!.@.......@...
|
||||
| 480: 00 00 ff ff ff 00 00 00 5f 00 fb 00 00 2d 00 00 ........_....-..
|
||||
| 496: 00 00 00 1e 00 00 00 fe 00 00 64 00 00 ff fb 02 ..........d.....
|
||||
| page 4 offset 1536
|
||||
| 0: 0d 00 39 00 00 02 00 00 00 00 00 00 00 00 00 00 ..9.............
|
||||
| end a.db
|
||||
}]} {}
|
||||
|
||||
|
||||
do_catchsql_test 8.1 {
|
||||
INSERT INTO t3 SELECT * FROM t2;
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -43,10 +43,8 @@
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <stdint.h>
|
||||
#ifndef _WIN32
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include "sqlite3.h"
|
||||
|
||||
/*
|
||||
@@ -74,10 +72,6 @@ static int bVdbeDebug = 0;
|
||||
/* Maximum size of the in-memory database file */
|
||||
static sqlite3_int64 szMax = 104857600;
|
||||
|
||||
/* Progress handler callback data */
|
||||
static int nCb = 0; /* Number of callbacks seen so far */
|
||||
static int mxCb = 250000; /* Maximum allowed callbacks */
|
||||
|
||||
/***** Copy/paste from ext/misc/memtrace.c ***************************/
|
||||
/* The original memory allocation routines */
|
||||
static sqlite3_mem_methods memtraceBase;
|
||||
@@ -161,21 +155,6 @@ int sqlite3MemTraceDeactivate(void){
|
||||
}
|
||||
/***** End copy/paste from ext/misc/memtrace.c ***************************/
|
||||
|
||||
/*
|
||||
** Progress handler callback
|
||||
**
|
||||
** Count the number of callbacks and cause an abort once the limit is
|
||||
** reached.
|
||||
*/
|
||||
static int progress_handler(void *pNotUsed){
|
||||
nCb++;
|
||||
if( nCb<mxCb ) return 0;
|
||||
if( eVerbosity>=1 ){
|
||||
printf("-- Progress limit of %d reached\n", mxCb);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* libFuzzer invokes this routine with fuzzed database files (in aData).
|
||||
** This routine run SQLite against the malformed database to see if it
|
||||
** can provoke a failure or malfunction.
|
||||
@@ -202,22 +181,16 @@ int LLVMFuzzerTestOneInput(const uint8_t *aData, size_t nByte){
|
||||
SQLITE_DESERIALIZE_RESIZEABLE |
|
||||
SQLITE_DESERIALIZE_FREEONCLOSE);
|
||||
x = szMax;
|
||||
#ifdef SQLITE_FCNTL_SIZE_LIMIT
|
||||
sqlite3_file_control(db, "main", SQLITE_FCNTL_SIZE_LIMIT, &x);
|
||||
#endif
|
||||
if( bVdbeDebug ){
|
||||
sqlite3_exec(db, "PRAGMA vdbe_debug=ON", 0, 0, 0);
|
||||
}
|
||||
if( mxCb>0 ){
|
||||
sqlite3_progress_handler(db, 10, progress_handler, 0);
|
||||
}
|
||||
for(i=0; i<sizeof(azSql)/sizeof(azSql[0]); i++){
|
||||
if( eVerbosity>=1 ){
|
||||
printf("%s\n", azSql[i]);
|
||||
fflush(stdout);
|
||||
}
|
||||
zErr = 0;
|
||||
nCb = 0;
|
||||
rc = sqlite3_exec(db, azSql[i], 0, 0, &zErr);
|
||||
if( rc && eVerbosity>=1 ){
|
||||
printf("-- rc=%d zErr=%s\n", rc, zErr);
|
||||
@@ -272,14 +245,6 @@ int LLVMFuzzerInitialize(int *pArgc, char ***pArgv){
|
||||
bVdbeDebug = 1;
|
||||
continue;
|
||||
}
|
||||
if( strcmp(z,"limit")==0 ){
|
||||
if( i+1==argc ){
|
||||
fprintf(stderr, "missing argument to %s\n", argv[i]);
|
||||
exit(1);
|
||||
}
|
||||
mxCb = strtol(argv[++i], 0, 0);
|
||||
continue;
|
||||
}
|
||||
if( strcmp(z,"memtrace")==0 ){
|
||||
sqlite3MemTraceActivate(stdout);
|
||||
continue;
|
||||
@@ -296,7 +261,6 @@ int LLVMFuzzerInitialize(int *pArgc, char ***pArgv){
|
||||
szMax = strtol(argv[++i], 0, 0);
|
||||
continue;
|
||||
}
|
||||
#ifndef _WIN32
|
||||
if( strcmp(z,"max-stack")==0
|
||||
|| strcmp(z,"max-data")==0
|
||||
|| strcmp(z,"max-as")==0
|
||||
@@ -327,7 +291,6 @@ int LLVMFuzzerInitialize(int *pArgc, char ***pArgv){
|
||||
zType, (int)x.rlim_cur, (int)y.rlim_cur);
|
||||
continue;
|
||||
}
|
||||
#endif /* _WIN32 */
|
||||
}
|
||||
argv[j++] = argv[i];
|
||||
}
|
||||
|
||||
@@ -107,7 +107,6 @@ do_test fts3atoken-2.1 {
|
||||
# simple input string via the built-in test function. This is as much
|
||||
# to test the test function as the tokenizer implementations.
|
||||
#
|
||||
sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1
|
||||
do_test fts3atoken-3.1 {
|
||||
execsql {
|
||||
SELECT fts3_tokenizer_test('simple', 'I don''t see how');
|
||||
|
||||
+1
-864
@@ -2586,6 +2586,7 @@ do_test 17.0 {
|
||||
| end crash-f15972acf5bc1c.db
|
||||
}]} {}
|
||||
|
||||
breakpoint
|
||||
do_execsql_test 17.1 {
|
||||
BEGIN;
|
||||
INSERT INTO t1(t1) SELECT x FROM t2;
|
||||
@@ -3051,869 +3052,5 @@ do_catchsql_test 19.1 {
|
||||
SELECT rowid,a,c,snippet(t1,85101090932165,-1,10) FROM t1 WHERE a MATCH 'rtree';
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_test 20.0 {
|
||||
sqlite3 db {}
|
||||
db deserialize [decode_hexdb {
|
||||
.open --hexdb
|
||||
| size 28672 pagesize 4096 filename crash-afecd03c862e58.db
|
||||
| page 1 offset 0
|
||||
| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
|
||||
| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 07 .....@ ........
|
||||
| 32: 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 04 ................
|
||||
| 96: 00 00 00 00 0d 0e ef 00 07 0d 4d 00 0f bd 0f 5f ..........M...._
|
||||
| 112: 0e f7 0e 06 0e bc 0d a4 0d 4d 00 00 01 00 00 00 .........M......
|
||||
| 3392: 00 00 00 00 00 00 00 00 00 00 00 00 00 55 07 07 .............U..
|
||||
| 3408: 17 1b 1b 01 81 01 74 61 62 6c 65 74 31 5f 73 74 ......tablet1_st
|
||||
| 3424: 61 74 74 31 5f 73 74 61 74 07 43 52 45 41 54 45 att1_stat.CREATE
|
||||
| 3440: 20 54 41 42 4c 45 20 27 74 31 5f 73 74 61 74 27 TABLE 't1_stat'
|
||||
| 3456: 28 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d (id INTEGER PRIM
|
||||
| 3472: 41 52 59 20 4b 45 59 2c 20 76 61 6c 75 65 20 42 ARY KEY, value B
|
||||
| 3488: 4c 4f 42 29 60 06 07 17 21 21 01 81 0b 74 61 62 LOB)`...!!...tab
|
||||
| 3504: 6c 65 74 31 5f 64 6f 63 73 69 7a 65 74 31 5f 64 let1_docsizet1_d
|
||||
| 3520: 6f 63 73 69 7a 65 06 43 52 45 41 54 45 20 54 41 ocsize.CREATE TA
|
||||
| 3536: 42 4c 45 20 27 74 31 5f 64 6f 63 73 69 7a 65 27 BLE 't1_docsize'
|
||||
| 3552: 28 64 6f 63 69 64 20 49 4e 54 45 47 45 52 20 50 (docid INTEGER P
|
||||
| 3568: 52 49 4d 41 52 59 30 4b 45 59 2c 20 73 69 7a 65 RIMARY0KEY, size
|
||||
| 3584: 20 42 4c 4f 42 29 81 33 04 07 17 1f 1f 01 82 35 BLOB).3.......5
|
||||
| 3600: 74 61 62 6c 65 74 31 5f 73 65 67 64 69 72 74 31 tablet1_segdirt1
|
||||
| 3616: 5f 73 65 67 64 69 25 04 43 52 45 41 54 45 20 54 _segdi%.CREATE T
|
||||
| 3632: 41 42 4c 45 20 27 74 31 5f 73 65 67 64 69 72 27 ABLE 't1_segdir'
|
||||
| 3648: 28 6c 65 76 65 6c 20 49 4e 54 45 47 45 52 2c 69 (level INTEGER,i
|
||||
| 3664: 64 78 20 49 4e 54 45 47 45 52 2c 73 74 61 72 74 dx INTEGER,start
|
||||
| 3680: 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 2c 6c _block INTEGER,l
|
||||
| 3696: 65 61 76 65 73 5f 65 6e 64 5f 62 6c 6f 63 6b 20 eaves_end_block
|
||||
| 3712: 49 4d 54 45 47 45 52 2c 65 6e 64 5f 62 6c 6f 63 IMTEGER,end_bloc
|
||||
| 3728: 6b 20 49 4e 54 45 47 45 52 2c 72 6f 6f 74 20 42 k INTEGER,root B
|
||||
| 3744: 4c 4f 42 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 LOB,PRIMARY KEY(
|
||||
| 3760: 6c 65 76 65 6c 2c 20 69 64 78 29 29 31 05 06 17 level, idx))1...
|
||||
| 3776: 45 1f 01 00 69 6e 64 65 78 73 71 6c 69 74 65 5f E...indexsqlite_
|
||||
| 3792: 61 75 74 6f 69 6e 64 65 78 5f 74 31 5f 73 65 67 autoindex_t1_seg
|
||||
| 3808: 64 69 72 5f 31 74 31 5f 73 65 67 64 69 72 05 00 dir_1t1_segdir..
|
||||
| 3824: 00 00 08 00 00 00 00 66 03 07 17 23 23 01 81 13 .......f...##...
|
||||
| 3840: 74 61 62 6c 65 74 31 5f 73 65 67 6d 65 6e 74 73 tablet1_segments
|
||||
| 3856: 74 31 5f 73 65 67 6d 65 6e 74 73 03 43 52 45 41 t1_segments.CREA
|
||||
| 3872: 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 TE TABLE 't1_seg
|
||||
| 3888: 6d 65 6e 74 73 27 28 62 6c 6f 63 6b 69 64 20 49 ments'(blockid I
|
||||
| 3904: 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b NTEGER PRIMARY K
|
||||
| 3920: 45 59 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 5c EY, block BLOB).
|
||||
| 3936: 02 07 17 21 21 01 81 03 74 61 62 6c 65 74 31 5f ...!!...tablet1_
|
||||
| 3952: 63 6f 6e 74 65 6e 74 74 31 5f 63 6f 6e 74 65 6e contentt1_conten
|
||||
| 3968: 74 02 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 t.CREATE TABLE '
|
||||
| 3984: 74 31 5f 63 6f 6e 74 65 6e 74 27 28 64 6f 63 69 t1_content'(doci
|
||||
| 4000: 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 d INTEGER PRIMAR
|
||||
| 4016: 59 20 4b 45 59 2c 20 27 63 30 61 27 29 41 01 06 Y KEY, 'c0a')A..
|
||||
| 4032: 17 11 11 08 71 74 61 62 6c 65 74 31 74 31 43 52 ....qtablet1t1CR
|
||||
| 4048: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
|
||||
| 4064: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 34 LE t1 USING fts4
|
||||
| 4080: 28 61 2c 70 72 65 66 69 78 3d 27 31 2c 32 27 29 (a,prefix='1,2')
|
||||
| page 2 offset 4096
|
||||
| 0: 0d 00 00 00 08 0e 1f 00 0f c4 0f 7c 0f 34 0f 07 ...........|.4..
|
||||
| 16: 0e c3 0e 97 0e 63 0e 1f 00 00 00 00 00 00 00 00 .....c..........
|
||||
| 3600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 42 ...............B
|
||||
| 3616: 08 04 00 81 09 73 75 6e 74 20 69 6e 20 63 75 6c .....sunt in cul
|
||||
| 3632: 70 61 20 71 75 68 20 6f 66 66 69 63 69 61 20 64 pa quh officia d
|
||||
| 3648: 65 73 65 72 75 6e 74 20 6d 6f 6c 6c 69 74 20 61 eserunt mollit a
|
||||
| 3664: 6e 69 6d 20 69 64 20 65 73 74 20 6c 61 62 6f 72 nim id est labor
|
||||
| 3680: 75 6d 2e 32 07 03 01 6b 45 78 63 65 70 74 65 75 um.2...kExcepteu
|
||||
| 3696: 72 20 73 69 6e 74 20 6f 63 63 61 65 63 61 74 20 r sint occaecat
|
||||
| 3712: 63 75 70 69 64 61 74 61 74 20 6e 6f 6e 20 70 72 cupidatat non pr
|
||||
| 3728: 6f 69 64 65 6e 74 2c 2a 06 03 00 5b 63 69 6c 6c oident,*...[cill
|
||||
| 3744: 75 6d 20 64 6f 6c 6f 72 65 20 65 75 20 66 75 67 um dolore eu fug
|
||||
| 3760: 69 61 74 20 6e 75 6c 6c 61 20 70 61 72 69 61 74 iat nulla pariat
|
||||
| 3776: 75 72 2e 43 05 04 00 81 09 44 75 69 73 20 61 75 ur.C.....Duis au
|
||||
| 3792: 74 65 20 69 72 75 72 65 20 64 6f 6c 6f 72 20 69 te irure dolor i
|
||||
| 3808: 6e 20 72 65 70 72 65 68 65 6e 64 65 72 69 74 20 n reprehenderit
|
||||
| 3824: 69 6e 20 76 6f 6c 75 70 74 61 74 65 20 76 65 6c in voluptate vel
|
||||
| 3840: 69 74 20 65 73 73 65 2b 14 03 00 5d 6e 69 73 69 it esse+...]nisi
|
||||
| 3856: 20 75 74 20 61 6c 69 71 75 69 70 20 65 78 20 65 ut aliquip ex e
|
||||
| 3872: 61 20 63 6f 6d 6d 6f 64 6f 20 63 6f 6e 73 65 71 a commodo conseq
|
||||
| 3888: 75 61 74 2e 46 03 04 00 81 11 55 74 20 65 6e 69 uat.F.....Ut eni
|
||||
| 3904: 6d 20 61 63 20 6d 69 6e 69 6d 20 76 65 6e 69 61 m ac minim venia
|
||||
| 3920: 6d 2c 20 71 75 69 73 20 6e 6f 73 74 72 75 64 20 m, quis nostrud
|
||||
| 3936: 65 78 65 72 63 69 74 61 74 69 6f 6e 20 75 6c 6c exercitation ull
|
||||
| 3952: 61 6d 63 6f 20 6c 61 62 6f 72 69 73 46 02 04 00 amco laborisF...
|
||||
| 3968: 81 11 73 65 64 20 64 6f 20 65 69 75 73 6d 6f 64 ..sed do eiusmod
|
||||
| 3984: 20 74 65 6d 70 6f 72 20 69 6e 63 69 64 69 64 75 tempor incididu
|
||||
| 4000: 6e 74 20 75 74 20 6c 61 62 6f 72 65 20 65 74 20 nt ut labore et
|
||||
| 4016: 64 6f 6c 6f 72 65 20 6d 61 67 6e 61 20 61 6c 69 dolore magna ali
|
||||
| 4032: 71 75 61 2e 3a 01 03 00 7b 4c 6f 72 65 6d 20 69 qua.:....Lorem i
|
||||
| 4048: 70 73 75 6d 20 64 6f 6c 6f 72 20 73 69 74 20 61 psum dolor sit a
|
||||
| 4064: 6d 65 74 2c 20 63 6f 6e 73 65 63 74 65 74 75 72 met, consectetur
|
||||
| 4080: 20 61 64 69 70 69 73 63 69 6e 67 20 65 6c 69 74 adipiscing elit
|
||||
| page 3 offset 8192
|
||||
| 0: 0d 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| page 4 offset 12288
|
||||
| 0: 0d 00 00 00 03 0a a6 00 0d 57 0c 4a 0a a6 00 00 .........W.J....
|
||||
| 2720: 00 00 00 00 00 00 83 21 03 08 02 08 08 08 17 86 .......!........
|
||||
| 2736: 30 08 00 30 20 34 30 32 00 02 61 64 06 01 08 00 0..0 402..ad....
|
||||
| 2752: 02 04 00 01 01 6c 06 02 0c 00 02 04 00 01 01 6d .....l.........m
|
||||
| 2768: 03 01 06 00 01 01 6e 03 08 09 00 01 01 75 03 05 ......n......u..
|
||||
| 2784: 03 00 00 02 63 69 03 06 01 00 01 01 6f 07 01 07 ....ci......o...
|
||||
| 2800: 00 03 07 03 00 01 01 75 06 07 05 00 01 04 00 00 .......u........
|
||||
| 2816: 02 64 65 03 08 07 00 01 01 6f 0d 01 04 00 01 03 .de......o......
|
||||
| 2832: 09 00 03 05 00 01 03 00 01 01 75 03 05 02 00 00 ..........u.....
|
||||
| 2848: 02 65 61 03 04 06 00 01 01 69 03 02 04 00 01 01 .ea......i......
|
||||
| 2864: 6c 03 01 09 00 01 01 6e 03 03 03 00 01 01 73 06 l......n......s.
|
||||
| 2880: 05 0b 00 03 0b 00 01 01 74 03 02 09 00 01 01 75 ........t......u
|
||||
| 2896: 03 06 04 00 01 01 78 09 03 09 00 01 05 00 03 02 ......x.........
|
||||
| 2912: 00 00 02 66 75 03 06 05 00 00 02 69 64 03 08 0a ...fu......id...
|
||||
| 2928: 00 01 01 6e 0a 02 06 00 03 06 04 00 03 03 00 01 ...n............
|
||||
| 2944: 01 70 03 01 13 00 01 01 72 03 05 04 00 00 02 6c .p......r......l
|
||||
| 2960: 61 09 02 08 00 01 0b 00 05 0c 00 01 01 6f 03 01 a............o..
|
||||
| 2976: 02 00 00 02 6d 61 03 02 0b 00 01 01 69 03 03 05 ....ma......i...
|
||||
| 2992: 00 01 01 6f 03 08 08 00 00 02 6e 69 03 04 02 00 ...o......ni....
|
||||
| 3008: 01 01 6f 06 03 08 00 04 06 00 01 01 75 03 06 06 ..o.........u...
|
||||
| 3024: 00 00 02 6f 63 03 07 04 00 01 01 66 03 08 06 00 ...oc......f....
|
||||
| 3040: 00 02 70 61 03 06 07 00 01 01 72 03 07 07 00 00 ..pa......r.....
|
||||
| 3056: 02 71 75 06 03 07 00 05 05 00 00 02 72 65 03 05 .qu.........re..
|
||||
| 3072: 07 00 00 02 73 65 03 02 02 00 01 01 69 06 01 05 ....se......i...
|
||||
| 3088: 00 06 03 00 01 01 75 03 08 02 00 00 02 74 65 03 ......u......te.
|
||||
| 3104: 03 05 00 00 02 72 bc 03 03 0a 00 01 01 74 09 02 .....r.......t..
|
||||
| 3120: 07 00 01 02 00 01 03 00 00 02 76 65 06 03 06 00 ..........ve....
|
||||
| 3136: 02 0a 00 01 01 6f 03 05 09 00 82 0a 02 08 02 08 .....o..........
|
||||
| 3152: 08 08 17 84 02 04 00 30 20 32 35 31 00 01 61 13 .......0 251..a.
|
||||
| 3168: 01 06 04 00 01 0c 00 01 04 00 01 04 00 01 03 00 ................
|
||||
| 3184: 03 09 00 00 01 63 10 01 07 00 03 07 03 00 02 02 .....c..........
|
||||
| 3200: 00 01 05 00 01 04 00 00 01 64 11 01 04 00 01 03 .........d......
|
||||
| 3216: 09 00 03 02 05 00 01 03 00 02 07 00 00 01 65 1b ..............e.
|
||||
| 3232: 01 09 00 01 04 07 00 01 03 08 00 01 05 03 00 01 ................
|
||||
| 3248: 0b 00 01 04 00 01 02 00 01 0b 00 00 01 66 03 06 .............f..
|
||||
| 3264: 05 00 00 01 69 0f 01 03 00 01 06 00 02 04 04 04 ....i...........
|
||||
| 3280: 00 03 03 09 00 00 01 6c 0c 01 02 00 01 08 00 01 .......l........
|
||||
| 3296: 0b 00 05 0c 00 00 01 6d 09 02 0b 00 01 05 00 05 .......m........
|
||||
| 3312: 08 00 00 01 6e 0c 03 08 00 01 02 00 02 06 00 01 ....n...........
|
||||
| 3328: 06 00 f0 01 6f 06 07 04 00 01 06 00 00 01 70 06 ....o.........p.
|
||||
| 3344: 06 07 00 01 07 00 00 01 71 06 03 07 00 05 05 00 ........q.......
|
||||
| 3360: 00 01 72 03 05 08 00 00 01 73 0c 01 05 00 01 02 ..r......s......
|
||||
| 3376: 00 05 03 00 01 02 00 00 01 74 03 02 05 00 00 01 .........t......
|
||||
| 3392: 75 0a 02 07 00 01 02 0a 00 01 03 00 00 01 76 07 u.............v.
|
||||
| 3408: 03 06 00 02 09 03 00 85 26 01 08 08 08 08 08 17 ........&.......
|
||||
| 3424: 8a 3e 30 21 36 36 35 00 02 61 64 03 03 04 00 02 .>0!665..ad.....
|
||||
| 3440: 08 69 70 69 73 63 69 6e 67 03 01 08 00 01 05 6c .ipiscing......l
|
||||
| 3456: 69 71 75 61 03 02 0c 00 05 02 69 70 03 04 04 00 iqua......ip....
|
||||
| 3472: 01 03 6d 65 74 03 01 06 00 01 03 6e 69 6d 03 08 ..met......nim..
|
||||
| 3488: 09 00 01 03 75 74 65 03 05 03 00 00 06 63 69 6c ....ute......cil
|
||||
| 3504: 6c 75 6d 03 06 02 00 01 06 6f 6d 6d 6f 64 6f 03 lum......ommodo.
|
||||
| 3520: 04 07 00 02 09 6e 73 65 63 74 65 74 75 72 03 01 .....nsectetur..
|
||||
| 3536: 07 00 05 04 71 75 61 74 03 04 08 00 01 04 75 6c ....quat......ul
|
||||
| 3552: 70 61 03 08 04 00 02 07 70 69 64 61 74 61 74 03 pa......pidatat.
|
||||
| 3568: 07 05 00 00 08 64 65 73 65 72 75 6e 74 03 08 07 .....deserunt...
|
||||
| 3584: 00 01 01 6f 03 02 03 00 02 03 6c 6f 72 06 01 04 ...o......lor...
|
||||
| 3600: 00 04 05 00 05 01 65 06 02 0a 00 04 03 00 01 03 ......e.........
|
||||
| 3616: 75 69 73 03 05 02 00 00 02 65 61 03 04 06 00 01 uis......ea.....
|
||||
| 3632: 06 69 75 73 6d 6f 64 03 02 04 00 01 03 6c 69 74 .iusmod......lit
|
||||
| 3648: 03 01 09 00 01 03 6e 69 6d 03 03 03 00 01 03 73 ......nim......s
|
||||
| 3664: 73 65 03 05 0b 00 02 01 74 03 08 0b 00 01 01 74 se......t......t
|
||||
| 3680: 03 02 09 00 01 01 75 03 06 04 00 01 01 78 03 04 ......u......x..
|
||||
| 3696: 05 00 02 07 63 65 70 74 65 75 72 03 07 02 00 02 ....cepteur.....
|
||||
| 3712: 0a 65 72 63 69 74 61 74 69 6f 6e 03 03 09 00 00 .ercitation.....
|
||||
| 3728: 06 66 75 67 69 61 74 03 06 05 00 00 02 69 64 03 .fugiat......id.
|
||||
| 3744: 08 0a 00 01 01 6e 07 05 06 04 00 03 03 00 02 08 .....n..........
|
||||
| 3760: 63 69 64 69 64 75 6e 74 03 02 06 00 01 04 70 73 cididunt......ps
|
||||
| 3776: 75 6d 03 01 03 00 01 04 72 75 72 65 03 05 04 00 um......rure....
|
||||
| 3792: 00 06 6c 61 62 6f 72 65 03 02 08 00 05 02 69 73 ..labore......is
|
||||
| 3808: 03 03 0b 00 05 02 75 6d 03 08 0c 00 01 04 6f 72 ......um......or
|
||||
| 3824: 65 6d 03 01 02 00 00 05 6d 61 67 6e 61 03 02 0b em......magna...
|
||||
| 3840: 00 01 04 69 6e 69 6d 03 03 05 00 01 05 6f 6c 6c ...inim......oll
|
||||
| 3856: 69 74 03 08 08 00 00 04 6e 69 73 69 03 04 02 00 it......nisi....
|
||||
| 3872: 01 02 6f 6e 03 07 06 00 02 05 73 74 72 75 64 03 ..on......strud.
|
||||
| 3888: 03 08 00 01 04 75 6c 6c 61 03 06 06 00 00 08 6f .....ulla......o
|
||||
| 3904: 63 63 61 65 63 61 74 03 07 04 00 01 06 66 66 69 ccaecat......ffi
|
||||
| 3920: 63 69 61 03 08 06 00 00 08 70 61 72 69 61 74 75 cia......pariatu
|
||||
| 3936: 72 03 06 07 00 01 07 72 6f 69 64 65 6e 74 03 07 r......roident..
|
||||
| 3952: 07 00 00 03 71 75 69 03 08 05 00 03 01 73 03 03 ....qui......s..
|
||||
| 3968: 07 00 00 0d 72 65 41 72 65 68 65 6e 64 65 72 69 ....reArehenderi
|
||||
| 3984: 74 03 05 07 00 00 03 73 65 64 03 02 02 00 01 03 t......sed......
|
||||
| 4000: 69 6e 74 03 07 03 00 02 01 74 03 01 05 00 01 03 int......t......
|
||||
| 4016: 75 6e 74 03 08 02 00 00 06 74 65 6d 70 6f 72 03 unt......tempor.
|
||||
| 4032: 02 05 00 00 07 75 6c 6c 61 6d 63 6f 03 03 0a 00 .....ullamco....
|
||||
| 4048: 01 01 74 09 02 07 00 01 02 00 01 03 00 00 05 76 ..t............v
|
||||
| 4064: 65 6c 69 74 03 05 0a 00 02 04 6e 69 61 6d 03 03 elit......niam..
|
||||
| 4080: 06 00 01 08 70 6c 75 70 74 61 74 65 03 05 09 00 ....pluptate....
|
||||
| page 5 offset 16384
|
||||
| 0: 0a 00 00 00 03 0f eb 00 0f fb 0f f3 0f eb 00 00 ................
|
||||
| 4064: 00 00 00 00 00 00 00 00 00 00 00 07 04 02 08 01 ................
|
||||
| 4080: 08 00 03 07 04 0a 98 01 04 00 02 04 04 08 08 09 ................
|
||||
| page 6 offset 20480
|
||||
| 0: 0d 00 00 00 08 0f d0 00 0f fa 0f f4 0f ee 0f e8 ................
|
||||
| 16: 0f e2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| 4048: 04 08 03 00 0e 0b 04 07 03 00 0e 06 04 06 03 00 ................
|
||||
| 4064: 0e 06 04 05 03 00 0e 0a 04 04 03 00 0e 07 04 03 ................
|
||||
| 4080: 03 00 0e 0a 04 02 03 00 0e 0b 04 01 03 00 0e 08 ................
|
||||
| page 7 offset 24576
|
||||
| 0: 0d 00 00 00 01 0f f7 00 0f f7 00 00 00 00 00 00 ................
|
||||
| 4080: 00 00 00 00 00 00 00 07 00 03 00 14 08 45 b5 03 .............E..
|
||||
| end crash-afecd03c862e58.db
|
||||
}]} {}
|
||||
|
||||
do_execsql_test 20.1 {
|
||||
BEGIN;
|
||||
WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<10)
|
||||
INSERT INTO t1(a) SELECT randomblob(3000) FROM c;
|
||||
}
|
||||
|
||||
do_execsql_test 20.2 {
|
||||
INSERT INTO t1(t1) VALUES('optimize');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_test 21.0 {
|
||||
sqlite3 db {}
|
||||
db deserialize [decode_hexdb {
|
||||
| size 28672 pagesize 4096 filename crash-18cc014e42e828.db
|
||||
| page 1 offset 0
|
||||
| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
|
||||
| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 07 .....@ ........
|
||||
| 32: 00 00 00 02 00 00 00 01 00 00 00 07 00 00 00 04 ................
|
||||
| 96: 00 00 00 00 0d 0e b1 00 06 0d a4 00 0f 8d 0f 21 ...............!
|
||||
| 112: 0e b9 0d c8 0e 7e 0d a4 00 00 00 00 00 00 00 00 .....~..........
|
||||
| 3488: 00 00 00 00 22 07 06 17 11 11 01 31 74 61 62 6c ...........1tabl
|
||||
| 3504: 66 74 32 74 32 07 43 52 45 41 54 45 20 54 41 42 ft2t2.CREATE TAB
|
||||
| 3520: 4c 45 20 74 32 28 78 29 81 33 05 07 17 1f 1f 01 LE t2(x).3......
|
||||
| 3536: 82 35 74 61 62 6c 65 74 31 5f 73 75 67 64 69 72 .5tablet1_sugdir
|
||||
| 3552: 74 31 5f 73 65 67 64 69 72 05 43 52 45 41 54 45 t1_segdir.CREATE
|
||||
| 3568: 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 64 69 TABLE 't1_segdi
|
||||
| 3584: 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 45 52 r'(level INTEGER
|
||||
| 3600: 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 74 61 ,idx INTEGER,sta
|
||||
| 3616: 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 46 47 45 52 rt_block INTFGER
|
||||
| 3632: 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c 6f 63 ,leaves_end_bloc
|
||||
| 3648: 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f 62 6c k INTEGER,end_bl
|
||||
| 3664: 6f 63 6b 20 49 4e 54 45 47 45 62 2c 72 6f 6f 74 ock INTEGEb,root
|
||||
| 3680: 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 4b 45 BLOB,PRIMARY KE
|
||||
| 3696: 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 31 06 Y(level, idx))1.
|
||||
| 3712: 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 69 74 ..E...indexsqlit
|
||||
| 3728: 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 5f 73 e_autoindex_t1_s
|
||||
| 3744: 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 69 72 egdir_1t1_segdir
|
||||
| 3760: 06 0f c7 00 08 00 00 00 00 66 04 07 17 23 23 01 .........f...##.
|
||||
| 3776: 81 13 74 61 62 6c 65 74 31 5f 73 65 67 6d 65 6e ..tablet1_segmen
|
||||
| 3792: 74 73 74 31 5f 73 65 67 6d 65 6e 74 73 04 43 52 tst1_segments.CR
|
||||
| 3808: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
|
||||
| 3824: 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b 69 64 egments'(blockid
|
||||
| 3840: 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 INTEGER PRIMARY
|
||||
| 3856: 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 KEY, block BLOB
|
||||
| 3872: 29 6a 03 07 17 21 21 01 81 1f 74 61 62 6c 65 74 )j...!!...tablet
|
||||
| 3888: 31 5f 63 6f 6e 74 65 6e 74 74 31 5f 63 6f 6e 74 1_contentt1_cont
|
||||
| 3904: 65 6e 74 03 43 52 45 41 54 45 20 54 41 42 4c 45 ent.CREATE TABLE
|
||||
| 3920: 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 64 6f 't1_content'(do
|
||||
| 3936: 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d cid INTEGER PRIM
|
||||
| 3952: 41 52 59 20 4b 45 59 2c 20 27 63 30 61 27 2c 20 ARY KEY, 'c0a',
|
||||
| 3968: 27 63 31 62 27 2c 20 27 63 32 63 27 29 38 02 06 'c1b', 'c2c')8..
|
||||
| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
|
||||
| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
|
||||
| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 33 LE t1 USING fts3
|
||||
| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
|
||||
| page 3 offset 8192
|
||||
| 0: 0d 00 00 00 25 0b 48 00 0f d8 0f af 0f 86 0f 74 ....%.H........t
|
||||
| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
|
||||
| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
|
||||
| 48: 0d bb 0d a0 0d 84 0d 68 0d 4e 0d 35 0d 1b 0c fb .......h.N.5....
|
||||
| 64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 0c 24 00 00 .......x.W.>.$..
|
||||
| 2880: 00 00 00 00 00 00 00 00 81 3f 25 06 00 82 7f 00 .........?%.....
|
||||
| 2896: 00 43 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e .COMPILER=gcc-5.
|
||||
| 2912: 34 23 00 20 32 30 31 36 30 36 30 39 20 44 45 42 4#. 20160609 DEB
|
||||
| 2928: 55 47 20 45 4e 41 42 4c 45 20 44 42 53 54 41 54 UG ENABLE DBSTAT
|
||||
| 2944: 20 56 54 41 42 20 45 4e 41 42 4c 45 20 46 43 53 VTAB ENABLE FCS
|
||||
| 2960: 34 20 45 4e 41 42 4c 45 20 46 54 53 35 20 45 4e 4 ENABLE FTS5 EN
|
||||
| 2976: 41 42 4c 45 20 47 45 4f 50 4f 4c 59 20 45 4e 41 ABLE GEOPOLY ENA
|
||||
| 2992: 42 4c 45 20 4a 53 4f 4e 31 20 45 4e 41 42 4c 45 BLE JSON1 ENABLE
|
||||
| 3008: 20 4d 45 4d 53 59 53 35 20 45 4e 41 42 4c 45 20 MEMSYS5 ENABLE
|
||||
| 3024: 52 54 52 45 45 20 4d 41 58 20 4d 45 4d 4f 52 59 RTREE MAX MEMORY
|
||||
| 3040: 3d 35 30 30 30 30 30 30 30 20 4f 4d 49 54 20 4c =50000000 OMIT L
|
||||
| 3056: 4f 41 44 20 45 58 54 45 4e 53 49 4f 4e 20 54 48 OAD EXTENSION TH
|
||||
| 3072: 52 45 41 44 53 41 46 45 3d 30 18 24 05 00 25 0f READSAFE=0.$..%.
|
||||
| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
|
||||
| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
|
||||
| 3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22 DSAFE=0XNOCASE..
|
||||
| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 45 3d ..%..THREADSAFE=
|
||||
| 3152: 30 58 52 54 52 49 4d 20 21 05 00 33 0f 19 4f 4d 0XRTRIM !..3..OM
|
||||
| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f IT LOAD EXTENSIO
|
||||
| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
|
||||
| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
|
||||
| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
|
||||
| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
|
||||
| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
|
||||
| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
|
||||
| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
|
||||
| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
|
||||
| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
|
||||
| 3328: 0f 17 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MAX MEMORY=500
|
||||
| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
|
||||
| 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
|
||||
| 3376: 49 4e 41 52 59 18 1a 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
|
||||
| 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
|
||||
| 3408: 19 05 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
|
||||
| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
|
||||
| 3440: 4e 41 42 4c 45 20 4d 45 4d 53 59 53 35 58 42 49 NABLE MEMSYS5XBI
|
||||
| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
|
||||
| 3472: 45 20 4d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 E MEMSYS5XNOCASE
|
||||
| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 45 ....)..ENABLE ME
|
||||
| 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 15 05 00 25 MSYS5XRTRIM....%
|
||||
| 3520: 0f 19 45 4e 41 42 4c 45 20 4a 53 4f 4e 31 58 42 ..ENABLE JSON1XB
|
||||
| 3536: 49 4e 41 52 59 18 14 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
|
||||
| 3552: 4c 45 20 4a 53 4f 4e 31 58 4e 4f 43 41 53 45 17 LE JSON1XNOCASE.
|
||||
| 3568: 13 05 00 25 0f 17 45 4e 41 42 4c 45 20 4a 53 4f ...%..ENABLE JSO
|
||||
| 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 00 29 0f 19 45 N1XRTRIM....)..E
|
||||
| 3600: 4e 41 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 39 NABLE GEOPOLYXB9
|
||||
| 3616: 4e 41 52 59 1a 11 05 00 29 0f 19 45 4e 41 1e 4c NARY....)..ENA.L
|
||||
| 3632: 45 20 47 45 4f 50 4f 4c 59 58 4e 4f 43 41 53 45 E GEOPOLYXNOCASE
|
||||
| 3648: 19 10 05 00 29 0f 17 45 4e 41 42 4c 45 20 47 45 ....)..ENABLE GE
|
||||
| 3664: 4f 50 4f 4c 59 58 52 54 52 49 4d 17 0f 05 00 23 OPOLYXRTRIM....#
|
||||
| 3680: 0f 19 45 4e 41 42 4c 45 20 46 54 53 35 58 42 49 ..ENABLE FTS5XBI
|
||||
| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
|
||||
| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0d 05 E FTS5XNOCASE...
|
||||
| 3728: 00 23 0f 16 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
|
||||
| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
|
||||
| 3760: 4c 45 20 46 54 53 34 58 42 48 4e 41 52 59 17 0b LE FTS4XBHNARY..
|
||||
| 3776: 05 00 23 0e 19 45 4e 41 42 4c 45 20 46 54 53 35 ..#..ENABLE FTS5
|
||||
| 3792: 58 4e 4f 43 40 53 45 16 0a 05 00 23 0f 17 45 4e XNOC@SE....#..EN
|
||||
| 3808: 41 42 4c 45 20 46 54 53 34 58 52 2e 52 49 4d 1e ABLE FTS4XR.RIM.
|
||||
| 3824: 09 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
|
||||
| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
|
||||
| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
|
||||
| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 41 53 45 1d TAT VTABXNOCASE.
|
||||
| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
|
||||
| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 49 4d 11 06 TAT VTABXRTRIM..
|
||||
| 3920: 05 00 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
|
||||
| 3936: 59 11 05 05 00 17 0f 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
|
||||
| 3952: 43 41 53 45 10 04 05 00 17 0f 17 44 45 42 55 47 CASE.......DEBUG
|
||||
| 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
|
||||
| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
|
||||
| 4000: 32 30 31 36 30 36 30 39 58 42 49 da 41 52 59 27 20160609XBI.ARY'
|
||||
| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
|
||||
| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
|
||||
| 4048: 39 58 4e 4f 43 41 53 45 26 01 05 00 43 0f 17 43 9XNOCASE&...C..C
|
||||
| 4064: 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 00 00 00 00 OMPILER=gcc-....
|
||||
| page 5 offset 16384
|
||||
| 0: 0d 00 00 00 02 0b a0 00 0c ad 0b a0 00 00 00 00 ................
|
||||
| 2976: 82 0a 02 08 08 09 08 08 17 84 06 30 20 32 35 33 ...........0 253
|
||||
| 2992: 00 01 30 04 25 06 1b 00 00 08 32 30 31 36 30 36 ..0.%.....201606
|
||||
| 3008: 30 3a 03 25 07 00 00 01 34 03 25 05 00 00 01 35 0:.%....4.%....5
|
||||
| 3024: 03 25 04 00 01 07 30 30 30 30 30 30 30 03 25 1a .%....0000000.%.
|
||||
| 3040: 00 00 08 63 6f 6d 70 69 6c 65 72 03 25 02 00 00 ...compiler.%...
|
||||
| 3056: 06 64 62 73 74 61 74 03 25 0a 00 01 04 65 62 75 .dbstat.%....ebu
|
||||
| 3072: 67 03 25 08 00 00 06 65 6e 61 62 6c 65 09 25 09 g.%....enable.%.
|
||||
| 3088: 05 04 04 04 04 04 00 01 08 78 74 65 6e 73 69 6f .........xtensio
|
||||
| 3104: 6e 03 25 1d 00 00 04 66 74 73 34 03 25 0d 00 03 n.%....fts4.%...
|
||||
| 3120: 01 35 03 25 0f 00 00 03 57 63 63 03 25 03 00 01 .5.%....Wcc.%...
|
||||
| 3136: 06 65 6f 70 6f 6c 79 03 25 11 00 00 05 6a 73 6f .eopoly.%....jso
|
||||
| 3152: 6e 31 03 25 13 00 00 04 6c 6f 61 64 03 25 1c 00 n1.%....load.%..
|
||||
| 3168: 00 03 6d 61 78 03 25 18 00 01 05 65 6d 6f 72 79 ..max.%....emory
|
||||
| 3184: 03 25 19 00 03 04 73 79 73 35 03 25 15 00 00 04 .%....sys5.%....
|
||||
| 3200: 6f 6d 69 74 03 25 1b 00 00 05 72 74 72 65 65 03 omit.%....rtree.
|
||||
| 3216: 25 17 00 00 0a 74 68 72 65 64 64 73 61 66 65 03 %....threddsafe.
|
||||
| 3232: 25 1e 00 00 04 76 74 61 62 03 25 0b 00 86 50 01 %....vtab.%...P.
|
||||
| 3248: 08 08 08 08 08 17 8d 12 30 20 38 33 35 00 01 30 ........0 835..0
|
||||
| 3264: 12 01 06 00 01 06 00 01 06 00 1f 03 00 01 03 00 ................
|
||||
| 3280: 01 03 00 00 08 32 30 31 36 30 36 30 39 09 01 07 .....20160609...
|
||||
| 3296: 00 01 07 00 01 07 00 00 01 34 09 01 05 00 01 05 .........4......
|
||||
| 3312: 00 01 05 00 00 01 35 09 01 04 00 01 04 00 01 04 ......5.........
|
||||
| 3328: 00 01 07 30 30 30 30 30 30 30 09 1c 04 00 01 04 ...0000000......
|
||||
| 3344: 00 01 04 00 00 06 62 69 6e 61 72 79 3c 03 01 02 ......binary<...
|
||||
| 3360: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
|
||||
| 3376: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
|
||||
| 3392: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 ................
|
||||
| 3408: 01 02 02 00 03 01 02 02 00 00 08 63 6f 6d 70 69 ...........compi
|
||||
| 3424: 6c 65 72 09 01 02 00 01 02 00 01 02 00 00 06 64 ler............d
|
||||
| 3440: 62 73 74 61 74 09 07 03 00 01 03 00 01 03 00 01 bstat...........
|
||||
| 3456: 04 65 62 75 67 09 04 02 00 01 02 00 01 02 00 00 .ebug...........
|
||||
| 3472: 06 65 6e 61 62 6c 65 3f 07 02 00 01 02 00 01 12 .enable?........
|
||||
| 3488: 00 01 02 00 01 02 00 01 02 00 01 02 0e 97 02 00 ................
|
||||
| 3504: 01 02 00 01 cb 00 01 02 00 01 02 00 01 02 10 01 ................
|
||||
| 3520: 02 00 01 02 00 01 02 01 01 02 00 01 02 00 01 02 ................
|
||||
| 3536: 00 01 02 00 01 02 00 01 08 78 74 65 6e 73 69 6f .........xtensio
|
||||
| 3552: 6e 09 1f 04 00 01 04 00 01 04 00 00 04 66 74 73 n............fts
|
||||
| 3568: 34 09 0a 03 00 01 03 00 01 03 00 03 01 35 09 0d 4............5..
|
||||
| 3584: 03 00 01 03 00 01 03 00 00 03 67 63 63 09 01 03 ..........gcc...
|
||||
| 3600: 00 01 03 00 01 03 00 01 06 65 6f 70 6f 6c 79 09 .........eopoly.
|
||||
| 3616: 10 03 00 01 03 00 01 03 00 00 05 6a 73 6f 6e 31 ...........json1
|
||||
| 3632: 09 13 03 00 01 03 00 01 03 00 00 04 6c 6f 61 64 ............load
|
||||
| 3648: 09 1f 03 00 01 03 00 01 03 00 00 03 6d 61 78 09 ............max.
|
||||
| 3664: 1c 02 00 01 02 00 01 02 00 01 05 65 6d 6f 72 79 ...........emory
|
||||
| 3680: 09 1c 03 00 01 03 00 01 03 00 03 04 73 79 73 35 ............sys5
|
||||
| 3696: 09 16 03 00 01 03 00 01 03 00 00 06 6e 6f 63 61 ............noca
|
||||
| 3712: 73 65 3c 02 01 02 02 00 03 01 02 02 00 03 01 02 se<.............
|
||||
| 3728: 02 00 03 01 02 02 00 03 01 02 02 00 ab 01 02 02 ................
|
||||
| 3744: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
|
||||
| 3760: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 00 ................
|
||||
| 3776: 04 6f 6d 69 74 09 1f 12 00 01 02 00 01 02 00 00 .omit...........
|
||||
| 3792: 05 72 74 72 65 65 09 19 03 00 01 03 00 01 03 00 .rtree..........
|
||||
| 3808: 03 02 69 6d 3c 01 01 02 02 00 03 01 02 02 00 03 ..im<...........
|
||||
| 3824: 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 ................
|
||||
| 3840: 02 02 00 03 01 02 01 f0 03 01 02 02 00 03 01 02 ................
|
||||
| 3856: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
|
||||
| 3872: 00 00 0a 74 68 72 65 61 64 73 61 66 65 09 22 02 ...threadsafe...
|
||||
| 3888: 00 01 02 00 02 02 00 00 04 76 74 61 62 09 07 04 .........vtab...
|
||||
| 3904: 00 01 04 00 01 04 00 00 01 78 b4 01 01 01 08 a2 .........x......
|
||||
| 3920: 00 01 01 01 02 00 01 01 01 02 00 02 01 01 02 00 ................
|
||||
| 3936: 01 01 01 01 ff f1 01 01 02 00 01 01 01 02 00 01 ................
|
||||
| 3952: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
|
||||
| 3968: 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 ................
|
||||
| 3984: 02 00 01 01 01 02 00 01 01 01 02 01 01 01 01 02 ................
|
||||
| 4000: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
|
||||
| 4016: 01 01 01 02 00 01 01 01 02 00 01 01 01 03 00 01 ................
|
||||
| 4032: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
|
||||
| 4048: 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 ................
|
||||
| 4064: 02 00 01 01 01 02 00 01 02 01 02 00 01 01 01 02 ................
|
||||
| 4080: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
|
||||
| page 6 offset 20480
|
||||
| 0: 0a 00 00 00 02 0f f5 00 0f fb 0f f5 00 00 00 00 ................
|
||||
| 4080: 00 00 00 00 00 05 04 08 09 01 02 04 04 08 08 09 ................
|
||||
| page 7 offset 24576
|
||||
| 0: 0d 00 00 00 05 0f b8 00 00 00 00 00 00 00 00 00 ................
|
||||
| 4016: 00 00 00 00 00 00 00 00 0d 05 02 23 61 75 74 6f ...........#auto
|
||||
| 4032: 6d 65 72 67 65 3d 35 0d 04 02 23 6d 65 72 67 65 merge=5...#merge
|
||||
| 4048: 3d 31 30 30 2c 38 11 03 02 2b 69 6e 74 65 67 72 =100,8...+integr
|
||||
| 4064: 69 74 79 2d 63 68 65 63 6b 09 02 02 1b 72 65 62 ity-check....reb
|
||||
| 4080: 75 69 6c 64 0a 01 02 1d 00 00 00 00 00 00 00 00 uild............
|
||||
| end crash-18cc014e42e828.db
|
||||
}]} {}
|
||||
|
||||
breakpoint
|
||||
do_catchsql_test 21.1 {
|
||||
SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'R*';
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_test 22.0 {
|
||||
sqlite3 db {}
|
||||
db deserialize [decode_hexdb {
|
||||
| size 28672 pagesize 4096 filename crash-b794c89d922ac9.db
|
||||
| page 1 offset 0
|
||||
| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
|
||||
| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 07 .....@ ........
|
||||
| 32: 00 00 00 02 00 00 00 01 00 00 00 07 00 00 00 00 ................
|
||||
| 96: 00 00 00 00 0d 0e b1 00 06 0d a4 00 0f 8d 0f 21 ...............!
|
||||
| 112: 0e b9 0d c8 0e 7e 0d a4 00 00 00 00 00 00 00 00 .....~..........
|
||||
| 3488: 00 00 00 00 22 07 06 17 11 11 01 31 74 61 62 6c ...........1tabl
|
||||
| 3504: 65 74 32 74 32 07 43 52 45 41 54 45 20 54 41 42 et2t2.CREATE TAB
|
||||
| 3520: 4c 45 20 74 32 28 78 29 81 33 05 07 17 1f 1f 01 LE t2(x).3......
|
||||
| 3536: 82 35 74 61 61 6c 65 74 31 5f 73 65 67 64 69 72 .5taalet1_segdir
|
||||
| 3552: 74 31 5f 73 65 67 64 69 72 05 43 52 45 41 54 45 t1_segdir.CREATE
|
||||
| 3568: 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 64 69 TABLE 't1_segdi
|
||||
| 3584: 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 45 52 r'(level INTEGER
|
||||
| 3600: 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 74 61 ,idx INTEGER,sta
|
||||
| 3616: 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 rt_block INTEGER
|
||||
| 3632: 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c 6f 63 ,leaves_end_bloc
|
||||
| 3648: 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f 62 6c k INTEGER,end_bl
|
||||
| 3664: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 72 6f 6f 74 ock INTEGER,root
|
||||
| 3680: 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 4b 45 BLOB,PRIMARY KE
|
||||
| 3696: 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 31 06 Y(level, idx))1.
|
||||
| 3712: 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 69 74 ..E...indexsqlit
|
||||
| 3728: 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 5f 73 e_autoindex_t1_s
|
||||
| 3744: 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 69 72 egdir_1t1_segdir
|
||||
| 3760: 06 0f c7 00 08 00 00 00 00 66 04 07 17 23 23 01 .........f...##.
|
||||
| 3776: 81 13 74 61 62 6c 65 74 31 5f 73 65 67 6d 65 6e ..tablet1_segmen
|
||||
| 3792: 74 73 74 31 5f 73 65 67 6d 65 6e 74 73 04 43 52 tst1_segments.CR
|
||||
| 3808: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
|
||||
| 3824: 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b 69 64 egments'(blockid
|
||||
| 3840: 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 INTEGER PRIMARY
|
||||
| 3856: 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 KEY, block BLOB
|
||||
| 3872: 29 6a 03 07 17 21 21 01 81 1f 74 61 62 6c 65 74 )j...!!...tablet
|
||||
| 3888: 31 5f 63 6f 6e 84 65 6e 74 74 31 5f 63 6f 6e 74 1_con.entt1_cont
|
||||
| 3904: 65 6e 74 03 43 52 45 41 54 45 20 54 41 42 4c 45 ent.CREATE TABLE
|
||||
| 3920: 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 64 6f 't1_content'(do
|
||||
| 3936: 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d cid INTEGER PRIM
|
||||
| 3952: 41 52 59 20 4b 45 59 2c 20 27 63 30 61 27 2c 20 ARY KEY, 'c0a',
|
||||
| 3968: 27 63 31 62 27 2c 20 27 63 32 63 27 29 38 02 06 'c1b', 'c2c')8..
|
||||
| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
|
||||
| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
|
||||
| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 33 LE t1 USING fts3
|
||||
| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
|
||||
| page 3 offset 8192
|
||||
| 0: 0d 00 00 00 25 0b 48 00 0f d8 0f af 0f 86 0f 74 ....%.H........t
|
||||
| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
|
||||
| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
|
||||
| 48: 0d bb 0d a0 0d 84 0d 68 0d 4f 0d 35 0d 1b 0c fb .......h.O.5....
|
||||
| 64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 0c 24 0c 0a .......x.W.>.$..
|
||||
| 80: 0b 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .H..............
|
||||
| 2880: 00 00 00 00 00 00 00 00 81 3f 25 06 00 82 7f 00 .........?%.....
|
||||
| 2896: 00 43 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e .COMPILER=gcc-5.
|
||||
| 2912: 34 2e 30 20 32 30 31 36 30 36 30 39 20 44 45 42 4.0 20160609 DEB
|
||||
| 2928: 55 47 20 45 4e 41 42 4c 45 20 44 42 53 54 41 54 UG ENABLE DBSTAT
|
||||
| 2944: 20 56 54 41 42 20 45 4e 41 42 4c 45 20 46 54 53 VTAB ENABLE FTS
|
||||
| 2960: 34 20 45 4e 41 42 4c 45 20 46 54 53 35 20 45 4e 4 ENABLE FTS5 EN
|
||||
| 2976: 41 42 4c 45 20 47 45 4f 50 4f 4c 59 20 45 4e 41 ABLE GEOPOLY ENA
|
||||
| 2992: 42 4c 45 20 4a 53 4f 4e 31 20 45 4e 41 42 4c 45 BLE JSON1 ENABLE
|
||||
| 3008: 20 4d 45 4d 53 49 53 35 20 45 4e 41 42 4c 45 20 MEMSIS5 ENABLE
|
||||
| 3024: 52 54 52 45 45 20 4d 41 58 20 4d 45 4d 4f 52 59 RTREE MAX MEMORY
|
||||
| 3040: 3d 35 30 30 30 30 30 30 30 20 4f 4d 49 54 20 4c =50000000 OMIT L
|
||||
| 3056: 4f 41 44 20 45 58 54 45 4e 53 49 4f 4e 20 54 48 OAD EXTENSION TH
|
||||
| 3072: 52 45 41 44 53 41 46 45 3d 30 18 24 05 00 26 0f READSAFE=0.$..&.
|
||||
| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
|
||||
| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
|
||||
| 3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22 DSAFE=0XNOCASE..
|
||||
| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 45 3d ..%..THREADSAFE=
|
||||
| 3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRTRIM.!..3..OM
|
||||
| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f IT LOAD EXTENSIO
|
||||
| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
|
||||
| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
|
||||
| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
|
||||
| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
|
||||
| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
|
||||
| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
|
||||
| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
|
||||
| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
|
||||
| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
|
||||
| 3328: 0f 17 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MAX MEMORY=500
|
||||
| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
|
||||
| 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
|
||||
| 3376: 49 4e 41 52 59 18 1a 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
|
||||
| 3392: 4c 55 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LU RTREEXNOCASE.
|
||||
| 3408: 19 05 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
|
||||
| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
|
||||
| 3440: 4e 41 42 4c 45 20 4d 45 4d 53 59 53 35 58 42 49 NABLE MEMSYS5XBI
|
||||
| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
|
||||
| 3472: 45 20 4d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 E MEMSYS5XNOCASE
|
||||
| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 45 ....)..ENABLE ME
|
||||
| 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 15 05 00 25 MSYS5XRTRIM....%
|
||||
| 3520: 0f 19 45 4e 41 42 4c 45 20 4a 53 4f 4e 31 58 42 ..ENABLE JSON1XB
|
||||
| 3536: 49 4e 41 52 59 18 14 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
|
||||
| 3552: 4c 45 20 4a 53 4f 4e 31 58 4e 4f 43 41 53 45 17 LE JSON1XNOCASE.
|
||||
| 3568: 13 05 00 25 0f 17 45 4e 41 42 4c 45 20 4a 53 4f ...%..ENABLE JSO
|
||||
| 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 00 29 0f 19 45 N1XRTRIM....)..E
|
||||
| 3600: 4e 41 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 49 NABLE GEOPOLYXBI
|
||||
| 3616: 4e 41 52 59 1a 11 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
|
||||
| 3632: 45 20 47 45 4f 50 4f 4c 59 58 4e 4f 43 41 53 45 E GEOPOLYXNOCASE
|
||||
| 3648: 19 10 05 00 29 0f 17 45 4e 41 42 4c 45 20 47 45 ....)..ENABLE GE
|
||||
| 3664: 4f 50 4f 4c 59 58 52 54 52 49 4d 17 0f 05 00 23 OPOLYXRTRIM....#
|
||||
| 3680: 0f 19 45 4e 41 42 4c 45 20 46 54 53 35 58 42 49 ..ENABLE FTS5XBI
|
||||
| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
|
||||
| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0d 05 E FTS5XNOCASE...
|
||||
| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
|
||||
| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
|
||||
| 3760: 4c 45 19 46 54 53 34 58 42 49 4e 41 52 59 17 0b LE.FTS4XBINARY..
|
||||
| 3776: 05 00 23 0f 19 45 4e 41 42 4e f5 20 46 54 53 34 ..#..ENABN. FTS4
|
||||
| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
|
||||
| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
|
||||
| 3824: 09 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
|
||||
| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
|
||||
| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
|
||||
| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 41 53 45 1d TAT VTABXNOCASE.
|
||||
| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 41 53 ...1..ENABLE DAS
|
||||
| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 49 4d 11 06 TAT VTABXRTRIM..
|
||||
| 3920: 05 00 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
|
||||
| 3936: 59 11 05 05 00 17 0f 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
|
||||
| 3952: 43 41 53 45 10 04 05 00 17 ab 17 44 45 42 55 47 CASE.......DEBUG
|
||||
| 3968: 48 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d HRTRIM'...C..COM
|
||||
| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
|
||||
| 4000: 32 30 31 36 30 36 30 39 58 43 49 4e 41 52 59 27 20160609XCINARY'
|
||||
| 4016: 02 04 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
|
||||
| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
|
||||
| 4048: 39 58 4e 4f 43 41 53 45 26 01 05 00 43 0f 17 43 9XNOCASE&...C..C
|
||||
| 4064: 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e OMPILER=gcc-5.4.
|
||||
| 4080: 30 20 32 30 31 36 30 36 30 39 58 52 54 52 49 4d 0 20160609XRTRIM
|
||||
| page 4 offset 12288
|
||||
| 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| page 5 offset 16384
|
||||
| 0: 0d 00 00 00 02 0b a0 00 0c ad 0b a0 00 00 00 00 ................
|
||||
| 2976: 82 0a 02 08 08 09 08 08 17 84 06 30 20 32 35 33 ...........0 253
|
||||
| 2992: 00 01 30 04 25 06 1b 00 00 08 32 30 31 36 30 36 ..0.%.....201606
|
||||
| 3008: 30 39 03 25 07 00 00 01 34 03 25 05 00 00 01 35 09.%....4.%....5
|
||||
| 3024: 03 25 04 00 01 07 30 30 30 30 30 30 30 03 25 1a .%....0000000.%.
|
||||
| 3040: 00 00 08 63 6f 6d 70 69 6c 65 72 03 25 02 00 00 ...compiler.%...
|
||||
| 3056: 06 64 62 73 74 61 74 03 25 0a 00 01 04 65 62 75 .dbstat.%....ebu
|
||||
| 3072: 67 03 25 08 00 00 06 65 6e 61 62 6c 65 09 25 09 g.%....enable.%.
|
||||
| 3088: 05 04 04 04 04 04 00 01 08 78 74 65 6e 73 69 6f .........xtensio
|
||||
| 3104: 6e 03 25 1d 00 00 04 66 74 73 34 03 25 0d 00 03 n.%....fts4.%...
|
||||
| 3120: 01 35 03 25 0f 00 00 03 67 63 63 03 25 03 00 01 .5.%....gcc.%...
|
||||
| 3136: 06 65 6f 70 6f 6c 79 03 25 11 00 00 05 6a 73 6f .eopoly.%....jso
|
||||
| 3152: 6e 31 03 25 13 00 00 04 6c 6f 61 64 03 25 1c 00 n1.%....load.%..
|
||||
| 3168: 00 03 6d 61 78 03 25 18 00 01 05 65 6d 6f 72 79 ..max.%....emory
|
||||
| 3184: 03 25 19 00 03 04 73 79 73 35 03 25 15 00 00 04 .%....sys5.%....
|
||||
| 3200: 6f 6d 69 74 03 25 1b 00 00 05 72 74 72 65 65 03 omit.%....rtree.
|
||||
| 3216: 25 17 00 00 0a 74 68 72 65 61 64 73 61 66 65 03 %....threadsafe.
|
||||
| 3232: 25 1e 00 00 04 76 74 61 62 03 25 0b 00 86 50 01 %....vtab.%...P.
|
||||
| 3248: 08 08 08 08 08 17 8d 12 30 20 38 33 35 00 01 30 ........0 835..0
|
||||
| 3264: 12 01 06 00 01 06 00 01 06 00 1f 03 00 01 03 00 ................
|
||||
| 3280: 01 03 00 00 08 32 30 31 36 30 36 30 39 09 01 07 .....20160609...
|
||||
| 3296: 00 01 07 00 01 07 00 00 01 34 09 01 05 00 01 05 .........4......
|
||||
| 3312: 00 01 05 00 00 01 35 09 01 04 00 01 04 00 01 04 ......5.........
|
||||
| 3328: 00 01 07 30 30 30 30 30 30 30 09 1c 04 00 01 04 ...0000000......
|
||||
| 3344: 00 01 04 00 00 06 62 69 6e 61 72 79 3c 03 01 02 ......binary<...
|
||||
| 3360: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
|
||||
| 3376: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
|
||||
| 3392: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 ................
|
||||
| 3408: 01 02 02 00 03 01 02 02 00 00 08 63 6f 6d 70 69 ...........compi
|
||||
| 3424: 6c 65 72 09 01 02 00 01 02 00 01 02 00 00 06 64 ler............d
|
||||
| 3440: 62 73 74 61 74 09 07 03 00 01 03 00 01 03 00 01 bstat...........
|
||||
| 3456: 04 65 62 75 67 09 04 02 00 01 02 00 01 02 00 00 .ebug...........
|
||||
| 3472: 06 65 6e 61 62 6c 65 3f 07 02 00 01 02 00 01 02 .enable?........
|
||||
| 3488: 00 01 02 00 01 02 00 01 02 00 01 02 00 01 02 00 ................
|
||||
| 3504: 01 02 00 01 02 00 01 02 00 01 02 00 01 02 00 01 ................
|
||||
| 3520: 02 00 01 02 00 01 02 00 01 02 00 01 02 00 01 02 ................
|
||||
| 3536: 00 01 02 00 01 02 00 01 08 78 74 65 6e 73 69 6f .........xtensio
|
||||
| 3552: 6e 09 1f 04 00 01 04 00 01 04 00 00 04 66 74 73 n............fts
|
||||
| 3568: 34 09 0a 03 d4 01 02 ff 01 03 00 03 01 35 09 0d 4............5..
|
||||
| 3584: 03 00 01 03 00 01 03 00 00 03 67 64 d3 09 01 03 ..........gd....
|
||||
| 3600: 00 01 03 00 01 03 00 01 06 65 6f 70 6f 6c 79 09 .........eopoly.
|
||||
| 3616: 10 03 00 01 03 00 01 03 00 00 05 6a 73 6f 6e 31 ...........json1
|
||||
| 3632: 19 13 03 00 01 03 00 01 03 00 00 04 6c 6f 61 64 ............load
|
||||
| 3648: 09 1f 03 00 01 03 00 01 03 00 00 03 6d 61 78 09 ............max.
|
||||
| 3664: 1c 02 00 01 02 00 01 02 00 01 05 65 6d 6f 72 79 ...........emory
|
||||
| 3680: 09 1c 03 00 01 03 00 01 03 00 03 04 73 79 73 35 ............sys5
|
||||
| 3696: 09 16 03 00 01 03 00 01 03 00 00 06 6e 6f 63 61 ............noca
|
||||
| 3712: 73 65 3c 02 01 02 02 00 03 01 02 02 00 03 01 02 se<.............
|
||||
| 3728: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
|
||||
| 3744: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
|
||||
| 3760: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 00 ................
|
||||
| 3776: 04 6f 6d 69 74 09 1f 02 00 01 12 00 01 02 00 00 .omit...........
|
||||
| 3792: 05 72 74 72 65 65 09 19 03 00 01 07 80 00 f3 00 .rtree..........
|
||||
| 3808: 03 02 69 6d 3c 01 01 02 02 00 03 01 02 02 00 03 ..im<...........
|
||||
| 3824: 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 ................
|
||||
| 3840: 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 ................
|
||||
| 3856: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
|
||||
| 3872: 00 00 0a 74 68 72 65 61 64 73 61 66 65 09 22 02 ...threadsafe...
|
||||
| 3888: 00 01 02 00 01 02 00 00 04 76 74 61 62 09 07 04 .........vtab...
|
||||
| 3904: 00 01 04 00 01 04 00 00 01 78 b4 01 01 01 01 02 .........x......
|
||||
| 3920: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
|
||||
| 3936: 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 ................
|
||||
| 3952: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
|
||||
| 3968: 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 ................
|
||||
| 3984: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
|
||||
| 4000: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
|
||||
| 4016: 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 ................
|
||||
| 4032: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
|
||||
| 4048: 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 ................
|
||||
| 4064: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
|
||||
| 4080: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
|
||||
| page 6 offset 20480
|
||||
| 0: 0a 00 00 00 02 0f f5 00 0f fb 0f f5 00 00 00 00 ................
|
||||
| 4080: 00 00 00 00 00 05 04 08 09 01 02 04 04 08 08 09 ................
|
||||
| page 7 offset 24576
|
||||
| 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| 4016: 00 00 00 00 00 00 00 00 0d 05 02 23 61 75 74 6f ...........#auto
|
||||
| 4032: 6d 65 72 67 65 3d 35 0d 04 02 23 6d 65 72 67 65 merge=5...#merge
|
||||
| 4048: 3d 31 30 30 2c 38 11 03 02 2b 69 6e 74 65 67 72 =100,8...+integr
|
||||
| 4064: 69 74 79 2d 63 68 65 63 6b 09 02 02 1b 72 65 62 ity-check....reb
|
||||
| end crash-b794c89d922ac9.db
|
||||
}]} {}
|
||||
|
||||
do_catchsql_test 22.1 {
|
||||
SELECT snippet(t1,'', '', '--',-1,01)==0
|
||||
FROM t1 WHERE a MATCH 'rtree OR json1rtree OR json1';
|
||||
} {0 {0 0 0 0 0 0 0}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_test 23.0 {
|
||||
sqlite3 db {}
|
||||
db deserialize [decode_hexdb {
|
||||
.open --hexdb
|
||||
| size 28672 pagesize 4096 filename crash-670b15f2955a36.db
|
||||
| page 1 offset 0
|
||||
| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
|
||||
| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 07 .....@ ........
|
||||
| 32: 00 00 00 02 10 00 00 01 00 00 00 07 00 00 00 00 ................
|
||||
| 96: 00 00 00 00 0d 0e b1 00 06 0d a4 00 0f 8d 0f 21 ...............!
|
||||
| 112: 0e b9 0d c8 0e 7e 0d a4 00 00 00 00 00 00 00 00 .....~..........
|
||||
| 3488: 00 00 00 00 22 07 06 17 11 11 01 31 74 61 62 6c ...........1tabl
|
||||
| 3504: 65 74 32 74 32 07 43 52 45 41 54 45 20 54 41 42 et2t2.CREATE TAB
|
||||
| 3520: 4c 45 20 74 32 28 78 29 81 33 05 07 17 1f 1f 01 LE t2(x).3......
|
||||
| 3536: 82 35 74 61 62 6c 65 74 31 5f 73 65 67 64 69 72 .5tablet1_segdir
|
||||
| 3552: 74 31 5f 73 65 67 64 69 72 05 43 52 45 41 54 45 t1_segdir.CREATE
|
||||
| 3568: 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 64 69 TABLE 't1_segdi
|
||||
| 3584: 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 45 52 r'(level INTEGER
|
||||
| 3600: 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 74 61 ,idx INTEGER,sta
|
||||
| 3616: 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 rt_block INTEGER
|
||||
| 3632: 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c 6f 63 ,leaves_end_bloc
|
||||
| 3648: 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f 62 6c k INTEGER,end_bl
|
||||
| 3664: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 72 6f 6f 74 ock INTEGER,root
|
||||
| 3680: 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 4b 45 BLOB,PRIMARY KE
|
||||
| 3696: 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 31 06 Y(level, idx))1.
|
||||
| 3712: 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 69 74 ..E...indexsqlit
|
||||
| 3728: 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 5f 73 e_autoindex_t1_s
|
||||
| 3744: 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 69 72 egdir_1t1_segdir
|
||||
| 3760: 06 0f c7 00 08 00 00 00 00 66 04 07 17 23 23 01 .........f...##.
|
||||
| 3776: 81 13 74 61 62 6c 75 74 31 5f 73 65 67 6d 65 6e ..tablut1_segmen
|
||||
| 3792: 74 73 74 31 5f 73 65 67 6d 65 6e 74 73 04 43 52 tst1_segments.CR
|
||||
| 3808: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
|
||||
| 3824: 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b 69 64 egments'(blockid
|
||||
| 3840: 20 49 4e 54 45 47 45 42 20 50 52 49 4d 41 52 59 INTEGEB PRIMARY
|
||||
| 3856: 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 KEY, block BLOB
|
||||
| 3872: 29 6a 03 07 17 21 21 01 81 1f 74 61 62 6c 65 74 )j...!!...tablet
|
||||
| 3888: 31 5f 63 6f 6e 74 65 6e 74 74 31 5f 63 6f 6e 74 1_contentt1_cont
|
||||
| 3904: 65 6e 74 03 43 52 45 41 54 45 20 54 41 42 4c 45 ent.CREATE TABLE
|
||||
| 3920: 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 64 6f 't1_content'(do
|
||||
| 3936: 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d cid INTEGER PRIM
|
||||
| 3952: 41 52 59 20 4b 45 59 2c 20 27 63 30 61 27 2c 20 ARY KEY, 'c0a',
|
||||
| 3968: 27 63 31 62 27 2c 20 27 63 32 63 27 29 38 02 06 'c1b', 'c2c')8..
|
||||
| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
|
||||
| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
|
||||
| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 33 LE t1 USING fts3
|
||||
| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
|
||||
| page 3 offset 8192
|
||||
| 0: 0d 00 00 00 25 0b 48 01 0f d8 00 2f 0f 86 0f 74 ....%.H..../...t
|
||||
| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
|
||||
| 32: 0e 8d 0e 74 0e 5a fe 40 0e 24 0e 08 0d ef 0d d5 ...t.Z.@.$......
|
||||
| 48: 0d bb 0d a0 0d 84 0d 68 0d 4f 81 35 0d 1b 0c fb .......h.O.5....
|
||||
| 64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 00 00 00 00 .......x.W.>....
|
||||
| 2880: 00 00 00 00 00 00 00 00 81 3f 25 06 00 82 7f 10 .........?%.....
|
||||
| 2896: 00 43 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e .COMPILER=gcc-5.
|
||||
| 2912: 34 2e 30 20 32 30 31 36 30 36 30 39 20 44 45 42 4.0 20160609 DEB
|
||||
| 2928: 55 47 20 45 4e 41 42 4c 45 20 44 42 53 54 41 54 UG ENABLE DBSTAT
|
||||
| 2944: 20 56 54 41 42 20 45 4e 41 42 4c 45 20 46 54 53 VTAB ENABLE FTS
|
||||
| 2960: 34 20 45 4e 41 42 4c 45 20 46 54 53 35 20 45 4e 4 ENABLE FTS5 EN
|
||||
| 2976: 41 42 4c 45 20 47 45 4f 50 4f 4c 59 20 45 4e 41 ABLE GEOPOLY ENA
|
||||
| 2992: 42 4c 45 20 4a 53 4f 4e 31 20 45 4e 41 42 4c 45 BLE JSON1 ENABLE
|
||||
| 3008: 20 4d 45 4d 53 59 53 35 20 45 4e 41 42 4c 45 20 MEMSYS5 ENABLE
|
||||
| 3024: 52 54 52 45 45 20 4d 41 58 20 4d 45 4d 4f 52 59 RTREE MAX MEMORY
|
||||
| 3040: 3d 35 30 30 30 30 30 30 30 20 4f 4d 49 54 20 4c =50000000 OMIT L
|
||||
| 3056: 4f 41 44 20 45 58 54 45 4e 53 49 4f 4e 20 54 48 OAD EXTENSION TH
|
||||
| 3072: 52 45 41 44 53 41 46 45 3d 30 18 24 05 00 35 0f READSAFE=0.$..5.
|
||||
| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
|
||||
| 3104: 4e 41 52 59 18 23 55 00 25 0f 19 54 48 52 45 41 NARY.#U.%..THREA
|
||||
| 3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22 DSAFE=0XNOCASE..
|
||||
| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 45 3d ..%..THREADSAFE=
|
||||
| 3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRTRIM.!..3..OM
|
||||
| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f IT LOAD EXTENSIO
|
||||
| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
|
||||
| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
|
||||
| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
|
||||
| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
|
||||
| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
|
||||
| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
|
||||
| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
|
||||
| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
|
||||
| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
|
||||
| 3328: 0f 17 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MAX MEMORY=500
|
||||
| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
|
||||
| 3360: 0f 19 45 4e 41 42 4c 44 20 52 54 52 45 45 58 42 ..ENABLD RTREEXB
|
||||
| 3376: 49 4e 41 52 59 18 1a 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
|
||||
| 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
|
||||
| 3408: 19 05 00 24 0f 17 45 4e 40 42 4c 45 20 52 54 52 ...$..EN@BLE RTR
|
||||
| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
|
||||
| 3440: 4e 41 42 4c 45 20 4d 45 4d 53 59 53 35 58 42 49 NABLE MEMSYS5XBI
|
||||
| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4d 41 42 4c NARY....)..EMABL
|
||||
| 3472: 45 20 4d 45 4d 53 59 53 35 58 4e 4f 43 41 4c 45 E MEMSYS5XNOCALE
|
||||
| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 45 ....)..ENABLE ME
|
||||
| 3504: 4e 53 59 53 35 58 52 54 52 49 4d 18 15 05 00 25 NSYS5XRTRIM....%
|
||||
| 3520: 0f 19 45 4e 41 42 4c 45 20 4a 53 4f 4e 31 58 42 ..ENABLE JSON1XB
|
||||
| 3536: 49 4e 41 52 59 18 14 05 00 25 0f 19 45 4e 41 42 INARY....%..ENAB
|
||||
| 3552: 4c 45 20 4a 53 4f 4e 31 58 4e 4f 43 41 53 45 17 LE JSON1XNOCASE.
|
||||
| 3568: 13 05 00 25 0f 17 45 4e 41 42 4c 45 20 4a 53 4f ...%..ENABLE JSO
|
||||
| 3584: 4e 31 58 52 54 5f b9 4d 1a 12 05 00 29 0f 19 45 N1XRT_.M....)..E
|
||||
| 3600: 4e 41 42 4c 45 20 47 45 4f 50 31 4c 59 58 42 49 NABLE GEOP1LYXBI
|
||||
| 3616: 4e 41 52 58 1a 11 05 00 29 0f 19 45 4e 41 42 4c NARX....)..ENABL
|
||||
| 3632: 45 20 47 45 4f 50 4f 4c 59 58 4e 4f 43 41 53 45 E GEOPOLYXNOCASE
|
||||
| 3648: 19 10 05 00 29 0f 17 45 4e 41 42 4c 45 20 57 45 ....)..ENABLE WE
|
||||
| 3664: 4f 50 4f 4c 59 48 52 54 52 49 4d 17 0f 05 00 23 OPOLYHRTRIM....#
|
||||
| 3680: 0f 19 45 4e 41 42 4c 45 20 46 54 53 35 58 42 49 ..ENABLE FTS5XBI
|
||||
| 3696: 4e 41 53 59 17 0e 05 00 23 0f 19 45 4e 40 42 4b NASY....#..EN@BK
|
||||
| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0d 05 E FTS5XNOCASE...
|
||||
| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
|
||||
| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
|
||||
| 3760: 4c 45 20 46 54 94 34 58 42 49 4e 41 52 59 17 0b LE FT.4XBINARY..
|
||||
| 3776: 05 00 23 0f 19 45 4e 41 42 4c 43 70 46 54 53 34 ..#..ENABLCpFTS4
|
||||
| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
|
||||
| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
|
||||
| 3824: 09 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
|
||||
| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
|
||||
| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 32 53 ...1..ENABLE D2S
|
||||
| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 41 53 45 1d TAT VTABXNOCASE.
|
||||
| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
|
||||
| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 49 4d 11 06 TAT VTABXRTRIM..
|
||||
| 3920: 05 0b 27 0f 19 44 45 42 55 47 58 42 49 4e 41 52 ..'..DEBUGXBINAR
|
||||
| 3936: 59 11 05 05 00 17 0f 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
|
||||
| 3952: 43 41 53 45 10 03 05 00 17 0f 17 44 45 42 55 47 CASE.......DEBUG
|
||||
| 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
|
||||
| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
|
||||
| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
|
||||
| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 35 52 3d 67 ...C..COMPIL5R=g
|
||||
| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
|
||||
| 4048: 39 58 4e 4f 43 41 53 45 26 01 05 00 43 0f 02 43 9XNOCASE&...C..C
|
||||
| 4064: 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e OMPILER=gcc-5.4.
|
||||
| 4080: 30 20 32 30 31 36 30 36 30 39 58 00 00 00 00 00 0 20160609X.....
|
||||
| page 5 offset 16384
|
||||
| 0: 0d 00 00 00 02 0b a0 00 0c ad 0b a0 00 00 00 00 ................
|
||||
| 2976: 82 0a 02 08 08 09 08 08 17 84 06 30 20 32 35 33 ...........0 253
|
||||
| 2992: 00 01 30 04 25 06 1b 00 00 08 32 30 31 36 30 36 ..0.%.....201606
|
||||
| 3008: 30 39 03 25 07 00 00 01 34 03 25 05 00 00 01 35 09.%....4.%....5
|
||||
| 3024: 03 25 04 00 01 07 30 30 30 30 30 30 30 08 55 1a .%....0000000.U.
|
||||
| 3040: 00 00 08 63 6f 6d 70 69 6c 65 72 03 25 02 00 00 ...compiler.%...
|
||||
| 3056: 06 64 62 73 74 61 74 03 25 0a 00 01 04 65 61 75 .dbstat.%....eau
|
||||
| 3072: 67 03 25 08 00 00 06 65 6e 61 62 6c 65 09 25 09 g.%....enable.%.
|
||||
| 3088: 05 04 04 04 04 04 00 01 08 78 74 65 6e 73 69 6f .........xtensio
|
||||
| 3104: 6e 03 25 1d 00 00 04 66 74 73 34 03 25 0d 00 03 n.%....fts4.%...
|
||||
| 3120: 01 35 03 25 0f 00 00 0c 97 63 63 03 25 03 00 01 .5.%.....cc.%...
|
||||
| 3136: 06 65 6f 70 6f 6c 7a 03 25 11 00 00 05 6a 73 6f .eopolz.%....jso
|
||||
| 3152: 6e 31 03 25 13 00 00 04 6c 6f 61 64 03 25 1c 00 n1.%....load.%..
|
||||
| 3168: 00 03 6d 61 78 03 25 18 00 01 05 65 6d 6f 72 79 ..max.%....emory
|
||||
| 3184: 03 25 3d f0 03 04 73 79 73 35 03 25 15 00 00 04 .%=...sys5.%....
|
||||
| 3200: 6f 6d 69 74 03 25 1b 00 00 05 72 74 72 65 65 03 omit.%....rtree.
|
||||
| 3216: 25 17 00 00 0a 74 68 72 65 61 64 73 61 66 65 03 %....threadsafe.
|
||||
| 3232: 25 1e 00 00 04 76 74 61 62 03 25 0b 00 86 50 01 %....vtab.%...P.
|
||||
| 3248: 08 08 08 09 08 17 8d 12 30 20 38 33 37 e3 aa e0 ........0 837...
|
||||
| 3264: 12 d1 06 00 01 06 00 01 06 00 1f 03 00 01 03 00 ................
|
||||
| 3280: 01 03 00 00 08 32 30 31 36 30 36 30 49 09 01 07 .....2016060I...
|
||||
| 3296: 00 01 07 00 01 07 00 00 01 34 09 01 05 00 01 05 .........4......
|
||||
| 3312: 00 01 05 00 00 01 35 09 01 04 00 01 04 00 01 04 ......5.........
|
||||
| 3328: 00 01 07 30 30 30 30 30 30 30 09 1c 04 00 01 04 ...0000000......
|
||||
| 3344: 00 01 04 00 00 06 62 69 6e 61 72 79 3c 03 01 02 ......binary<...
|
||||
| 3360: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
|
||||
| 3376: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
|
||||
| 3392: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 ................
|
||||
| 3408: 01 02 02 00 03 01 02 02 00 00 08 63 6f 6d 70 69 ...........compi
|
||||
| 3424: 6c 65 72 09 01 02 00 01 02 00 01 02 00 00 06 64 ler............d
|
||||
| 3440: 62 73 74 61 74 09 07 03 00 01 03 00 01 03 00 01 bstat...........
|
||||
| 3456: 04 65 62 75 67 09 04 01 f0 01 02 00 01 02 00 00 .ebug...........
|
||||
| 3472: 06 65 6e 61 62 6c 65 3f 07 02 00 01 02 00 01 02 .enable?........
|
||||
| 3488: 00 01 02 00 01 02 00 01 02 00 01 02 00 01 02 00 ................
|
||||
| 3504: 01 02 00 01 02 00 01 02 00 01 02 00 01 02 00 01 ................
|
||||
| 3520: 02 00 01 02 00 01 02 00 01 02 00 01 02 00 01 02 ................
|
||||
| 3536: 00 01 02 00 01 02 00 01 08 78 74 65 6e 73 69 6f .........xtensio
|
||||
| 3552: 6e 09 1f 04 00 01 04 00 01 04 00 00 04 66 74 73 n............fts
|
||||
| 3568: 34 09 0a 03 f3 01 03 00 01 03 00 19 01 35 09 0d 4............5..
|
||||
| 3584: 03 00 01 03 00 01 03 00 00 03 67 63 63 09 01 03 ..........gcc...
|
||||
| 3600: 00 01 03 00 01 03 00 01 06 65 6f 70 6f 6c 79 09 .........eopoly.
|
||||
| 3616: 10 03 00 01 03 00 01 03 00 00 05 6a 73 6f 6e 31 ...........json1
|
||||
| 3632: 09 13 03 00 01 03 00 00 f3 00 00 04 6c 6f 61 64 ............load
|
||||
| 3648: 09 1f 03 00 01 03 00 01 03 00 00 03 6d 61 78 09 ............max.
|
||||
| 3664: 1c 02 00 01 02 00 01 02 00 01 05 65 6d 6f 72 79 ...........emory
|
||||
| 3680: 09 1c 03 00 01 03 00 01 03 00 03 04 73 79 73 35 ............sys5
|
||||
| 3696: 09 16 03 00 01 03 00 01 03 00 00 06 6e 6f 63 61 ............noca
|
||||
| 3712: 73 65 3c 02 01 02 02 00 03 01 02 02 00 03 01 02 se<.............
|
||||
| 3728: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
|
||||
| 3744: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
|
||||
| 3760: 03 01 02 02 00 03 01 02 02 00 46 01 02 02 00 00 ..........F.....
|
||||
| 3776: 04 6f 6d 69 74 09 1f 02 00 01 02 00 01 02 00 00 .omit...........
|
||||
| 3792: 05 72 74 72 64 65 09 19 03 00 01 03 00 01 03 00 .rtrde..........
|
||||
| 3808: 03 02 69 6d 3c 01 01 02 02 00 03 01 02 02 00 03 ..im<...........
|
||||
| 3824: 01 02 02 00 03 01 02 01 ff 03 01 02 02 00 03 01 ................
|
||||
| 3840: 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 ................
|
||||
| 3856: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
|
||||
| 3872: 00 00 0a 74 68 72 65 61 64 73 61 66 65 09 22 02 ...threadsafe...
|
||||
| 3888: 00 01 02 00 01 02 00 00 04 76 74 61 62 09 07 04 .........vtab...
|
||||
| 3904: 00 01 04 00 01 04 00 00 01 78 b4 01 01 01 01 02 .........x......
|
||||
| 3920: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
|
||||
| 3936: 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 ................
|
||||
| 3952: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
|
||||
| 3968: 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 ................
|
||||
| 3984: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
|
||||
| 4000: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
|
||||
| 4016: 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 ................
|
||||
| 4032: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
|
||||
| 4048: 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 ................
|
||||
| 4064: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 02 02 ................
|
||||
| 4080: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
|
||||
| page 6 offset 20480
|
||||
| 0: 0a 00 00 00 02 0f f5 00 0f fb 0f f5 00 00 00 00 ................
|
||||
| 4080: 00 00 00 00 00 05 04 08 09 01 02 04 04 08 09 09 ................
|
||||
| page 7 offset 24576
|
||||
| 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
| 4016: 00 00 00 00 00 00 00 00 0d 05 02 23 61 75 74 6f ...........#auto
|
||||
| 4032: 6d 65 71 97 65 3d 35 0d 04 02 23 6d 65 72 67 65 meq.e=5...#merge
|
||||
| 4048: 3d 31 30 30 2c 38 11 03 02 2b 69 6e 74 65 67 72 =100,8...+integr
|
||||
| 4064: 69 74 79 00 00 00 00 00 00 00 00 00 00 00 00 00 ity.............
|
||||
| end crash-670b15f2955a36.db
|
||||
}]} {}
|
||||
|
||||
do_catchsql_test 23.1 {
|
||||
SELECT 'FyzLy'FROM t1 WHERE t1 MATCH 'j';
|
||||
} {1 {database disk image is malformed}}
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ do_icu_expr_test 3.2 {*lOl* *h4h*} {
|
||||
AND {AND {AND {PHRASE 3 0 *} {PHRASE 3 0 lol+}} {PHRASE 3 0 *}} {PHRASE 3 0 h4h+}
|
||||
}
|
||||
|
||||
do_simple_expr_test 3.3 { * } {}
|
||||
do_simple_expr_test 3.3 { * } { }
|
||||
do_simple_expr_test 3.4 { *a } { PHRASE 3 0 a }
|
||||
do_simple_expr_test 3.5 { a*b } { AND {PHRASE 3 0 a+} {PHRASE 3 0 b} }
|
||||
do_simple_expr_test 3.6 { *a*b } { AND {PHRASE 3 0 a+} {PHRASE 3 0 b} }
|
||||
|
||||
+2
-2
@@ -531,7 +531,7 @@ static int decodeDatabase(
|
||||
fprintf(stderr, "Out of memory!\n");
|
||||
exit(1);
|
||||
}
|
||||
memset(a, 0, (size_t)nAlloc);
|
||||
memset(a, 0, nAlloc);
|
||||
for(i=k=0; i<n; i++){
|
||||
unsigned char c = (unsigned char)zIn[i];
|
||||
if( isxdigit(c) ){
|
||||
@@ -568,7 +568,7 @@ static int decodeDatabase(
|
||||
exit(1);
|
||||
}
|
||||
assert( newSize > nAlloc );
|
||||
memset(a+nAlloc, 0, (size_t)(newSize - nAlloc));
|
||||
memset(a+nAlloc, 0, newSize - nAlloc);
|
||||
nAlloc = newSize;
|
||||
}
|
||||
if( j>=(unsigned)mx ){
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -651,68 +651,4 @@ do_execsql_test in-14.1 {
|
||||
SELECT * FROM c1 WHERE a IN (SELECT a FROM c1) ORDER BY 1
|
||||
} {1 2 3 4}
|
||||
|
||||
# 2019-02-20 Ticket https://www.sqlite.org/src/tktview/df46dfb631f75694fbb97033b69
|
||||
#
|
||||
do_execsql_test in-15.0 {
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE IF NOT EXISTS t1(id INTEGER PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES(1);
|
||||
SELECT a.id FROM t1 AS a JOIN t1 AS b ON a.id=b.id WHERE a.id IN (1,2,3);
|
||||
} {1}
|
||||
do_execsql_test in-15.1 {
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2(a INTEGER PRIMARY KEY,b);
|
||||
INSERT INTO t2 VALUES(1,11);
|
||||
INSERT INTO t2 VALUES(2,22);
|
||||
INSERT INTO t2 VALUES(3,33);
|
||||
SELECT b, a IN (3,4,5) FROM t2 ORDER BY b;
|
||||
} {11 0 22 0 33 1}
|
||||
do_execsql_test in-15.2 {
|
||||
DROP TABLE IF EXISTS t3;
|
||||
CREATE TABLE t3(x INTEGER PRIMARY KEY);
|
||||
INSERT INTO t3 VALUES(8);
|
||||
SELECT CASE WHEN x NOT IN (5,6,7) THEN 'yes' ELSE 'no' END FROM t3;
|
||||
SELECT CASE WHEN x NOT IN (NULL,6,7) THEN 'yes' ELSE 'no' END FROM t3;
|
||||
} {yes no}
|
||||
do_execsql_test in-15.3 {
|
||||
SELECT CASE WHEN x NOT IN (5,6,7) OR x=0 THEN 'yes' ELSE 'no' END FROM t3;
|
||||
SELECT CASE WHEN x NOT IN (NULL,6,7) OR x=0 THEN 'yes' ELSE 'no' END FROM t3;
|
||||
} {yes no}
|
||||
do_execsql_test in-15.4 {
|
||||
DROP TABLE IF EXISTS t4;
|
||||
CREATE TABLE t4(a INTEGER PRIMARY KEY, b INT);
|
||||
WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM c WHERE x<20)
|
||||
INSERT INTO t4(a,b) SELECT x, x+100 FROM c;
|
||||
SELECT b FROM t4 WHERE a IN (3,null,8) ORDER BY +b;
|
||||
} {103 108}
|
||||
do_execsql_test in-15.5 {
|
||||
SELECT b FROM t4 WHERE a NOT IN (3,null,8);
|
||||
} {}
|
||||
do_execsql_test in-15.6 {
|
||||
DROP TABLE IF EXISTS t5;
|
||||
DROP TABLE IF EXISTS t6;
|
||||
CREATE TABLE t5(id INTEGER PRIMARY KEY, name TEXT);
|
||||
CREATE TABLE t6(id INTEGER PRIMARY KEY, name TEXT, t5_id INT);
|
||||
INSERT INTO t5 VALUES(1,'Alice'),(2,'Emma');
|
||||
INSERT INTO t6 VALUES(1,'Bob',1),(2,'Cindy',1),(3,'Dave',2);
|
||||
SELECT a.*
|
||||
FROM t5 AS 'a' JOIN t5 AS 'b' ON b.id=a.id
|
||||
WHERE b.id IN (
|
||||
SELECT t6.t5_id
|
||||
FROM t6
|
||||
WHERE name='Bob'
|
||||
AND t6.t5_id IS NOT NULL
|
||||
AND t6.id IN (
|
||||
SELECT id
|
||||
FROM (SELECT t6.id, count(*) AS x
|
||||
FROM t6
|
||||
WHERE name='Bob'
|
||||
) AS 't'
|
||||
WHERE x=1
|
||||
)
|
||||
AND t6.id IN (1,id)
|
||||
);
|
||||
} {1 Alice}
|
||||
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -337,16 +337,6 @@ do_faultsim_test 4.2 -faults custom -prep {
|
||||
faultsim_test_result {0 {}}
|
||||
}
|
||||
|
||||
do_faultsim_test 5 -prep {
|
||||
reset_db
|
||||
} -body {
|
||||
execsql {
|
||||
CREATE TABLE reallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallyreallylongname(a PRIMARY KEY) WITHOUT ROWID;
|
||||
}
|
||||
} -test {
|
||||
faultsim_test_result {0 {}}
|
||||
}
|
||||
|
||||
uninstall_custom_faultsim
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -178,56 +178,4 @@ do_eqp_test like3-5.211 {
|
||||
`--SEARCH TABLE t5b USING COVERING INDEX sqlite_autoindex_t5b_1 (x>? AND x<?)
|
||||
}
|
||||
|
||||
# 2019-02-27
|
||||
# Verify that the LIKE optimization works with an ESCAPE clause when
|
||||
# using PRAGMA case_sensitive_like=ON.
|
||||
#
|
||||
do_execsql_test like3-6.100 {
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(path TEXT COLLATE nocase PRIMARY KEY,a,b,c) WITHOUT ROWID;
|
||||
}
|
||||
do_eqp_test like3-6.110 {
|
||||
SELECT * FROM t1 WHERE path LIKE 'a%';
|
||||
} {
|
||||
QUERY PLAN
|
||||
`--SEARCH TABLE t1 USING PRIMARY KEY (path>? AND path<?)
|
||||
}
|
||||
do_eqp_test like3-6.120 {
|
||||
SELECT * FROM t1 WHERE path LIKE 'a%' ESCAPE '_';
|
||||
} {
|
||||
QUERY PLAN
|
||||
`--SEARCH TABLE t1 USING PRIMARY KEY (path>? AND path<?)
|
||||
}
|
||||
do_execsql_test like3-6.200 {
|
||||
DROP TABLE IF EXISTS t2;
|
||||
CREATE TABLE t2(path TEXT,x,y,z);
|
||||
CREATE INDEX t2path ON t2(path COLLATE nocase);
|
||||
CREATE INDEX t2path2 ON t2(path);
|
||||
}
|
||||
do_eqp_test like3-6.210 {
|
||||
SELECT * FROM t2 WHERE path LIKE 'a%';
|
||||
} {
|
||||
QUERY PLAN
|
||||
`--SEARCH TABLE t2 USING INDEX t2path (path>? AND path<?)
|
||||
}
|
||||
do_eqp_test like3-6.220 {
|
||||
SELECT * FROM t2 WHERE path LIKE 'a%' ESCAPE '_';
|
||||
} {
|
||||
QUERY PLAN
|
||||
`--SEARCH TABLE t2 USING INDEX t2path (path>? AND path<?)
|
||||
}
|
||||
db eval {PRAGMA case_sensitive_like=ON}
|
||||
do_eqp_test like3-6.230 {
|
||||
SELECT * FROM t2 WHERE path LIKE 'a%';
|
||||
} {
|
||||
QUERY PLAN
|
||||
`--SEARCH TABLE t2 USING INDEX t2path2 (path>? AND path<?)
|
||||
}
|
||||
do_eqp_test like3-6.240 {
|
||||
SELECT * FROM t2 WHERE path LIKE 'a%' ESCAPE '_';
|
||||
} {
|
||||
QUERY PLAN
|
||||
`--SEARCH TABLE t2 USING INDEX t2path2 (path>? AND path<?)
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
@@ -185,20 +185,4 @@ do_test 620 {
|
||||
lappend rc $msg
|
||||
} {1 {wrong # args: should be "db serialize ?DATABASE?"}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_execsql_test 700 {
|
||||
CREATE TABLE t1(a, b);
|
||||
PRAGMA schema_version = 0;
|
||||
}
|
||||
do_test 710 {
|
||||
set ser [db serialize main]
|
||||
db close
|
||||
sqlite3 db
|
||||
db deserialize main $ser
|
||||
catchsql {
|
||||
CREATE VIRTUAL TABLE t1 USING rtree(id, a, b, c, d);
|
||||
}
|
||||
} {1 {table t1 already exists}}
|
||||
|
||||
finish_test
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user