Skip to content

Commit 56e5656

Browse files
committed
Snapshot of upstream SQLite 3.33.0
1 parent ed8f995 commit 56e5656

File tree

188 files changed

+8868
-1894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+8868
-1894
lines changed

Makefile.in

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ TESTSRC += \
443443
$(TOP)/ext/misc/carray.c \
444444
$(TOP)/ext/misc/closure.c \
445445
$(TOP)/ext/misc/csv.c \
446+
$(TOP)/ext/misc/decimal.c \
446447
$(TOP)/ext/misc/eval.c \
447448
$(TOP)/ext/misc/explain.c \
448449
$(TOP)/ext/misc/fileio.c \
@@ -1067,6 +1068,12 @@ parse.c: $(TOP)/src/parse.y lemon$(BEXE)
10671068
sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest mksourceid$(BEXE) $(TOP)/VERSION
10681069
$(TCLSH_CMD) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
10691070

1071+
sqlite3rc.h: $(TOP)/src/sqlite3.rc $(TOP)/VERSION
1072+
echo '#ifndef SQLITE_RESOURCE_VERSION' >$@
1073+
echo -n '#define SQLITE_RESOURCE_VERSION ' >>$@
1074+
cat $(TOP)/VERSION | $(TCLSH_CMD) $(TOP)/tool/replace.tcl exact . , >>$@
1075+
echo '#endif' >>sqlite3rc.h
1076+
10701077
keywordhash.h: $(TOP)/tool/mkkeywordhash.c
10711078
$(BCC) -o mkkeywordhash$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)/tool/mkkeywordhash.c
10721079
./mkkeywordhash$(BEXE) >keywordhash.h
@@ -1075,9 +1082,11 @@ keywordhash.h: $(TOP)/tool/mkkeywordhash.c
10751082
SHELL_SRC = \
10761083
$(TOP)/src/shell.c.in \
10771084
$(TOP)/ext/misc/appendvfs.c \
1078-
$(TOP)/ext/misc/shathree.c \
1079-
$(TOP)/ext/misc/fileio.c \
10801085
$(TOP)/ext/misc/completion.c \
1086+
$(TOP)/ext/misc/decimal.c \
1087+
$(TOP)/ext/misc/fileio.c \
1088+
$(TOP)/ext/misc/ieee754.c \
1089+
$(TOP)/ext/misc/shathree.c \
10811090
$(TOP)/ext/misc/sqlar.c \
10821091
$(TOP)/ext/misc/uint.c \
10831092
$(TOP)/ext/expert/sqlite3expert.c \
@@ -1286,6 +1295,9 @@ valgrindtest: $(TESTPROGS) valgrindfuzz
12861295
smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
12871296
./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
12881297

1298+
shelltest: $(TESTPROGS)
1299+
./testfixture$(TEXT) $(TOP)/test/permutations.test shell
1300+
12891301
sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
12901302
$(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
12911303

@@ -1388,10 +1400,10 @@ checksymbols: sqlite3.o
13881400
# a tarball named for the version number. Ex: sqlite-autoconf-3110000.tar.gz.
13891401
# The snapshot-tarball target builds a tarball named by the SHA1 hash
13901402
#
1391-
amalgamation-tarball: sqlite3.c
1403+
amalgamation-tarball: sqlite3.c sqlite3rc.h
13921404
TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --normal
13931405

1394-
snapshot-tarball: sqlite3.c
1406+
snapshot-tarball: sqlite3.c sqlite3rc.h
13951407
TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --snapshot
13961408

13971409
# The next two rules are used to support the "threadtest" target. Building

Makefile.msc

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ SRC12 =
14951495

14961496
# All source code files.
14971497
#
1498-
SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11)
1498+
SRC = $(SRC00) $(SRC01) $(SRC03) $(SRC04) $(SRC05) $(SRC06) $(SRC07) $(SRC08) $(SRC09) $(SRC10) $(SRC11) $(SRC12)
14991499

15001500
# Source code to the test files.
15011501
#
@@ -1560,6 +1560,7 @@ TESTEXT = \
15601560
$(TOP)\ext\misc\carray.c \
15611561
$(TOP)\ext\misc\closure.c \
15621562
$(TOP)\ext\misc\csv.c \
1563+
$(TOP)\ext\misc\decimal.c \
15631564
$(TOP)\ext\misc\eval.c \
15641565
$(TOP)\ext\misc\explain.c \
15651566
$(TOP)\ext\misc\fileio.c \
@@ -1846,15 +1847,16 @@ mptest: mptester.exe
18461847
for %i in ($(SRC11)) do copy /Y %i tsrc
18471848
for %i in ($(SRC12)) do copy /Y %i tsrc
18481849
copy /Y fts5.c tsrc
1850+
copy /B tsrc\fts5.c +,,
18491851
copy /Y fts5.h tsrc
1852+
copy /B tsrc\fts5.h +,,
18501853
del /Q tsrc\sqlite.h.in tsrc\parse.y 2>NUL
18511854
$(TCLSH_CMD) $(TOP)\tool\vdbe-compress.tcl $(OPTS) < tsrc\vdbe.c > vdbe.new
18521855
move vdbe.new tsrc\vdbe.c
18531856
echo > .target_source
18541857

1855-
sqlite3.c: .target_source sqlite3ext.h $(MKSQLITE3C_TOOL)
1858+
sqlite3.c: .target_source sqlite3ext.h sqlite3session.h $(MKSQLITE3C_TOOL)
18561859
$(TCLSH_CMD) $(MKSQLITE3C_TOOL) $(MKSQLITE3C_ARGS)
1857-
copy $(TOP)\ext\session\sqlite3session.h .
18581860

18591861
sqlite3-all.c: sqlite3.c $(TOP)\tool\split-sqlite3c.tcl
18601862
$(TCLSH_CMD) $(TOP)\tool\split-sqlite3c.tcl
@@ -1869,7 +1871,8 @@ sqlite3.lo: $(SQLITE3C)
18691871
# Rules to build the LEMON compiler generator
18701872
#
18711873
lempar.c: $(TOP)\tool\lempar.c
1872-
copy $(TOP)\tool\lempar.c .
1874+
copy /Y $(TOP)\tool\lempar.c .
1875+
copy /B lempar.c +,,
18731876

18741877
lemon.exe: $(TOP)\tool\lemon.c lempar.c
18751878
$(BCC) $(NO_WARN) -Daccess=_access \
@@ -2169,7 +2172,8 @@ parse.h: parse.c
21692172

21702173
parse.c: $(TOP)\src\parse.y lemon.exe
21712174
del /Q parse.y parse.h parse.h.temp 2>NUL
2172-
copy $(TOP)\src\parse.y .
2175+
copy /Y $(TOP)\src\parse.y .
2176+
copy /B parse.y +,,
21732177
.\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S parse.y
21742178

21752179
$(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION
@@ -2182,8 +2186,13 @@ sqlite3ext.h: .target_source
21822186
copy /Y sqlite3ext.h tsrc\sqlite3ext.h
21832187
!ELSE
21842188
copy /Y tsrc\sqlite3ext.h sqlite3ext.h
2189+
copy /B sqlite3ext.h +,,
21852190
!ENDIF
21862191

2192+
sqlite3session.h: $(TOP)\ext\session\sqlite3session.h
2193+
copy /Y $(TOP)\ext\session\sqlite3session.h .
2194+
copy /B sqlite3session.h +,,
2195+
21872196
mkkeywordhash.exe: $(TOP)\tool\mkkeywordhash.c
21882197
$(BCC) $(NO_WARN) -Fe$@ $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) \
21892198
$(TOP)\tool\mkkeywordhash.c /link $(LDFLAGS) $(NLTLINKOPTS) $(NLTLIBPATHS)
@@ -2195,10 +2204,12 @@ keywordhash.h: $(TOP)\tool\mkkeywordhash.c mkkeywordhash.exe
21952204
SHELL_SRC = \
21962205
$(TOP)\src\shell.c.in \
21972206
$(TOP)\ext\misc\appendvfs.c \
2198-
$(TOP)\ext\misc\shathree.c \
2199-
$(TOP)\ext\misc\fileio.c \
22002207
$(TOP)\ext\misc\completion.c \
2201-
$(TOP)\ext\misc\uint.c \
2208+
$(TOP)\ext\misc\decimal.c \
2209+
$(TOP)\ext\misc\fileio.c \
2210+
$(TOP)\ext\misc\ieee754.c \
2211+
$(TOP)\ext\misc\shathree.c \
2212+
$(TOP)\ext\misc\uint.c \
22022213
$(TOP)\ext\expert\sqlite3expert.c \
22032214
$(TOP)\ext\expert\sqlite3expert.h \
22042215
$(TOP)\ext\misc\memtrace.c \
@@ -2329,19 +2340,22 @@ LSM1_SRC = \
23292340
$(TOP)\ext\lsm1\lsm_win32.c
23302341

23312342
fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
2332-
copy $(TOP)\ext\fts5\fts5parse.y .
2343+
copy /Y $(TOP)\ext\fts5\fts5parse.y .
2344+
copy /B fts5parse.y +,,
23332345
del /Q fts5parse.h 2>NUL
23342346
.\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S fts5parse.y
23352347

23362348
fts5parse.h: fts5parse.c
23372349

23382350
fts5.c: $(FTS5_SRC)
23392351
$(TCLSH_CMD) $(TOP)\ext\fts5\tool\mkfts5c.tcl
2340-
copy $(TOP)\ext\fts5\fts5.h .
2352+
copy /Y $(TOP)\ext\fts5\fts5.h .
2353+
copy /B fts5.h +,,
23412354

23422355
lsm1.c: $(LSM1_SRC)
23432356
$(TCLSH_CMD) $(TOP)\ext\lsm1\tool\mklsm1c.tcl
2344-
copy $(TOP)\ext\lsm1\lsm.h .
2357+
copy /Y $(TOP)\ext\lsm1\lsm.h .
2358+
copy /B lsm.h +,,
23452359

23462360
fts5.lo: fts5.c $(HDR) $(EXTHDR)
23472361
$(LTCOMPILE) $(CORE_COMPILE_OPTS) $(NO_WARN) -DSQLITE_CORE -c fts5.c
@@ -2452,6 +2466,9 @@ smoketest: $(TESTPROGS)
24522466
@set PATH=$(LIBTCLPATH);$(PATH)
24532467
.\testfixture.exe $(TOP)\test\main.test $(TESTOPTS)
24542468

2469+
shelltest: $(TESTPROGS)
2470+
.\testfixture.exe $(TOP)\test\permutations.test shell
2471+
24552472
sqlite3_analyzer.c: $(SQLITE3C) $(SQLITE3H) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in $(SQLITE_TCL_DEP)
24562473
$(TCLSH_CMD) $(TOP)\tool\mkccode.tcl $(TOP)\tool\sqlite3_analyzer.c.in > $@
24572474

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.32.3
1+
3.33.0

autoconf/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_D
1313

1414
include_HEADERS = sqlite3.h sqlite3ext.h
1515

16-
EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc README.txt Replace.cs Makefile.fallback
16+
EXTRA_DIST = sqlite3.1 tea Makefile.msc sqlite3.rc sqlite3rc.h README.txt Replace.cs Makefile.fallback
1717
pkgconfigdir = ${libdir}/pkgconfig
1818
pkgconfig_DATA = sqlite3.pc
1919

configure

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.69 for sqlite 3.32.3.
3+
# Generated by GNU Autoconf 2.69 for sqlite 3.33.0.
44
#
55
#
66
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ MAKEFLAGS=
726726
# Identity of this package.
727727
PACKAGE_NAME='sqlite'
728728
PACKAGE_TARNAME='sqlite'
729-
PACKAGE_VERSION='3.32.3'
730-
PACKAGE_STRING='sqlite 3.32.3'
729+
PACKAGE_VERSION='3.33.0'
730+
PACKAGE_STRING='sqlite 3.33.0'
731731
PACKAGE_BUGREPORT=''
732732
PACKAGE_URL=''
733733

@@ -1467,7 +1467,7 @@ if test "$ac_init_help" = "long"; then
14671467
# Omit some internal or obsolete options to make the list less imposing.
14681468
# This message is too long to be a string in the A/UX 3.1 sh.
14691469
cat <<_ACEOF
1470-
\`configure' configures sqlite 3.32.3 to adapt to many kinds of systems.
1470+
\`configure' configures sqlite 3.33.0 to adapt to many kinds of systems.
14711471
14721472
Usage: $0 [OPTION]... [VAR=VALUE]...
14731473
@@ -1532,7 +1532,7 @@ fi
15321532

15331533
if test -n "$ac_init_help"; then
15341534
case $ac_init_help in
1535-
short | recursive ) echo "Configuration of sqlite 3.32.3:";;
1535+
short | recursive ) echo "Configuration of sqlite 3.33.0:";;
15361536
esac
15371537
cat <<\_ACEOF
15381538
@@ -1659,7 +1659,7 @@ fi
16591659
test -n "$ac_init_help" && exit $ac_status
16601660
if $ac_init_version; then
16611661
cat <<\_ACEOF
1662-
sqlite configure 3.32.3
1662+
sqlite configure 3.33.0
16631663
generated by GNU Autoconf 2.69
16641664
16651665
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2078,7 +2078,7 @@ cat >config.log <<_ACEOF
20782078
This file contains any messages produced by compilers while
20792079
running configure, to aid debugging if configure makes a mistake.
20802080
2081-
It was created by sqlite $as_me 3.32.3, which was
2081+
It was created by sqlite $as_me 3.33.0, which was
20822082
generated by GNU Autoconf 2.69. Invocation command line was
20832083
20842084
$ $0 $@
@@ -11268,7 +11268,7 @@ if test "${enable_amalgamation+set}" = set; then :
1126811268
enableval=$enable_amalgamation;
1126911269
fi
1127011270

11271-
if test "${enable_amalgamation}" == "no" ; then
11271+
if test "${enable_amalgamation}" = "no" ; then
1127211272
USE_AMALGAMATION=0
1127311273
fi
1127411274

@@ -11619,7 +11619,7 @@ if test "${enable_update_limit+set}" = set; then :
1161911619
enableval=$enable_update_limit;
1162011620
fi
1162111621

11622-
if test "${enable_udlimit}" = "yes" ; then
11622+
if test "${enable_update_limit}" = "yes" ; then
1162311623
OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT"
1162411624
fi
1162511625

@@ -12243,7 +12243,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1224312243
# report actual input values of CONFIG_FILES etc. instead of their
1224412244
# values after options handling.
1224512245
ac_log="
12246-
This file was extended by sqlite $as_me 3.32.3, which was
12246+
This file was extended by sqlite $as_me 3.33.0, which was
1224712247
generated by GNU Autoconf 2.69. Invocation command line was
1224812248
1224912249
CONFIG_FILES = $CONFIG_FILES
@@ -12309,7 +12309,7 @@ _ACEOF
1230912309
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1231012310
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1231112311
ac_cs_version="\\
12312-
sqlite config.status 3.32.3
12312+
sqlite config.status 3.33.0
1231312313
configured by $0, generated by GNU Autoconf 2.69,
1231412314
with options \\"\$ac_cs_config\\"
1231512315

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ AC_SUBST(TARGET_DEBUG)
569569
# See whether we should use the amalgamation to build
570570
AC_ARG_ENABLE(amalgamation, AC_HELP_STRING([--disable-amalgamation],
571571
[Disable the amalgamation and instead build all files separately]))
572-
if test "${enable_amalgamation}" == "no" ; then
572+
if test "${enable_amalgamation}" = "no" ; then
573573
USE_AMALGAMATION=0
574574
fi
575575
AC_SUBST(USE_AMALGAMATION)
@@ -651,7 +651,7 @@ fi
651651
# statements.
652652
AC_ARG_ENABLE(update-limit, AC_HELP_STRING([--enable-update-limit],
653653
[Enable the UPDATE/DELETE LIMIT clause]))
654-
if test "${enable_udlimit}" = "yes" ; then
654+
if test "${enable_update_limit}" = "yes" ; then
655655
OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT"
656656
fi
657657

doc/lemon.html

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ <h3>Command Line Options</h3>
104104
are written into the directory that contains the input grammar file.
105105
<li><b>-D<i>name</i></b>
106106
Define C preprocessor macro <i>name</i>. This macro is usable by
107-
"<tt><a href='#pifdef'>%ifdef</a></tt>" and
108-
"<tt><a href='#pifdef'>%ifndef</a></tt>" lines
107+
"<tt><a href='#pifdef'>%ifdef</a></tt>",
108+
"<tt><a href='#pifdef'>%ifndef</a></tt>", and
109+
"<tt><a href="#pifdef">%if</a></tt> lines
109110
in the grammar file.
111+
<li><b>-E</b>
112+
Run the "%if" preprocessor step only and print the revised grammar
113+
file.
110114
<li><b>-g</b>
111115
Do not generate a parser. Instead write the input grammar to standard
112116
output with all comments, actions, and other extraneous text removed.
@@ -555,9 +559,11 @@ <h3>Special Directives</h3>
555559
<li><tt><a href='#default_destructor'>%default_destructor</a></tt>
556560
<li><tt><a href='#default_type'>%default_type</a></tt>
557561
<li><tt><a href='#destructor'>%destructor</a></tt>
562+
<li><tt><a href='#pifdef'>%else</a></tt>
558563
<li><tt><a href='#pifdef'>%endif</a></tt>
559564
<li><tt><a href='#extraarg'>%extra_argument</a></tt>
560565
<li><tt><a href='#pfallback'>%fallback</a></tt>
566+
<li><tt><a href='#pifdef'>%if</a></tt>
561567
<li><tt><a href='#pifdef'>%ifdef</a></tt>
562568
<li><tt><a href='#pifdef'>%ifndef</a></tt>
563569
<li><tt><a href='#pinclude'>%include</a></tt>
@@ -737,10 +743,11 @@ <h4>The <tt>%fallback</tt> directive</h4>
737743
argument.</p>
738744

739745
<a name='pifdef'></a>
740-
<h4>The <tt>%ifdef</tt>, <tt>%ifndef</tt>, and <tt>%endif</tt> directives</h4>
746+
<h4>The <tt>%if</tt> directive and its friends</h4>
741747

742-
<p>The <tt>%ifdef</tt>, <tt>%ifndef</tt>, and <tt>%endif</tt> directives
743-
are similar to #ifdef, #ifndef, and #endif in the C-preprocessor,
748+
<p>The <tt>%if</tt>, <tt>%ifdef</tt>, <tt>%ifndef</tt>, <tt>%else</tt>,
749+
and <tt>%endif</tt> directives
750+
are similar to #if, #ifdef, #ifndef, #else, and #endif in the C-preprocessor,
744751
just not as general.
745752
Each of these directives must begin at the left margin. No whitespace
746753
is allowed between the "%" and the directive name.</p>
@@ -749,12 +756,22 @@ <h4>The <tt>%ifdef</tt>, <tt>%ifndef</tt>, and <tt>%endif</tt> directives</h4>
749756
"<tt>%endif</tt>" is
750757
ignored unless the "-DMACRO" command-line option is used. Grammar text
751758
betwen "<tt>%ifndef MACRO</tt>" and the next nested "<tt>%endif</tt>" is
752-
included except when the "-DMACRO" command-line option is used.</p>
753-
754-
<p>Note that the argument to <tt>%ifdef</tt> and <tt>%ifndef</tt> must
755-
be a single preprocessor symbol name, not a general expression.
756-
There is no "<tt>%else</tt>" directive.</p>
757-
759+
included except when the "-DMACRO" command-line option is used.<p>
760+
761+
<p>The text in between "<tt>%if</tt> <i>CONDITIONAL</i>" and its
762+
corresponding <tt>%endif</tt> is included only if <i>CONDITIONAL</i>
763+
is true. The CONDITION is one or more macro names, optionally connected
764+
using the "||" and "&amp;&amp;" binary operators, the "!" unary operator,
765+
and grouped using balanced parentheses. Each term is true if the
766+
corresponding macro exists, and false if it does not exist.</p>
767+
768+
<p>An optional "<tt>%else</tt>" directive can occur anywhere in between a
769+
<tt>%ifdef</tt>, <tt>%ifndef</tt>, or <tt>%if</tt> directive and
770+
its corresponding <tt>%endif</tt>.</p>
771+
772+
<p>Note that the argument to <tt>%ifdef</tt> and <tt>%ifndef</tt> is
773+
intended to be a single preprocessor symbol name, not a general expression.
774+
Use the "<tt>%if</tt>" directive for general expressions.</p>
758775

759776
<a name='pinclude'></a>
760777
<h4>The <tt>%include</tt> directive</h4>

0 commit comments

Comments
 (0)