Skip to content

Commit 1032c43

Browse files
committed
Merge sqlite-release(3.39.2) into prerelease-integration
2 parents 7264390 + a6c0401 commit 1032c43

File tree

174 files changed

+61291
-2201
lines changed

Some content is hidden

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

174 files changed

+61291
-2201
lines changed

Makefile.in

Lines changed: 134 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ TESTSRC2 = \
525525
$(TOP)/src/pcache1.c \
526526
$(TOP)/src/select.c \
527527
$(TOP)/src/tokenize.c \
528+
$(TOP)/src/treeview.c \
528529
$(TOP)/src/utf.c \
529530
$(TOP)/src/util.c \
530531
$(TOP)/src/vdbeapi.c \
@@ -652,7 +653,7 @@ FUZZCHECK_OPT += -DSQLITE_ENABLE_RTREE
652653
FUZZCHECK_OPT += -DSQLITE_ENABLE_GEOPOLY
653654
FUZZCHECK_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
654655
FUZZCHECK_OPT += -DSQLITE_ENABLE_BYTECODE_VTAB
655-
FUZZCHECK_SRC = $(TOP)/test/fuzzcheck.c $(TOP)/test/ossfuzz.c
656+
FUZZCHECK_SRC = $(TOP)/test/fuzzcheck.c $(TOP)/test/ossfuzz.c $(TOP)/test/fuzzinvariants.c
656657
DBFUZZ_OPT =
657658

658659
# This is the default Makefile target. The objects listed here
@@ -911,7 +912,7 @@ hash.lo: $(TOP)/src/hash.c $(HDR)
911912
insert.lo: $(TOP)/src/insert.c $(HDR)
912913
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/insert.c
913914

914-
json.lo: $(TOP)/src/json.c
915+
json.lo: $(TOP)/src/json.c $(HDR)
915916
$(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/json.c
916917

917918
legacy.lo: $(TOP)/src/legacy.c $(HDR)
@@ -1549,3 +1550,134 @@ sqlite3.def: $(REAL_LIBOBJ)
15491550
sqlite3.dll: $(REAL_LIBOBJ) sqlite3.def
15501551
$(TCC) -shared -o $@ sqlite3.def \
15511552
-Wl,"--strip-all" $(REAL_LIBOBJ)
1553+
1554+
1555+
#
1556+
# fiddle/wasm section
1557+
#
1558+
fiddle_dir = ext/fiddle
1559+
fiddle_dir_abs = $(TOP)/$(fiddle_dir)
1560+
# ^^^ some emcc opts require absolute paths
1561+
fiddle_html = $(fiddle_dir)/fiddle.html
1562+
fiddle_module_js = $(fiddle_dir)/fiddle-module.js
1563+
sqlite3_wasm_js = $(fiddle_dir)/sqlite3.js
1564+
sqlite3_wasm = $(fiddle_dir)/sqlite3.wasm
1565+
#emcc_opt = -O0
1566+
#emcc_opt = -O1
1567+
#emcc_opt = -O2
1568+
#emcc_opt = -O3
1569+
emcc_opt = -Oz
1570+
emcc_flags = $(emcc_opt) -sALLOW_TABLE_GROWTH -sSTRICT_JS \
1571+
-sENVIRONMENT=web -sMODULARIZE \
1572+
-sEXPORTED_RUNTIME_METHODS=@$(fiddle_dir_abs)/EXPORTED_RUNTIME_METHODS \
1573+
-sDYNAMIC_EXECUTION=0 \
1574+
-I. $(SHELL_OPT)
1575+
$(fiddle_module_js): Makefile sqlite3.c shell.c \
1576+
$(fiddle_dir)/EXPORTED_RUNTIME_METHODS \
1577+
$(fiddle_dir)/EXPORTED_FUNCTIONS.fiddle
1578+
emcc -o $@ $(emcc_flags) \
1579+
-sEXPORT_NAME=initFiddleModule \
1580+
-sEXPORTED_FUNCTIONS=@$(fiddle_dir_abs)/EXPORTED_FUNCTIONS.fiddle \
1581+
sqlite3.c shell.c
1582+
gzip < $@ > $@.gz
1583+
gzip < $(fiddle_dir)/fiddle-module.wasm > $(fiddle_dir)/fiddle-module.wasm.gz
1584+
$(sqlite3_wasm_js): Makefile sqlite3.c \
1585+
$(fiddle_dir)/sqlite3-api.js \
1586+
$(fiddle_dir)/EXPORTED_RUNTIME_METHODS \
1587+
$(fiddle_dir)/EXPORTED_FUNCTIONS.sqlite3-api
1588+
emcc -o $@ $(emcc_flags) \
1589+
-sEXPORT_NAME=initSqlite3Module \
1590+
-sEXPORTED_FUNCTIONS=@$(fiddle_dir_abs)/EXPORTED_FUNCTIONS.sqlite3-api \
1591+
--post-js=$(fiddle_dir)/sqlite3-api.js \
1592+
--no-entry \
1593+
sqlite3.c
1594+
gzip < $@ > $@.gz
1595+
gzip < $(sqlite3_wasm) > $(sqlite3_wasm).gz
1596+
gzip < $(fiddle_dir)/sqlite3-api.js > $(fiddle_dir)/sqlite3-api.js.gz
1597+
$(fiddle_dir)/fiddle.js.gz: $(fiddle_dir)/fiddle.js
1598+
gzip < $< > $@
1599+
$(fiddle_dir)/sqlite3-api.js.gz: $(fiddle_dir)/sqlite3-api.js
1600+
gzip < $< > $@
1601+
1602+
fiddle_generated = $(fiddle_module_js) $(fiddle_module_js).gz \
1603+
$(fiddle_dir)/fiddle-module.wasm \
1604+
$(fiddle_dir)/fiddle-module.wasm.gz \
1605+
$(fiddle_dir)/fiddle.js.gz
1606+
sqlite3_wasm_generated = \
1607+
$(sqlite3_wasm) $(sqlite3_wasm).gz \
1608+
$(sqlite3_wasm_js) $(sqlite3_wasm_js).gz \
1609+
$(fiddle_dir)/sqlite3.js.gz \
1610+
$(fiddle_dir)/sqlite3-api.js.gz
1611+
1612+
clean-wasm:
1613+
rm -f $(fiddle_generated) $(sqlite3_wasm_generated)
1614+
clean: clean-wasm
1615+
fiddle: $(fiddle_module_js) $(fiddle_dir)/fiddle.js.gz
1616+
sqlite3-wasm: $(sqlite3_wasm_js)
1617+
wasm: fiddle sqlite3-wasm
1618+
########################################################################
1619+
# Explanation of the emcc build flags follows. Full docs for these can
1620+
# be found at:
1621+
#
1622+
# https://github.com/emscripten-core/emscripten/blob/main/src/settings.js
1623+
#
1624+
# -sENVIRONMENT=web: elides bootstrap code related to non-web JS
1625+
# environments like node.js. Removing this makes the output a tiny
1626+
# tick larger but hypothetically makes it more portable to
1627+
# non-browser JS environments.
1628+
#
1629+
# -sMODULARIZE: changes how the generated code is structured to avoid
1630+
# declaring a global Module object and instead installing a function
1631+
# which loads and initialized the module. The function is named...
1632+
#
1633+
# -sEXPORT_NAME=jsFunctionName (see -sMODULARIZE)
1634+
#
1635+
# -sEXPORTED_RUNTIME_METHODS=@/absolute/path/to/file: a file
1636+
# containing a list of emscripten-supplied APIs, one per line, which
1637+
# must be exported into the generated JS. Must be an absolute path!
1638+
#
1639+
# -sEXPORTED_FUNCTIONS=@/absolute/path/to/file: a file containing a
1640+
# list of C functions, one per line, which must be exported via wasm
1641+
# so they're visible to JS. C symbols names in that file must all
1642+
# start with an underscore for reasons known only to the emcc
1643+
# developers. e.g., _sqlite3_open_v2 and _sqlite3_finalize. Must be
1644+
# an absolute path!
1645+
#
1646+
# -sSTRICT_JS ensures that the emitted JS code includes the 'use
1647+
# strict' option. Note that -sSTRICT is more broadly-scoped and
1648+
# results in build errors.
1649+
#
1650+
# -sALLOW_TABLE_GROWTH is required for (at a minimum) the UDF-binding
1651+
# feature.
1652+
#
1653+
# -sDYNAMIC_EXECUTION=0 disables eval() and the Function constructor.
1654+
# If the build runs without these, it's preferable to use this flag
1655+
# because certain execution environments disallow those constructs.
1656+
# This flag is not strictly necessary, however.
1657+
#
1658+
# -sWASM_BIGINT is UNTESTED but "should" allow the int64-using C APIs
1659+
# to work with JS/wasm, insofar as the JS environment supports the
1660+
# BigInt type. That support requires an extremely recent browser:
1661+
# Safari didn't get that support until late 2020.
1662+
#
1663+
# --no-entry: for compiling library code with no main(). If this is
1664+
# not supplied and the code has a main(), it is called as part of the
1665+
# module init process. Note that main() is #if'd out of shell.c
1666+
# (renamed) when building in wasm mode.
1667+
#
1668+
# --pre-js/--post-js=FILE relative or absolute paths to JS files to
1669+
# prepend/append to the emcc-generated bootstrapping JS. It's
1670+
# easier/faster to develop with separate JS files (reduces rebuilding
1671+
# requirements) but certain configurations, namely -sMODULARIZE, may
1672+
# require using at least a --pre-js file. They can be used
1673+
# individually and need not be paired.
1674+
#
1675+
# -O0..-O3 and -Oz: optimization levels affect not only C-style
1676+
# optimization but whether or not the resulting generated JS code
1677+
# gets minified. -O0 compiles _much_ more quickly than -O3 or -Oz,
1678+
# and doesn't minimize any JS code, so is recommended for
1679+
# development. -O3 or -Oz are recommended for deployment, but
1680+
# primarily because -Oz will shrink the wasm file notably. JS-side
1681+
# minification makes little difference in terms of overall
1682+
# distributable size.
1683+
########################################################################

Makefile.msc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_GEOPOLY
17131713
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_DBSTAT_VTAB
17141714
FUZZCHECK_OPTS = $(FUZZCHECK_OPTS) -DSQLITE_ENABLE_BYTECODE_VTAB
17151715

1716-
FUZZCHECK_SRC = $(TOP)\test\fuzzcheck.c $(TOP)\test\ossfuzz.c
1716+
FUZZCHECK_SRC = $(TOP)\test\fuzzcheck.c $(TOP)\test\ossfuzz.c $(TOP)\test\fuzzinvariants.c
17171717
OSSSHELL_SRC = $(TOP)\test\ossshell.c $(TOP)\test\ossfuzz.c
17181718
DBFUZZ_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION
17191719
KV_COMPILE_OPTS = -DSQLITE_THREADSAFE=0 -DSQLITE_DIRECT_OVERFLOW_READ

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
162162

163163
<h1 align="center">SQLite Source Repository</h1>
164164

165-
This repository contains the complete source code for the
166-
[SQLite database engine](https://sqlite.org/). Some test scripts
165+
This repository contains the complete source code for the
166+
[SQLite database engine](https://sqlite.org/). Some test scripts
167167
are also included. However, many other test scripts
168168
and most of the documentation are managed separately.
169169

@@ -177,7 +177,7 @@ The [Fossil repository](https://sqlite.org/src/timeline) contains the urtext.
177177
If you are reading this on GitHub or some other Git repository or service,
178178
then you are looking at a mirror. The names of check-ins and
179179
other artifacts in a Git mirror are different from the official
180-
names for those objects. The offical names for check-ins are
180+
names for those objects. The official names for check-ins are
181181
found in a footer on the check-in comment for authorized mirrors.
182182
The official check-in name can also be seen in the `manifest.uuid` file
183183
in the root of the tree. Always use the official name, not the
@@ -192,7 +192,7 @@ verify its integrity, there are hints on how to do that in the
192192
If you do not want to use Fossil, you can download tarballs or ZIP
193193
archives or [SQLite archives](https://sqlite.org/cli.html#sqlar) as follows:
194194

195-
* Lastest trunk check-in as
195+
* Latest trunk check-in as
196196
[Tarball](https://www.sqlite.org/src/tarball/sqlite.tar.gz),
197197
[ZIP-archive](https://www.sqlite.org/src/zip/sqlite.zip), or
198198
[SQLite-archive](https://www.sqlite.org/src/sqlar/sqlite.sqlar).
@@ -209,11 +209,11 @@ archives or [SQLite archives](https://sqlite.org/cli.html#sqlar) as follows:
209209
then click on the "Tarball" or "ZIP Archive" links on the information
210210
page.
211211

212-
If you do want to use Fossil to check out the source tree,
212+
If you do want to use Fossil to check out the source tree,
213213
first install Fossil version 2.0 or later.
214214
(Source tarballs and precompiled binaries available
215215
[here](https://www.fossil-scm.org/fossil/uv/download.html). Fossil is
216-
a stand-alone program. To install, simply download or build the single
216+
a stand-alone program. To install, simply download or build the single
217217
executable file and put that file someplace on your $PATH.)
218218
Then run commands like this:
219219

@@ -223,7 +223,7 @@ Then run commands like this:
223223
fossil open ~/Fossils/sqlite.fossil
224224

225225
After setting up a repository using the steps above, you can always
226-
update to the lastest version using:
226+
update to the latest version using:
227227

228228
fossil update trunk ;# latest trunk check-in
229229
fossil update release ;# latest official release
@@ -298,7 +298,7 @@ the "tclsqlite.c" file which implements the
298298
extension and only later escaped to the wild as an independent library.)
299299

300300
Test scripts and programs are found in the **test/** subdirectory.
301-
Addtional test code is found in other source repositories.
301+
Additional test code is found in other source repositories.
302302
See [How SQLite Is Tested](http://www.sqlite.org/testing.html) for
303303
additional information.
304304

@@ -332,7 +332,7 @@ at just the right spots. Note that comment text in the sqlite3.h file is
332332
used to generate much of the SQLite API documentation. The Tcl scripts
333333
used to generate that documentation are in a separate source repository.
334334

335-
The SQL language parser is **parse.c** which is generate from a grammar in
335+
The SQL language parser is **parse.c** which is generated from a grammar in
336336
the src/parse.y file. The conversion of "parse.y" into "parse.c" is done
337337
by the [lemon](./doc/lemon.html) LALR(1) parser generator. The source code
338338
for lemon is at tool/lemon.c. Lemon uses the tool/lempar.c file as a
@@ -342,7 +342,7 @@ generates parse.c.
342342

343343
The **opcodes.h** header file contains macros that define the numbers
344344
corresponding to opcodes in the "VDBE" virtual machine. The opcodes.h
345-
file is generated by the scanning the src/vdbe.c source file. The
345+
file is generated by scanning the src/vdbe.c source file. The
346346
Tcl script at ./mkopcodeh.tcl does this scan and generates opcodes.h.
347347
A second Tcl script, ./mkopcodec.tcl, then scans opcodes.h to generate
348348
the **opcodes.c** source file, which contains a reverse mapping from
@@ -399,7 +399,7 @@ prepared statements, the description of
399399
[how transactions work](http://www.sqlite.org/atomiccommit.html), and
400400
the [overview of the query planner](http://www.sqlite.org/optoverview.html).
401401

402-
Years of effort have gone into optimizating SQLite, both
402+
Years of effort have gone into optimizing SQLite, both
403403
for small size and high performance. And optimizations tend to result in
404404
complex code. So there is a lot of complexity in the current SQLite
405405
implementation. It will not be the easiest library in the world to hack.
@@ -456,11 +456,11 @@ Key files:
456456
building the "testfixture.exe" program. The testfixture.exe program is
457457
an enhanced Tcl shell. The testfixture.exe program runs scripts in the
458458
test/ folder to validate the core SQLite code. The testfixture program
459-
(and some other test programs too) is build and run when you type
459+
(and some other test programs too) is built and run when you type
460460
"make test".
461461

462462
* **ext/misc/json1.c** - This file implements the various JSON functions
463-
that are build into SQLite.
463+
that are built into SQLite.
464464

465465
There are many other source files. Each has a succinct header comment that
466466
describes its purpose and role within the larger system.
@@ -469,7 +469,7 @@ describes its purpose and role within the larger system.
469469
## Verifying Code Authenticity
470470

471471
The `manifest` file at the root directory of the source tree
472-
contains either a SHA3-256 hash (for newer files) or a SHA1 hash (for
472+
contains either a SHA3-256 hash (for newer files) or a SHA1 hash (for
473473
older files) for every source file in the repository.
474474
The name of the version of the entire source tree is just the
475475
SHA3-256 hash of the `manifest` file itself, possibly with the

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.38.5
1+
3.39.2

configure

Lines changed: 9 additions & 9 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 sqlcipher 3.38.5.
3+
# Generated by GNU Autoconf 2.69 for sqlcipher 3.39.2.
44
#
55
#
66
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
587587
# Identity of this package.
588588
PACKAGE_NAME='sqlcipher'
589589
PACKAGE_TARNAME='sqlcipher'
590-
PACKAGE_VERSION='3.38.5'
591-
PACKAGE_STRING='sqlcipher 3.38.5'
590+
PACKAGE_VERSION='3.39.2'
591+
PACKAGE_STRING='sqlcipher 3.39.2'
592592
PACKAGE_BUGREPORT=''
593593
PACKAGE_URL=''
594594

@@ -1352,7 +1352,7 @@ if test "$ac_init_help" = "long"; then
13521352
# Omit some internal or obsolete options to make the list less imposing.
13531353
# This message is too long to be a string in the A/UX 3.1 sh.
13541354
cat <<_ACEOF
1355-
\`configure' configures sqlcipher 3.38.5 to adapt to many kinds of systems.
1355+
\`configure' configures sqlcipher 3.39.2 to adapt to many kinds of systems.
13561356
13571357
Usage: $0 [OPTION]... [VAR=VALUE]...
13581358
@@ -1418,7 +1418,7 @@ fi
14181418

14191419
if test -n "$ac_init_help"; then
14201420
case $ac_init_help in
1421-
short | recursive ) echo "Configuration of sqlcipher 3.38.5:";;
1421+
short | recursive ) echo "Configuration of sqlcipher 3.39.2:";;
14221422
esac
14231423
cat <<\_ACEOF
14241424
@@ -1558,7 +1558,7 @@ fi
15581558
test -n "$ac_init_help" && exit $ac_status
15591559
if $ac_init_version; then
15601560
cat <<\_ACEOF
1561-
sqlcipher configure 3.38.5
1561+
sqlcipher configure 3.39.2
15621562
generated by GNU Autoconf 2.69
15631563
15641564
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1977,7 +1977,7 @@ cat >config.log <<_ACEOF
19771977
This file contains any messages produced by compilers while
19781978
running configure, to aid debugging if configure makes a mistake.
19791979
1980-
It was created by sqlcipher $as_me 3.38.5, which was
1980+
It was created by sqlcipher $as_me 3.39.2, which was
19811981
generated by GNU Autoconf 2.69. Invocation command line was
19821982
19831983
$ $0 $@
@@ -14019,7 +14019,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1401914019
# report actual input values of CONFIG_FILES etc. instead of their
1402014020
# values after options handling.
1402114021
ac_log="
14022-
This file was extended by sqlcipher $as_me 3.38.5, which was
14022+
This file was extended by sqlcipher $as_me 3.39.2, which was
1402314023
generated by GNU Autoconf 2.69. Invocation command line was
1402414024
1402514025
CONFIG_FILES = $CONFIG_FILES
@@ -14085,7 +14085,7 @@ _ACEOF
1408514085
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1408614086
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1408714087
ac_cs_version="\\
14088-
sqlcipher config.status 3.38.5
14088+
sqlcipher config.status 3.39.2
1408914089
configured by $0, generated by GNU Autoconf 2.69,
1409014090
with options \\"\$ac_cs_config\\"
1409114091
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_fiddle_exec
2+
_fiddle_interrupt
3+
_fiddle_experiment
4+
_fiddle_the_db
5+
_fiddle_db_arg
6+
_fiddle_db_filename
7+
_fiddle_reset_db

0 commit comments

Comments
 (0)