Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
356 commits
Select commit Hold shift + click to select a range
27a7770
More aggressive optimization of IS NULL and IS NOT NULL operators in
Dec 3, 2025
2121fc4
Fix an incorrect answer that might arise if a scalar query is both
Dec 4, 2025
5ef150c
Merge all the latest trunk enhancements and fixes into the temp-trigg…
Dec 4, 2025
fa7abfd
Performance optimization in the language grammar.
Dec 4, 2025
3749e75
Fix an error introduced by the previous check-in.
Dec 4, 2025
001f36f
Mark an always-true conditional as such.
Dec 4, 2025
72e5412
Enable TEMP triggers to reference tables in the main schema.
Dec 4, 2025
5192fec
Limit compile time value SQLITE_MAX_SQL_LENGTH to 1024 less than 2^31…
Dec 4, 2025
2087fa2
Make the shell_exec() routine in the CLI robust against NULL SQL text.
Dec 4, 2025
49cde92
Automatically add the /NODEFAULTLIB:msvcrt flag to the Makefile.msc s…
Dec 4, 2025
959e49c
Update the autoconf Makefile.msc based on the Makefile.msc changes in…
Dec 5, 2025
38ba1ad
Another fix to [e33da6d5dc964db8]: Ensure that the EXISTS-to-JOIN break
Dec 5, 2025
e1a2674
Enhance the unixIsSharingShmNode() code (check-in [6385a1962c69c69c])
Dec 5, 2025
14706ff
Minor adjustment to the zipfile.test script so that it works on Windows.
Dec 5, 2025
8da9711
Omit obsolete features (Ex: Windows Phone support) from the Windows
Dec 5, 2025
1af2607
Fix a memory leak in the fileio extension on windows.
Dec 5, 2025
989e893
In the Windows Makefile.msc, never set -DNDEBUG. And add the "env" t…
Dec 5, 2025
a3647d1
When drawing boxes using QRF, use rounded corners and use a double-li…
Dec 5, 2025
cff6696
New text rendering style of QRF_TEXT_Relaxed.
Dec 6, 2025
5fb9d59
Update test cases to work with the new box format and with --quote re…
Dec 6, 2025
4ddf151
New test cases to cover the "--quote relaxed" feature.
Dec 6, 2025
4ccd611
Fix typos and harmless compiler warnings. Omit the use of ctypes.h i…
Dec 6, 2025
6cc0da6
Fox the "box" format, use rounded corners and use a double-line to se…
Dec 6, 2025
97b5c8c
Fix a harmless compiler warning inside an assert() in FTS3.
Dec 6, 2025
4a33eed
Remove #ifdefs intended to make SQLite compatible with Windows RT. W…
Dec 6, 2025
5a05c59
In the zipfile extension, only return as many bytes as Inflate actually
Dec 6, 2025
ee9f4ac
Do not return too many bytes from the zipfile extension given a malfo…
Dec 6, 2025
1241fe1
Minor tweaks to the QRF documentation. No changes to code.
Dec 7, 2025
50ef2f7
Replace some double-quotes with single quotes an SQL doc snippet in t…
Dec 8, 2025
91479c6
Introducing kvvfs v2 for the JS bindings. Summary: no longer hard-cod…
Dec 8, 2025
567dcbb
Update the added-in-version stamp to some kvvfs JS APIs.
Dec 8, 2025
b4f6c09
In fts5, avoid holding an open blob handle after an INSERT/UPDATE/DEL…
Dec 9, 2025
9bf37cc
Add the nTitleLimit option to QRF. Also change "line" style so that it
Dec 10, 2025
1debc25
Test cases and documentation tweaks.
Dec 10, 2025
9d5f007
Do not show the --titlelimit setting in ".mode" setting output unless -v
Dec 10, 2025
2f2b5d7
Add the --titlelimit option to CLI, defaulting to 20. In "line" mode of
Dec 10, 2025
3262f76
In fiddle, remove the default .dot-commands it runs, as they do not r…
Dec 10, 2025
85fb541
Various improvements to the .mode command of the CLI, and especially …
Dec 10, 2025
c0160fa
Use macros for the default values for QRF limits in the CLI, rather than
Dec 10, 2025
9334b9f
Fix calls to sqlite3_wal_checkpoint_v2(SQLITE_CHECKPOINT_NOOP) so tha…
Dec 11, 2025
e29acd7
Adjust the MSVC Makefile so that when it invokes the zlib makefile, it
Dec 11, 2025
b304b0d
Update build instructions for Windows to explain how to link against
Dec 11, 2025
c2cd606
Prevent a malicious delta from causing an integer overflow in the
Dec 11, 2025
5eba66a
Include the latest Makefile.msc changes and the new "make.bat" script
Dec 12, 2025
63f1fb4
Fix an inaccuracy in the qrfRelaxable() routine in QRF when the input is
Dec 12, 2025
462289d
Remove from os_win.c a reference to unused system call CreateEventExW…
Dec 12, 2025
48915e7
Omit unused entries in the aSysCall array for the Windows driver. Fix
Dec 12, 2025
d031267
Add new assert() statements designed to detect and prevent the kind
Dec 12, 2025
4f3ab29
Get the .testcase and .check commands working in the CLI.
Dec 12, 2025
ce43bf8
Back out the --compat option from the CLI.
Dec 13, 2025
5266818
In the CLI, if a command-line argument names a file and the filename …
Dec 13, 2025
76f1fe2
Use the correct wildcard character in sqlite3_strlike() in the previous
Dec 13, 2025
e2bb4cf
Enable an ORDER BY clause to refer to columns in outer queries.
Dec 15, 2025
586a649
Fix the test/vt100-a.sql script to use .testcase and .check.
Dec 15, 2025
22546e1
Clarify the affect of nCharLimit, nLineLimit, and nTitleLimit on the
Dec 15, 2025
9760124
Enhance the vtablog extension so that it shows the value of
Dec 15, 2025
a1dbb7a
Fix for optimizing "SELECT DISTINCT ...cols... FROM vtab" in cases wh…
Dec 15, 2025
28ec7be
Stricter enforcement of the LIKE_PATTERN_LENGTH for the regexp extens…
Dec 16, 2025
6c26b5d
CLI improvements. In the .check command, ignore leading and trailing
Dec 16, 2025
93ecf30
CLI: The .imposter command matches the index name regardless of case.
Dec 16, 2025
89bc8e8
Fix a FILE* leak in the CLI
Dec 17, 2025
6c2f5da
Fix the return value of sqlite3_vtab_distinct() in cases where a virt…
Dec 17, 2025
93c6b19
Enhance the vt02.c test virtual table with the ability to process
Dec 18, 2025
1b7b756
Enhance the sqlite3_load_extension() so that when the entry point is
Dec 18, 2025
4461335
Better orderByConsumed logic in the vt02.c test virtual table.
Dec 18, 2025
ce46f82
Improve tests in bestindexF.test. No changes to non-test code.
Dec 18, 2025
ae66a8d
New options for vt02.c that allow tests to configure it to partially
Dec 18, 2025
65bc1f0
Allow queries that use "GROUP BY e1 ORDER BY e2" where e1 and e2 are …
Dec 18, 2025
683c563
Bug fix in the vt02.c test virtual table.
Dec 18, 2025
174dabe
Add experimental compile-time option SQLITE_ALLOW_TRIGGERS_ON_SYSTEM_…
Dec 19, 2025
19a3f74
Remove unused thunk cases from os_win.c, so that it will (hopefully) …
Dec 22, 2025
3b81f93
Fix a harmless signed integer overflow warning in the ieee754() exten…
Dec 22, 2025
8d41b94
Fix spurious error log reports caused by [d25c8a6222d4e3f2]. See
Dec 22, 2025
add73c8
Add the SQLITE_PREPARE_FROM_DDL flag to sqlite3_prepare_v3(). Use thi…
Dec 22, 2025
766389b
API documentation enhancements.
Dec 22, 2025
8511ee1
Harmless typo fixes in shell.c
Dec 23, 2025
f256886
Fix the ".schema" command in the CLI so that it works on builds that
Dec 23, 2025
337fce8
Additional changes to support the ".schema" command on builds that omit
Dec 23, 2025
683df60
Enhance the omit-noop-join optimization so that it is able to omit a
Dec 24, 2025
91d0ffa
Doc typo fixes in the configure script pieces.
Dec 24, 2025
4056656
To ensure that the sqlite3_hard_heap_limit() call it makes is effecti…
Dec 26, 2025
7f56d23
Work around the Windows "Worst-Fit" bug in the "sqldiff.exe" program.
Dec 26, 2025
35f37ec
Change a single integer variable to 64-bit in the tokenizer to avoid
Dec 27, 2025
38c8014
Improvements to the .import command of the CLI.
Dec 28, 2025
c00c0a8
If the filename argument to the .import command is of the form
Dec 28, 2025
6693e78
Test cases for .import, as well as minor enhancements to .import and …
Dec 28, 2025
ce36ccc
Fix the "testfixture" makefile target so that it builds with a static…
Dec 29, 2025
bd91ba7
Update to the unix build documentation.
Dec 29, 2025
7dfb143
Incremental improvements to .import, and new test cases.
Dec 29, 2025
fb795db
Fix error messages associated with .import, along with corresponding
Dec 29, 2025
9924b07
Fix the new .import logic in the CLI so that it honors ".bail on".
Dec 29, 2025
6e92494
Avoid signed integer overflow when an fts5 'merge' command is passed …
Dec 30, 2025
01f2907
Fix the change on this branch so that it works with amalgamation builds.
Dec 30, 2025
918efe3
Avoid signed integer overflow when an fts5 'merge' command is passed …
Dec 30, 2025
02ceb91
Improved handling of the process entry point in Windows, to translate
Dec 30, 2025
9f44bc5
Add missing free() to winmain.c
Dec 30, 2025
d32e21a
Fix the output from the (undocumented) --test-argv option of the CLi so
Dec 30, 2025
03380a5
Fix a typo in [0819fe670f9ceec7] that lead to incomplete protection a…
Dec 31, 2025
f8bd7df
Use sqlite3_malloc64() in all places in the compress.c extension to a…
Dec 31, 2025
31f6052
Fix test/shellB.test so that it works under Device-One. Also bring the
Dec 31, 2025
634a915
Enhance testrunner.tcl so that it can always be run from an ordinary …
Dec 31, 2025
d964b8c
Add the new "retest" command to testrunner.tcl, which reruns any test…
Dec 31, 2025
6789770
Use 64-bit integers to track memory allocation sizes in the CSV exten…
Dec 31, 2025
02e38b4
In the (completely unused, as far as I know) btreeinfo.c extension (not
Dec 31, 2025
f395df1
The header setting from the legacy ".headers" dot-command takes prece…
Dec 31, 2025
db4d894
Verify the effect of "--titles on" in the "insert" mode in the CLI.
Dec 31, 2025
6e8afa7
Updates to the testrunner documentation.
Jan 1, 2026
b0a1ed2
Further improvements to testrunner.tcl documentation.
Jan 1, 2026
2b112e0
Change the shelltest target on the windows makefile to use testrunner…
Jan 2, 2026
a0cc06b
Ensure that loops created by the exists-to-join optimization use uniq…
Jan 2, 2026
0ed2541
Minor change to an #if in the Windows VFS, which I am told will allow
Jan 2, 2026
904abc8
Fix yet another bug in the [/info/e33da6d5dc964db8|EXISTS-to-JOIN]
Jan 3, 2026
b1e9111
Fix an uninitialized var use reported in [forum:88561a4a1e|forum post…
Jan 4, 2026
bb4428e
Add the experimental tmstmpvfs.c extension that adds a timestamp and …
Jan 5, 2026
55f258b
Update the regexp extension so that the "-" character may be escaped …
Jan 5, 2026
bcf1c8d
Update to the sqlite3_get_clientdata() documentation. No code changes.
Jan 6, 2026
d3c9cce
Enhance the timestamp-vfs prototype so that it also keeps an event log.
Jan 6, 2026
8fe0385
Documentation tweaks.
Jan 6, 2026
242a934
Add the -p or --port option to sqlite3_rsync.
Jan 6, 2026
03c0ac4
Enhance QRF so that it terminates more quickly if it encounters an OOM
Jan 7, 2026
0b5f876
Improvements to logging. Better log-file names. Log files are in a
Jan 7, 2026
ef5d995
Fix the static build.
Jan 7, 2026
bba40a9
Enhance the VACUUM INTO command such that if the target file is a URI
Jan 7, 2026
ad4b08d
Add the --csv option to the "pgidx" option to the "showdb" utility.
Jan 7, 2026
8a2be4b
Add the tmstmpvfs.c extension to trunk. It is not a part of any deli…
Jan 8, 2026
e46b51e
Improve showdb so that it does a better job of handling reserve-bytes.
Jan 8, 2026
c0420cd
Add the showtmlog utility for decoding the tmstmpvfs log files.
Jan 8, 2026
6742970
Do not show LIKE wildcards on table names in the output of the ".schema"
Jan 8, 2026
9f9ee82
Fix ESCALE typo in shell.c, reported in [forum:b8f6a41c8b|forum post …
Jan 8, 2026
c219d30
In the showdb utility, the -tmstmp option works without -csv for the …
Jan 8, 2026
22b0803
Enhance the --vfs command-line option to the CLI such that if the arg…
Jan 8, 2026
92730d2
Fix the --size X flag for speedtest1.html when X=0 and force the job …
Jan 8, 2026
784bcea
Remove an obsolete '32-bit' label from tester1-worker.
Jan 8, 2026
403c153
Minor bug fixes in tmstmpvfs.c, showdb.c, and showtmlog.c.
Jan 8, 2026
cc4a404
Add a missing #if check for SQLITE_OMIT_LOAD_EXTENSION to shell.c.in,…
Jan 8, 2026
5df3efe
Fix an off-by-one error in the page number of ELOG_CKPT_PAGE log
Jan 8, 2026
0a10cdb
Merge all the latest trunk changes into the reset-reserve branch.
Jan 8, 2026
22c99e0
Fix the sqlite3-worker1.mjs (ESM, non-bundler) build and have demo-wo…
Jan 8, 2026
c34d561
Change the name of the log file for tmstmpvfs.c to be an ISO8601 date…
Jan 8, 2026
4b4d072
In the reserve=N query parameter on the VACUUM INTO target file, the
Jan 8, 2026
1d49bbc
Enhance VACUUM INTO so that if a URI filename is used as the target a…
Jan 8, 2026
4b93124
Fix potential OOB read on the undocumented test function rtreenode() …
Jan 9, 2026
0ad6c6c
Fix the wasm snapshot build's zipfile name to include '-snapshot' and…
Jan 9, 2026
aef151a
Add the 'npm' ext/wasm makefile target to create npm-bundle.zip for u…
Jan 9, 2026
644c42f
Fix a help text typo in speedtest1.tcl, pointed out off-list by Brick…
Jan 10, 2026
2f47a58
Update speedtest.md to point out xdg-open on Linux.
Jan 10, 2026
9ab2a2a
wasm: add @preserve tags to two comment blocks (license header and bu…
Jan 11, 2026
428c265
Add the @preserve tag to the standalone file sqlite3-opfs-async-proxy…
Jan 11, 2026
a87d7c0
Add sqlite3_carray_bind() to sqlite3_api_routines. [forum:257e642a4c|…
Jan 11, 2026
6444f69
Improved documentation (in the header comment) for tmstmpvfs.c.
Jan 12, 2026
bc2101b
wasm: filter the custom Module.instantiateWasm() out of node builds, …
Jan 12, 2026
9f78d22
Fix an infinite loop in the sessions module that could occur when pro…
Jan 12, 2026
9a341c1
Avoid unsigned integer overflow in the delta_apply() extension function.
Jan 12, 2026
4b12a38
Fix an OOB read in the sessions module that could occur while process…
Jan 12, 2026
35b9709
Fix integer overflow problems and error reporting memory leaks in
Jan 13, 2026
e5fba7f
Guard against oversized index entries in databases larger than 2GiB.
Jan 14, 2026
abdfd33
Update sessions module so that it takes the db mutex before, instead …
Jan 14, 2026
43eb1d4
Adjust the output of the fuzzcheck test program so that testrunner.tc…
Jan 14, 2026
ce83fd8
Fix a buffer overrun that could occur when deleting rows in secure-de…
Jan 15, 2026
bcc496e
Add extra test for handling corrupt delta records in rbu.
Jan 15, 2026
90942ef
Fix an error in new test script fts5corrupt9.test.
Jan 15, 2026
cd8aee7
Change the copyright on the tool/dbtotxt.c source code file to the
Jan 16, 2026
4dd1a20
The optimization at [8bdda827a3d26800] is incorrect for the case wher…
Jan 16, 2026
9dff6ac
Try to prevent false positives in fuzzinvariants.c due to scalar subq…
Jan 16, 2026
4b9def1
Fix further problems with deleting from corrupt fts5 databases in sec…
Jan 16, 2026
6f3a679
Add new SQL function: json_array_insert(). Suggested in
Jan 17, 2026
4720c16
Raise an error if any PATH argument to json_array_insert() is not the…
Jan 17, 2026
8c4e315
Add two new JSON functions: json_array_insert() and jsonb_array_inser…
Jan 19, 2026
0af76f6
Be more aggressive about using a sort-and-merge to compute the UNION of
Jan 19, 2026
4eb307c
Minor doc touchups in the opfs-sahpool VFS. No functional changes.
Jan 19, 2026
d50161a
wasm: remove the bundler-friend builds from the 'all' target, as they…
Jan 19, 2026
f4a613a
Minor doc updates in mkwasmbuilds.c.
Jan 19, 2026
d4dc275
Add an SQLITE_API_ARMOR check to sqlite3_get_clientdata(), per reques…
Jan 20, 2026
ec13fce
Minor fixes. Tests are passing now.
Jan 20, 2026
bb56ddc
wasm: a potential workaround for cases such as [forum:1eec339854c935b…
Jan 20, 2026
e822005
wasm: make pre-js.c-pp.js a no-op in bundler-friendly builds.
Jan 20, 2026
8159055
Tiny JS doc touchup.
Jan 20, 2026
e66806d
Fix another test case to work with union-by-merge.
Jan 20, 2026
ca0b14a
Update the shell tool to work with SQLITE_OMIT_AUTOINIT builds.
Jan 20, 2026
e702822
Strive to use sort-and-merge for compounds in CTEs.
Jan 20, 2026
2d98df1
Add a new assert().
Jan 21, 2026
e0e67f1
Add a new encoding constant SQLITE_UTF8_ZT, which if used with
Jan 21, 2026
d3285e6
For the ".eqp full" show both the QUERY PLAN and the full byte code, …
Jan 22, 2026
cb3d6d1
Enhance the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] so that
Jan 22, 2026
cc11fb3
Merge the latest trunk enhancements into the utf8-zt branch.
Jan 22, 2026
8fd9136
Add the SQLITE_UTF8_ZT value which can be the encoding argument to
Jan 23, 2026
c460748
Merge the latest trunk enhancements into the union-by-merge branch.
Jan 23, 2026
4057364
Continuing work toward using sort-and-merge for UNION.
Jan 23, 2026
1f567ae
Remove code that is no longer used.
Jan 23, 2026
447fd1b
Fix a minor EXPLAIN QUERY PLAN formatting problem. Remove a NEVER() …
Jan 23, 2026
4b736ce
More code simplifications.
Jan 23, 2026
e4445f0
In the cost metrics of the query planner, the estimated number of out…
Jan 23, 2026
ca77c58
Fix an incorrect assert().
Jan 24, 2026
a5070d0
Expose SQLITE_UTF_ZT to WASM for completeness's sake, but the WASM bu…
Jan 24, 2026
40b6eac
Expound upon the meaning of SQLITE_UTF8_ZT, in an attempt to head off
Jan 24, 2026
fb288a4
Assert() statements added to sqlite3_result_text64() and
Jan 24, 2026
8407504
Remove additional unnecessary code associated with the setup phase of…
Jan 25, 2026
619f1f7
Fix harmless compiler warnings in FTS5.
Jan 25, 2026
46a395f
Additional simplifications to achieve 100% MC/DC.
Jan 25, 2026
8e272dd
Fix the jsonb_group_array() and jsonb_group_object() functions so tha…
Jan 25, 2026
3b440ce
Refactor one function name. Comment improvements. No functional cha…
Jan 25, 2026
33db5b7
The Select.addrOpenEphm field is no longer needed. Remove it and
Jan 25, 2026
9b7005f
Always use the sort-and-merge algorithm for EXCEPT, INTERSECT, and UN…
Jan 25, 2026
713ee08
Fix a possible problem following OOM in a WITH statement.
Jan 26, 2026
840199e
Fix speedtest1.wasm build regression introduced with Emscripten 5.0.0.
Jan 26, 2026
49bf786
Add alternative sqlite3_carray_bind_v2() interface.
Jan 26, 2026
15357aa
Fix the initialization of the sqlite3Api[] constant to conform
Jan 26, 2026
583644e
Improve the comments on the generated byte-code for the merge algorithm.
Jan 26, 2026
8f03e92
Add test for fts3 compress= and uncompress= options.
Jan 26, 2026
e17a469
Enhancements to tmstmpvfs.c: (1) Use the exact same timestamp on log…
Jan 26, 2026
f202df5
Fix frame number computation in the log generated by tmstmpvfs.c.
Jan 27, 2026
389926b
Enhanced documentation in the header comment of tmstmpvfs.c.
Jan 27, 2026
87efa1b
Additional usage notes added to the header comment of the tmstmpvfs.c
Jan 27, 2026
6f8f9fb
Fix trivial buffer overreads in the sessions module that could occur …
Jan 27, 2026
a943c0e
Add the --csv option to the showtmlog utility program.
Jan 27, 2026
b4142c4
For CSV import in the CLI, when the table is created automatically
Jan 27, 2026
f5d29d6
Teach sqlite3_rsync to increment its error count when a child process…
Jan 27, 2026
c4e7964
The tmstmpvfs.c extension should not modify the content of pages goin…
Jan 27, 2026
8362316
Improved byte-code coverage testing verification in the merge algorithm.
Jan 27, 2026
60229c2
Avoid unsigned integer overflow when evaluating an array index in a
Jan 27, 2026
2c49785
Add a comment to sqlite3Stat4Value() explaining that it read a few by…
Jan 28, 2026
fabd481
Improved (faster) bytecode for the merge algorithm.
Jan 28, 2026
bfb33d4
Capture sqlite3_rsync's remote-end result code so the local side can …
Jan 28, 2026
561e28b
kvvfs fix for [https://github.com/sqlite/sqlite-wasm/issues/146|npm t…
Jan 30, 2026
a5cc016
Enhance the CSV import capability in the CLI so that it understands
Jan 30, 2026
1d1cd36
Undo the previous check-in. In its place, add the --escape option to
Jan 30, 2026
4b4df2e
Change the new escape-character mechanism for CSV import so that ther…
Jan 30, 2026
c79b1f7
Fix the new CLI so that the ".eqp" setting does not affect the output…
Jan 30, 2026
4fd4e8f
Make CROSS JOIN a join reorder barrier again, as the SQLite documenta…
Jan 30, 2026
1d8eb1d
Fix a missed optimization opportunity due to a typo in check-in [898b…
Jan 31, 2026
5c8cd31
An experimental query-planner change that reduces the estimated number
Feb 1, 2026
213262f
Enhance the ".timer" command in the CLI to accept the "once" argument…
Feb 1, 2026
1ac0d9b
Add the "--timeout SECONDS" option to the ".progress" command in the …
Feb 1, 2026
71848d3
Update session module test code to correctly use Tcl_Size instead of …
Feb 2, 2026
5b23d02
Merge the latest trunk enhancements into the prune-by-like-glob branch.
Feb 2, 2026
77c5456
Do not reduce the estimated truth probability of LIKE and GLOB operators
Feb 2, 2026
49c70b8
When reducing the truth probability of a LIKE/GLOB constraint, only c…
Feb 2, 2026
3212ab3
Refactor the implementation of this enhancement to keep all the code …
Feb 3, 2026
1131edd
Improved comments on this enhancement. No code changes.
Feb 3, 2026
e541420
Minor change to test/dotcmd01.test so that it works with STAT4.
Feb 3, 2026
7611184
Improve the query planner by reducing the estimated number of output …
Feb 3, 2026
3fab5d2
Fix scanstatus output in QRF so that it shows the total number of cycles
Feb 4, 2026
5e842d0
Render scan-status values with 3 or 4 significant digits only, for
Feb 4, 2026
c9ccd27
Improved display of scan-status estimates.
Feb 4, 2026
b55d6f3
Improved output for ".scanstatus est" in the CLI.
Feb 4, 2026
d0c4a58
Display scanstatus results in neat columns.
Feb 4, 2026
e58c1a9
Fix harmless compiler warning when the CLI is compiled with
Feb 5, 2026
450a900
Do a better job of not generating unnecessary Bloom filters associated
Feb 5, 2026
a0857f3
Improved output from calls to sqlite3ShowSrcList() made from a symbol…
Feb 7, 2026
e45418c
JS doc touchups.
Feb 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
278 changes: 176 additions & 102 deletions Makefile.msc

Large diffs are not rendered by default.

99 changes: 49 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<h1 align="center">SQLite Source Repository</h1>

This repository contains the complete source code for the
[SQLite database engine](https://sqlite.org/), including
many tests. Additional tests and most documentation
[SQLite database engine](https://sqlite.org/) going back
to 2000-05-29. The tree includes many tests and some
documentation, though additional tests and most documentation
are managed separately.

See the [on-line documentation](https://sqlite.org/) for more information
Expand Down Expand Up @@ -99,31 +100,32 @@ script found at the root of the source tree. Then run "make".

For example:

apt install gcc make tcl-dev ;# Make sure you have all the necessary build tools
apt install gcc make tcl-dev ;# Install the necessary build tools
tar xzf sqlite.tar.gz ;# Unpack the source tree into "sqlite"
mkdir bld ;# Build will occur in a sibling directory
mkdir bld ;# Build happens in a sibling directory
cd bld ;# Change to the build directory
../sqlite/configure ;# Run the configure script
make sqlite3 ;# Builds the "sqlite3" command-line tool
make sqlite3.c ;# Build the "amalgamation" source file
make sqldiff ;# Builds the "sqldiff" command-line tool
# Makefile targets below this point require tcl-dev
make tclextension-install ;# Build and install the SQLite TCL extension
make sqlite3 ;# The "sqlite3" command-line tool
make sqlite3.c ;# The "amalgamation" source file
make sqldiff ;# The "sqldiff" command-line tool
#### Targets below require tcl-dev ####
make tclextension-install ;# Install the SQLite TCL extension
make devtest ;# Run development tests
make releasetest ;# Run full release tests
make sqlite3_analyzer ;# Builds the "sqlite3_analyzer" tool

See the makefile for additional targets. For debugging builds, the
core developers typically run "configure" with options like this:

../sqlite/configure --enable-all --enable-debug CFLAGS='-O0 -g'
../sqlite/configure --all --debug CFLAGS='-O0 -g'

For release builds, the core developers usually do:

../sqlite/configure --enable-all
../sqlite/configure --all

Almost all makefile targets require a "tclsh" TCL interpreter version 8.6 or
later. The "tclextension-install" target and the test targets that follow
Core deliverables (sqlite3.c, sqlite3) can be built without a TCL, but
many makefile targets require a "tclsh" TCL interpreter version 8.6
or later. The "tclextension-install" target and the test targets that follow
all require TCL development libraries too. ("apt install tcl-dev"). It is
helpful, but is not required, to install the SQLite TCL extension (the
"tclextension-install" target) prior to running tests. The "releasetest"
Expand All @@ -133,20 +135,20 @@ On "make" command-lines, one can add "OPTIONS=..." to specify additional
compile-time options over and above those set by ./configure. For example,
to compile with the SQLITE_OMIT_DEPRECATED compile-time option, one could say:

./configure --enable-all
./configure --all
make OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3

The configure script uses autoconf 2.61 and libtool. If the configure
script does not work out for you, there is a generic makefile named
"Makefile.linux-gcc" in the top directory of the source tree that you
can copy and edit to suit your needs. Comments on the generic makefile
show what changes are needed.
The configure script uses [autosetup](https://msteveb.github.io/autosetup/).
If the configure script does not work out for you, there is a generic
makefile named "Makefile.linux-gcc" in the top directory of the source tree
that you can copy and edit to suit your needs. Comments on the generic
makefile show what changes are needed.

## Compiling for Windows Using MSVC

On Windows, everything can be compiled with MSVC.
You will also need a working installation of TCL if you want to run tests.
TCL is not required if you just want to build SQLite itself.
You will also need a working installation of TCL if you want to run tests,
though TCL is not required if you just want to build SQLite itself.
See the [compile-for-windows.md](doc/compile-for-windows.md) document for
additional information about how to install MSVC and TCL and configure your
build environment.
Expand All @@ -156,32 +158,33 @@ TCL library, using a command like this:

set TCLDIR=c:\Tcl

SQLite uses "tclsh.exe" as part of the build process, and so that
program will need to be somewhere on your %PATH%. SQLite itself
does not contain any TCL code, but it does use TCL to run tests.
You may need to install TCL development
libraries in order to successfully complete some makefile targets.
It is helpful, but is not required, to install the SQLite TCL extension
(the "tclextension-install" target) prior to running tests.

Build using Makefile.msc. Example:

nmake /f Makefile.msc sqlite3.exe
nmake /f Makefile.msc sqlite3.c
nmake /f Makefile.msc sqldiff.exe
# Makefile targets below this point require TCL development libraries
nmake /f Makefile.msc tclextension-install
nmake /f Makefile.msc devtest
nmake /f Makefile.msc releasetest
nmake /f Makefile.msc sqlite3_analyzer.exe
SQLite itself does not contain any TCL code, but it does use TCL to run
tests. You may need to install TCL development libraries in order to
successfully complete some makefile targets. It is helpful, but is not
required, to install the SQLite TCL extension (the "tclextension-install"
target) prior to running tests.

The source tree contains a "make.bat" file that allows the same "make"
commands of Unix to work on Windows. In the following, you can substitute
"nmake /f Makefile.msc" in place of "make", if you prefer to avoid this BAT
file:

make sqlite3.exe
make sqlite3.c
make sqldiff.exe
#### Targets below require TCL development libraries ####
make tclextension-install
make devtest
make releasetest
make sqlite3_analyzer.exe

There are many other makefile targets. See comments in Makefile.msc for
details.

As with the unix Makefile, the OPTIONS=... argument can be passed on the nmake
command-line to enable new compile-time options. For example:

nmake /f Makefile.msc OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3.exe
make OPTIONS=-DSQLITE_OMIT_DEPRECATED sqlite3.exe

## Source Tree Map

Expand All @@ -194,8 +197,7 @@ command-line to enable new compile-time options. For example:
* **test/** - This directory and its subdirectories contains code used
for testing. Files that end in "`.test`" are TCL scripts that run
tests using an augmented TCL interpreter named "testfixture". Use
a command like "`make testfixture`" (unix) or
"`nmake /f Makefile.msc testfixture.exe`" (windows) to build that
a command like "`make testfixture`" to build that
augmented TCL interpreter, then run individual tests using commands like
"`testfixture test/main.test`". This test/ subdirectory also contains
additional C code modules and scripts for other kinds of testing.
Expand Down Expand Up @@ -377,10 +379,11 @@ implementation. It will not be the easiest library in the world to hack.
(and some other test programs too) is built and run when you type
"make test".

* **VERSION**, **manifest**, and **manifest.uuid** - These files define
the current SQLite version number. The "VERSION" file is human generated,
but the "manifest" and "manifest.uuid" files are automatically generated
by the [Fossil version control system](https://fossil-scm.org/).
* **VERSION**, **manifest**, **manifest.tags**, and **manifest.uuid** -
These files define the current SQLite version number. The "VERSION" file
is human generated, but the "manifest", "manifest.tags", and
"manifest.uuid" files are automatically generated by the
[Fossil version control system](https://fossil-scm.org/).

There are many other source files. Each has a succinct header comment that
describes its purpose and role within the larger system.
Expand All @@ -406,10 +409,6 @@ makefile:

> make verify-source

Or on windows:

> nmake /f Makefile.msc verify-source

Using the makefile to verify source integrity is good for detecting
accidental changes to the source tree, but malicious changes could be
hidden by also modifying the makefiles.
Expand Down
2 changes: 1 addition & 1 deletion autoconf/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ DIST_FILES := \
README.txt VERSION \
auto.def autosetup configure tea \
sqlite3.h sqlite3.c shell.c sqlite3ext.h \
Makefile.in Makefile.msc Makefile.fallback \
Makefile.in Makefile.msc Makefile.fallback make.bat \
sqlite3.rc sqlite3rc.h Replace.cs \
sqlite3.pc.in sqlite3.1

Expand Down
101 changes: 11 additions & 90 deletions autoconf/Makefile.msc
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,6 @@ NO_WARN = $(NO_WARN) -wd4210 -wd4232 -wd4244 -wd4305 -wd4306 -wd4702 -wd4706
!ENDIF
!ENDIF

# Set this non-0 to use the library paths and other options necessary for
# Windows Phone 8.1.
#
!IFNDEF USE_WP81_OPTS
USE_WP81_OPTS = 0
!ENDIF

# Set this non-0 to split the SQLite amalgamation file into chunks to
# be used for debugging with Visual Studio.
#
Expand Down Expand Up @@ -156,14 +149,6 @@ USE_NATIVE_LIBPATHS = 0
USE_RC = 1
!ENDIF

# Set this non-0 to compile binaries suitable for the WinRT environment.
# This setting does not apply to any binaries that require Tcl to operate
# properly (i.e. the text fixture, etc).
#
!IFNDEF FOR_WINRT
FOR_WINRT = 0
!ENDIF

# Set this non-0 to compile binaries suitable for the UWP environment.
# This setting does not apply to any binaries that require Tcl to operate
# properly (i.e. the text fixture, etc).
Expand Down Expand Up @@ -563,10 +548,14 @@ RCC = $(RC) -DSQLITE_OS_WIN=1 -I. -I$(TOP) $(RCOPTS) $(RCCOPTS)
!IF "$(PLATFORM)"=="x86"
CORE_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
SHELL_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall


!ELSE
!IFNDEF PLATFORM
CORE_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall
SHELL_CCONV_OPTS = -Gz -guard:cf -DSQLITE_CDECL=__cdecl -DSQLITE_APICALL=__stdcall -DSQLITE_CALLBACK=__stdcall -DSQLITE_SYSAPI=__stdcall


!ELSE
CORE_CCONV_OPTS =
SHELL_CCONV_OPTS =
Expand Down Expand Up @@ -667,18 +656,6 @@ SHELL_LINK_OPTS = $(SHELL_CORE_LIB)
TCC = $(TCC) -FAcs
!ENDIF

# When compiling the library for use in the WinRT environment,
# the following compile-time options must be used as well to
# disable use of Win32 APIs that are not available and to enable
# use of Win32 APIs that are specific to Windows 8 and/or WinRT.
#
!IF $(FOR_WINRT)!=0
TCC = $(TCC) -DSQLITE_OS_WINRT=1
RCC = $(RCC) -DSQLITE_OS_WINRT=1
TCC = $(TCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
RCC = $(RCC) -DWINAPI_FAMILY=WINAPI_FAMILY_APP
!ENDIF

# C compiler options for the Windows 10 platform (needs MSVC 2015).
#
!IF $(FOR_WIN10)!=0
Expand All @@ -691,35 +668,29 @@ BCC = $(BCC) /d2guard4 -D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
# USE_CRT_DLL option is set to force dynamically linking to the
# MSVC runtime library.
#
!IF $(FOR_WINRT)!=0 || $(USE_CRT_DLL)!=0
!IF $(USE_CRT_DLL)!=0
!IF $(DEBUG)>1
TCC = $(TCC) -MDd
BCC = $(BCC) -MDd
ZLIBCFLAGS = -nologo -MDd -W3 -O2 -Oy- -Zi
!ELSE
TCC = $(TCC) -MD
BCC = $(BCC) -MD
ZLIBCFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi
!ENDIF
!ELSE
!IF $(DEBUG)>1
TCC = $(TCC) -MTd
BCC = $(BCC) -MTd
ZLIBCFLAGS = -nologo -MTd -W3 -O2 -Oy- -Zi
!ELSE
TCC = $(TCC) -MT
BCC = $(BCC) -MT
ZLIBCFLAGS = -nologo -MT -W3 -O2 -Oy- -Zi
!ENDIF
!ENDIF


# Define -DNDEBUG to compile without debugging (i.e., for production usage)
# Omitting the define will cause extra debugging code to be inserted and
# includes extra comments when "EXPLAIN stmt" is used.
#
!IF $(DEBUG)==0
TCC = $(TCC) -DNDEBUG
BCC = $(BCC) -DNDEBUG
RCC = $(RCC) -DNDEBUG
!ENDIF

!IF $(DEBUG)>0 || $(API_ARMOR)!=0 || $(FOR_WIN10)!=0
TCC = $(TCC) -DSQLITE_ENABLE_API_ARMOR=1
RCC = $(RCC) -DSQLITE_ENABLE_API_ARMOR=1
Expand Down Expand Up @@ -909,56 +880,6 @@ LTLINKOPTS = /NOLOGO
LTLIBOPTS = /NOLOGO
!ENDIF

# When compiling for use in the WinRT environment, the following
# linker option must be used to mark the executable as runnable
# only in the context of an application container.
#
!IF $(FOR_WINRT)!=0
LTLINKOPTS = $(LTLINKOPTS) /APPCONTAINER
!IF "$(VISUALSTUDIOVERSION)"=="12.0" || "$(VISUALSTUDIOVERSION)"=="14.0"
!IFNDEF STORELIBPATH
!IF "$(PLATFORM)"=="x86"
STORELIBPATH = $(CRTLIBPATH)\store
!ELSEIF "$(PLATFORM)"=="x64"
STORELIBPATH = $(CRTLIBPATH)\store\amd64
!ELSEIF "$(PLATFORM)"=="ARM"
STORELIBPATH = $(CRTLIBPATH)\store\arm
!ELSE
STORELIBPATH = $(CRTLIBPATH)\store
!ENDIF
!ENDIF
STORELIBPATH = $(STORELIBPATH:\\=\)
LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(STORELIBPATH)"
!ENDIF
!ENDIF

# When compiling for Windows Phone 8.1, an extra library path is
# required.
#
!IF $(USE_WP81_OPTS)!=0
!IFNDEF WP81LIBPATH
!IF "$(PLATFORM)"=="x86"
WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
!ELSEIF "$(PLATFORM)"=="ARM"
WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\ARM
!ELSE
WP81LIBPATH = $(PROGRAMFILES_X86)\Windows Phone Kits\8.1\lib\x86
!ENDIF
!ENDIF
!ENDIF

# When compiling for Windows Phone 8.1, some extra linker options
# are also required.
#
!IF $(USE_WP81_OPTS)!=0
!IFDEF WP81LIBPATH
LTLINKOPTS = $(LTLINKOPTS) "/LIBPATH:$(WP81LIBPATH)"
!ENDIF
LTLINKOPTS = $(LTLINKOPTS) /DYNAMICBASE
LTLINKOPTS = $(LTLINKOPTS) WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib
LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:kernel32.lib /NODEFAULTLIB:ole32.lib
!ENDIF

# When compiling for UWP or the Windows 10 platform, some extra linker
# options are also required.
#
Expand All @@ -982,9 +903,9 @@ LTLINKOPTS = $(LTLINKOPTS) /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib
# If either debugging or symbols are enabled, enable PDBs.
#
!IF $(DEBUG)>1 || $(SYMBOLS)!=0
LDFLAGS = /DEBUG $(LDOPTS)
LDFLAGS = /NODEFAULTLIB:msvcrt /DEBUG $(LDOPTS)
!ELSE
LDFLAGS = $(LDOPTS)
LDFLAGS = /NODEFAULTLIB:msvcrt $(LDOPTS)
!ENDIF


Expand Down
4 changes: 2 additions & 2 deletions autosetup/proj.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,7 @@ proc proj-setup-autoreconfig {defName} {
}

#
# @prop-append-to defineName args...
# @prop-define-append defineName args...
#
# A proxy for Autosetup's [define-append]. Appends all non-empty $args
# to [define-append $defineName].
Expand Down Expand Up @@ -1873,7 +1873,7 @@ proc proj-define-append {defineName args} {
# but it is technically correct and still relevant on some
# environments.
#
# See: proj-append-to
# See: proj-define-append
#
proc proj-define-amend {args} {
set defName ""
Expand Down
1 change: 1 addition & 0 deletions autosetup/sqlite-config.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ proc sqlite-check-common-system-deps {} {
define HAVE_ZLIB 1
define LDFLAGS_ZLIB -lz
sqlite-add-shell-opt -DSQLITE_HAVE_ZLIB=1
sqlite-add-feature-flag -DSQLITE_HAVE_ZLIB=1
} else {
define HAVE_ZLIB 0
define LDFLAGS_ZLIB ""
Expand Down
Loading