Skip to content

Commit 6b86da7

Browse files
committed
Snapshot of upstream SQLite 3.31.0
1 parent e714766 commit 6b86da7

File tree

242 files changed

+11765
-2903
lines changed

Some content is hidden

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

242 files changed

+11765
-2903
lines changed

Makefile.in

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ parse.h: parse.c
10521052

10531053
parse.c: $(TOP)/src/parse.y lemon$(BEXE)
10541054
cp $(TOP)/src/parse.y .
1055-
./lemon$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
1055+
./lemon$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) -S parse.y
10561056

10571057
sqlite3.h: $(TOP)/src/sqlite.h.in $(TOP)/manifest mksourceid$(BEXE) $(TOP)/VERSION
10581058
$(TCLSH_CMD) $(TOP)/tool/mksqlite3h.tcl $(TOP) >sqlite3.h
@@ -1177,10 +1177,10 @@ FTS5_SRC = \
11771177
$(TOP)/ext/fts5/fts5_varint.c \
11781178
$(TOP)/ext/fts5/fts5_vocab.c \
11791179

1180-
fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon
1180+
fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon$(BEXE)
11811181
cp $(TOP)/ext/fts5/fts5parse.y .
11821182
rm -f fts5parse.h
1183-
./lemon$(BEXE) $(OPTS) fts5parse.y
1183+
./lemon$(BEXE) $(OPTS) -S fts5parse.y
11841184

11851185
fts5parse.h: fts5parse.c
11861186

@@ -1242,10 +1242,6 @@ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuz
12421242
./fuzzcheck$(TEXE) $(FUZZDATA)
12431243
./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
12441244

1245-
fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
1246-
./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
1247-
./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
1248-
12491245
valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
12501246
valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
12511247
valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
@@ -1263,7 +1259,7 @@ quicktest: ./testfixture$(TEXE)
12631259
# This is the common case. Run many tests that do not take too long,
12641260
# including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
12651261
#
1266-
test: fastfuzztest sourcetest $(TESTPROGS) tcltest
1262+
test: fuzztest sourcetest $(TESTPROGS) tcltest
12671263

12681264
# Run a test using valgrind. This can take a really long time
12691265
# because valgrind is so much slower than a native machine.

Makefile.msc

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ OPTIMIZATIONS = 2
248248
SESSION = 0
249249
!ENDIF
250250

251+
# Set this to non-0 to enable support for the rbu extension.
252+
#
253+
!IFNDEF RBU
254+
RBU = 0
255+
!ENDIF
256+
251257
# Set the source code file to be used by executables and libraries when
252258
# they need the amalgamation.
253259
#
@@ -364,6 +370,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
364370
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
365371
!ENDIF
366372

373+
# Should the rbu extension be enabled? If so, add compilation options
374+
# to enable it.
375+
#
376+
!IF $(RBU)!=0
377+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1
378+
!ENDIF
379+
367380
# These are the "extended" SQLite compilation options used when compiling for
368381
# the Windows 10 platform.
369382
#
@@ -1742,7 +1755,7 @@ $(SQLITE3DLL): $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
17421755
sqlite3.def: libsqlite3.lib
17431756
echo EXPORTS > sqlite3.def
17441757
dumpbin /all libsqlite3.lib \
1745-
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser)?_[^@]*)(?:@\d+)?$$" \1 \
1758+
| $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@]*)(?:@\d+)?$$" \1 \
17461759
| sort >> sqlite3.def
17471760
# <</block2>>
17481761

@@ -2141,7 +2154,7 @@ parse.h: parse.c
21412154
parse.c: $(TOP)\src\parse.y lemon.exe
21422155
del /Q parse.y parse.h parse.h.temp 2>NUL
21432156
copy $(TOP)\src\parse.y .
2144-
.\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) parse.y
2157+
.\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S parse.y
21452158

21462159
$(SQLITE3H): $(TOP)\src\sqlite.h.in $(TOP)\manifest mksourceid.exe $(TOP)\VERSION
21472160
$(TCLSH_CMD) $(TOP)\tool\mksqlite3h.tcl $(TOP:\=/) > $(SQLITE3H) $(MKSQLITE3H_ARGS)
@@ -2301,7 +2314,7 @@ LSM1_SRC = \
23012314
fts5parse.c: $(TOP)\ext\fts5\fts5parse.y lemon.exe
23022315
copy $(TOP)\ext\fts5\fts5parse.y .
23032316
del /Q fts5parse.h 2>NUL
2304-
.\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) fts5parse.y
2317+
.\lemon.exe $(REQ_FEATURE_FLAGS) $(OPT_FEATURE_FLAGS) $(EXT_FEATURE_FLAGS) $(OPTS) -S fts5parse.y
23052318

23062319
fts5parse.h: fts5parse.c
23072320

@@ -2404,9 +2417,6 @@ queryplantest: testfixture.exe shell
24042417
fuzztest: fuzzcheck.exe
24052418
.\fuzzcheck.exe $(FUZZDATA)
24062419

2407-
fastfuzztest: fuzzcheck.exe
2408-
.\fuzzcheck.exe --limit-mem 100M $(FUZZDATA)
2409-
24102420
# Minimal testing that runs in less than 3 minutes (on a fast machine)
24112421
#
24122422
quicktest: testfixture.exe sourcetest
@@ -2416,7 +2426,7 @@ quicktest: testfixture.exe sourcetest
24162426
# This is the common case. Run many tests that do not take too long,
24172427
# including fuzzcheck, sqlite3_analyzer, and sqldiff tests.
24182428
#
2419-
test: $(TESTPROGS) sourcetest fastfuzztest
2429+
test: $(TESTPROGS) sourcetest fuzztest
24202430
@set PATH=$(LIBTCLPATH);$(PATH)
24212431
.\testfixture.exe $(TOP)\test\veryquick.test $(TESTOPTS)
24222432

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.30.1
1+
3.31.0

autoconf/Makefile.msc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,12 @@ OPTIMIZATIONS = 2
210210
SESSION = 0
211211
!ENDIF
212212

213+
# Set this to non-0 to enable support for the rbu extension.
214+
#
215+
!IFNDEF RBU
216+
RBU = 0
217+
!ENDIF
218+
213219
# Set the source code file to be used by executables and libraries when
214220
# they need the amalgamation.
215221
#
@@ -282,7 +288,6 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_JSON1=1
282288
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_STMTVTAB=1
283289
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBPAGE_VTAB=1
284290
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DBSTAT_VTAB=1
285-
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_INTROSPECTION_PRAGMAS=1
286291
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_DESERIALIZE=1
287292
!ENDIF
288293
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
@@ -296,6 +301,13 @@ OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
296301
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
297302
!ENDIF
298303

304+
# Should the rbu extension be enabled? If so, add compilation options
305+
# to enable it.
306+
#
307+
!IF $(RBU)!=0
308+
OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RBU=1
309+
!ENDIF
310+
299311
# These are the "extended" SQLite compilation options used when compiling for
300312
# the Windows 10 platform.
301313
#
@@ -978,7 +990,7 @@ Replace.exe:
978990
sqlite3.def: Replace.exe $(LIBOBJ)
979991
echo EXPORTS > sqlite3.def
980992
dumpbin /all $(LIBOBJ) \
981-
| .\Replace.exe "^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup|rebaser)?_[^@,]*)(?:@\d+|,DATA)?$$" $$1 true \
993+
| .\Replace.exe "^\s+/EXPORT:_?(sqlite3(?:session|changeset|changegroup|rebaser|rbu)?_[^@,]*)(?:@\d+|,DATA)?$$" $$1 true \
982994
| sort >> sqlite3.def
983995

984996
$(SQLITE3EXE): shell.c $(SHELL_CORE_DEP) $(LIBRESOBJS) $(SHELL_CORE_SRC) $(SQLITE3H)

autoconf/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ AC_ARG_ENABLE(rtree, [AS_HELP_STRING(
161161
[--enable-rtree], [include rtree support [default=yes]])],
162162
[], [enable_rtree=yes])
163163
if test x"$enable_rtree" = "xyes"; then
164-
BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_RTREE"
164+
BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY"
165165
fi
166166
#-----------------------------------------------------------------------
167167

autoconf/tea/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dnl to configure the system for the local environment.
1919
# so you can encode the package version directly into the source files.
2020
#-----------------------------------------------------------------------
2121

22-
AC_INIT([sqlite], [3.7.4])
22+
AC_INIT([sqlite], [3.31.0])
2323

2424
#--------------------------------------------------------------------
2525
# Call TEA_INIT as the first TEA_ macro to set up initial vars.

autoconf/tea/win/makefile.vc

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Please `cd` to its location first.
153153
#
154154
#-------------------------------------------------------------------------
155155

156-
PROJECT = sqlite3
156+
PROJECT = tclsqlite3
157157
!include "rules.vc"
158158

159159
# nmakehelp -V <file> <tag> will search the file for tag, skips until a
@@ -162,18 +162,15 @@ PROJECT = sqlite3
162162

163163
!if [echo REM = This file is generated from Makefile.vc > versions.vc]
164164
!endif
165-
# get project version from row "AC_INIT([sqlite], [3.7.14])"
165+
# get project version from row "AC_INIT([sqlite], [3.x.y])"
166166
!if [echo DOTVERSION = \>> versions.vc] \
167-
&& [nmakehlp -V ..\configure.in AC_INIT >> versions.vc]
167+
&& [nmakehlp -V ..\configure.ac AC_INIT >> versions.vc]
168168
!endif
169169
!include "versions.vc"
170170

171171
VERSION = $(DOTVERSION:.=)
172172
STUBPREFIX = $(PROJECT)stub
173173

174-
DLLOBJS = \
175-
$(TMP_DIR)\tclsqlite3.obj
176-
177174
#-------------------------------------------------------------------------
178175
# Target names and paths ( shouldn't need changing )
179176
#-------------------------------------------------------------------------
@@ -182,7 +179,7 @@ BINROOT = .
182179
ROOT = ..
183180

184181
PRJIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
185-
PRJLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
182+
PRJLIBNAME = $(PROJECT).$(EXT)
186183
PRJLIB = $(OUT_DIR)\$(PRJLIBNAME)
187184

188185
PRJSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
@@ -204,6 +201,17 @@ DOCDIR = $(ROOT)\doc
204201
TOOLSDIR = $(ROOT)\tools
205202
COMPATDIR = $(ROOT)\compat
206203

204+
### Figure out where the primary source code file(s) is/are.
205+
!if exist("$(ROOT)\..\..\sqlite3.c") && exist("$(ROOT)\..\..\src\tclsqlite.c")
206+
SQL_INCLUDES = -I"$(ROOT)\..\.."
207+
SQLITE_SRCDIR = $(ROOT)\..\..
208+
TCLSQLITE_SRCDIR = $(ROOT)\..\..\src
209+
DLLOBJS = $(TMP_DIR)\sqlite3.obj $(TMP_DIR)\tclsqlite.obj
210+
!else
211+
TCLSQLITE_SRCDIR = $(ROOT)\generic
212+
DLLOBJS = $(TMP_DIR)\tclsqlite3.obj
213+
!endif
214+
207215
#---------------------------------------------------------------------
208216
# Compile flags
209217
#---------------------------------------------------------------------
@@ -223,7 +231,7 @@ cdebug = -Z7 -WX -Od -GZ
223231
!endif
224232

225233
### Declarations common to all compiler options
226-
cflags = -nologo -c -W3 -YX -Fp$(TMP_DIR)^\
234+
cflags = -nologo -c -W3 -D_CRT_SECURE_NO_WARNINGS -YX -Fp$(TMP_DIR)^\
227235

228236
!if $(MSVCRT)
229237
!if $(DEBUG)
@@ -239,8 +247,8 @@ crt = -MT
239247
!endif
240248
!endif
241249

242-
INCLUDES = $(TCL_INCLUDES) -I"$(WINDIR)" -I"$(GENERICDIR)" \
243-
-I"$(ROOT)\.."
250+
INCLUDES = $(SQL_INCLUDES) $(TCL_INCLUDES) -I"$(WINDIR)" \
251+
-I"$(GENERICDIR)" -I"$(ROOT)\.."
244252
BASE_CLFAGS = $(cflags) $(cdebug) $(crt) $(INCLUDES) \
245253
-DSQLITE_3_SUFFIX_ONLY=1 -DSQLITE_ENABLE_RTREE=1 \
246254
-DSQLITE_ENABLE_FTS3=1 -DSQLITE_OMIT_DEPRECATED=1
@@ -341,20 +349,17 @@ $(PRJSTUBLIB): $(PRJSTUBOBJS)
341349
# Implicit rules
342350
#---------------------------------------------------------------------
343351

344-
{$(WINDIR)}.c{$(TMP_DIR)}.obj::
345-
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
346-
$<
347-
<<
352+
$(TMP_DIR)\sqlite3.obj: $(SQLITE_SRCDIR)\sqlite3.c
353+
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ \
354+
-c $(SQLITE_SRCDIR)\sqlite3.c
348355

349-
{$(GENERICDIR)}.c{$(TMP_DIR)}.obj::
350-
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
351-
$<
352-
<<
356+
$(TMP_DIR)\tclsqlite.obj: $(TCLSQLITE_SRCDIR)\tclsqlite.c
357+
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ \
358+
-c $(TCLSQLITE_SRCDIR)\tclsqlite.c
353359

354-
{$(COMPATDIR)}.c{$(TMP_DIR)}.obj::
355-
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ @<<
356-
$<
357-
<<
360+
$(TMP_DIR)\tclsqlite3.obj: $(TCLSQLITE_SRCDIR)\tclsqlite3.c
361+
$(cc32) $(TCL_CFLAGS) -DBUILD_$(PROJECT) -Fo$(TMP_DIR)\ \
362+
-c $(TCLSQLITE_SRCDIR)\tclsqlite3.c
358363

359364
{$(WINDIR)}.rc{$(TMP_DIR)}.res:
360365
$(rc32) -fo $@ -r -i "$(GENERICDIR)" -D__WIN32__ \

0 commit comments

Comments
 (0)