1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-05-01 08:24:53 +03:00

29842 Commits

Author SHA1 Message Date
stephan
c70631623c Remove extraneous are-we-making-clean guards from the generated wasm build rules, as that guard is set at a higher level. Rename a makefile call()able for consistency.
FossilOrigin-Name: 7f9074e2a7ff62bdcf343895e80a51224de62a22afbbf82068ec5fea7eeda0bb
2025-01-24 08:58:54 +00:00
stephan
07a2e5d1ed wasm: de-list demo-worker1-promiser-esm.html from the test pages because (per Chrome 131) "Module scripts don't support importScripts()", where "don't" means "they used to but no longer do".
FossilOrigin-Name: 4aa025a943a4024094b91f13abfb8945bbbb8334e3ec904dee5315852845bfe1
2025-01-23 22:23:31 +00:00
drh
1519675a1a Fix a possible infinity loop in debugging-printf logic in the query planner.
No changes to production code.

FossilOrigin-Name: 9a20b94080f5379867530772e081b737ae4cf6b416469dcabb85b8dd819f491f
2025-01-23 21:06:59 +00:00
stephan
02e81f72a0 When running wasm-opt, ignore any failure because it will fail for unknown flags and the set of legal flags will change from version to version. Document the size-reduction effect (or non-effect) of a dozen-odd wasm-opt flags and retain those which demonstrate a wasm file size reduction in -Oz builds (our production build mode). Total size savings: roughly 13kb.
FossilOrigin-Name: c9dc581e0287e3462ac55f80ca76e7e98d31157022052c892517363c45287a7b
2025-01-23 19:44:09 +00:00
stephan
726a047a47 Remove some now-dead makefile code, rename a var for consistency, and fix a recipe bug introduced in the previous checkin in the bundler-friendly build.
FossilOrigin-Name: 0acd4ef3addb311476f4a670be0c4c4a0f3f88b0420886d4c1c3c3027dd51d73
2025-01-23 16:11:24 +00:00
stephan
efafde5eb4 Initial support for post-processing wasm files with wasm-opt (if it's available). This currently shaves 12kb off of the release-mode build of sqlite3.wasm but there are many dozens of wasm-opt flags left to try.
FossilOrigin-Name: 5d16e3f28364de2d6b6456a6fc56bf604b9106c3ae15719f2862192ae3020cc1
2025-01-23 15:58:01 +00:00
stephan
72543206e5 Move small parts of ext/wasm/GNUmakefile into ext/wasm/config.make.in and have the configure script populate that, rather than dynamically determining those values on each 'make' invocation. Add a configure-time check for the optional wasm-opt binary in prep for pending experimentation with using it to reduce the wasm file sizes.
FossilOrigin-Name: 0a426a549577b883e2de7cd0605041cc97b57f53ee6657bc318b0bfde7b62677
2025-01-23 14:09:02 +00:00
stephan
c9bf7ed9ad Remove unnecessary --minify 0 emcc flag from the wasm build, as -g3 implies that capability along with other anti-minification features we rely on.
FossilOrigin-Name: 10c91f9cd074e8d35af1c7f8251ac18e5dd91fa14df3fe4e1fb44441c4f08c7a
2025-01-23 11:21:29 +00:00
stephan
83baa239e7 Do not strip binaries during 'make install', for consistency with the legacy build and per request from package maintainers.
FossilOrigin-Name: cd3fed5c2082c250c32c4d99eecd49a1ab840583fc343bcfd27fb536715d0ce9
2025-01-23 06:10:54 +00:00
stephan
f52ed5fd61 Replace the use of the Autools in ./autoconf/ with Autosetup and extend its configure script to include many of the flags available in the canonical build.
FossilOrigin-Name: 8c60d4c901af716d4d4dfd1dd4aa626c758fac2cb46112b24b0838b7888fc66f
2025-01-22 21:34:53 +00:00
drh
c850c2be75 Add two new sqlite3_db_config() options that enable the ATTACH command
to create new database files and to open databases read/write.  Both
default to on for backwards compatibility.

FossilOrigin-Name: fe0c58d00b491d1af7c0894f5c32542954aeea2e6510853b3bcbf13ac0bf5ce0
2025-01-22 19:37:47 +00:00
drh
9489aefb83 Add the -q/--quiet option to test/speedtest.tcl. Automatically enable
-DSQLITE_OMIT_LOAD_EXTENSION and -DSQLITE_THREADSAFE=0 so that no extra
libraries are required.

FossilOrigin-Name: c20d21b473d8a45267262c5df1d7b102eccce8e4cfbe1e467ea66c474aea0af5
2025-01-22 17:18:53 +00:00
drh
255548562b Fix date/time computations to deal with the sub-millisecond rounding
problem identified in [forum:/forumpost/766a2c9231|forum post 766a2c9231].

FossilOrigin-Name: afb0a5923a6db4045fab5226198aab970d746d4866294ebba943c6986e97ecde
2025-01-21 17:37:58 +00:00
drh
8e7a16895c Performance improvements to the (debug-use only) Mem.pScopyFrom logic, resulting
in about 8x faster performance under -DSQLITE_DEBUG for the query in from
[forum:/forumpost/0025389d0860af82|forum post 0025389d0860af82].  This change
only affects builds that use -DSQLITE_DEBUG.

FossilOrigin-Name: 7fb1ae25d1572dd7709a0f850c148a5f745a524f01ea231e29a1ebc37c173fb9
2025-01-21 16:30:55 +00:00
stephan
a6b62a26d4 Explain the lack of docs in autoconf/Makefile.in and refer interested readers to main.mk in canonical tree. Minor cleanups and fixes in tool/mkautoconfamal.sh.
FossilOrigin-Name: e5bbc2428f1000a451c1b4afd287742b9896a1a6c82d9706c6b8e7d6fb3b1e44
2025-01-21 15:45:03 +00:00
drh
2e899ccaff The FuncDev.nArg field values -3 and -4 now have special meansing of 1 or more
or 2 or more arguments, respectively.  This saves space in the built-in
function table, resulting in slightly faster performance and a reduced binary
size.

FossilOrigin-Name: 753fd747f24c5e9a019eb00b8a4f66e65c6733ba10a7adbd1b55786867c32ca6
2025-01-21 15:12:00 +00:00
stephan
631900291d Remove now-extraneous autoconf/INSTALL and autoconf/configure.ac and update autoconf/README.* to account for the port to autosetup.
FossilOrigin-Name: 646667af8ca2140d823facf4578105c3d9815ea34b2a4cb96103c2fe7d718229
2025-01-21 14:40:35 +00:00
dan
b80d01a182 Have fts5 better handle OOM errors from sqlite3_blob_close().
FossilOrigin-Name: f418350f3f83147bc5817a885be6e39ff9ff5722742a88d17600729c53c65010
2025-01-21 14:34:59 +00:00
drh
d0db5edf61 Use Tcl_GetString() instead of Tcl_GetCharLength() to test for a zero-length
string in the TCL interface, since that is much more efficient.

FossilOrigin-Name: a8d9dcfd23fbfcd887e451382836c1e88215984cc01e00be11387dbf4ab26fd8
2025-01-21 11:10:16 +00:00
stephan
985b4bc157 configure script: work around msys's inability to 'exec' a '.sh' file by prefixing the call with an explicit 'sh', as reported in [forum:befb352a42a7cd6d|forum post befb352a42a7cd6d].
FossilOrigin-Name: 25b01f1c9a5e606441bfd4e729fb88361436dffc76ef7a10c04a4d4ad0bcc655
2025-01-20 20:48:18 +00:00
stephan
ae24e13bc7 Add 'dist' and missing 'install' pieces to the autoconf bundle.
FossilOrigin-Name: 16fa20413e3f3f0b6ea5d97022945843d1f785ac0142836f2a3651fd1917385f
2025-01-20 19:57:32 +00:00
drh
c69d537b93 Remove an assert() in the unix file locking logic that is not true
if alternative VFS "unix-excl" is used for a read-only connection.

FossilOrigin-Name: bd5dc92368e41231a07bb59dd3db8942e238129ec7a3c8d785459d9b62bfcba3
2025-01-20 19:19:31 +00:00
dan
467e20ad1d Fix an assert() that could fail if a virtual table called sqlite3_step() from within the xSync() method while committing a "PRAGMA defer_foreign_keys=1" transaction.
FossilOrigin-Name: 39bdbb3f6dd1d30d180526d35c11f789f5e9d45b99ead72fd4a3b136afab66b1
2025-01-20 18:26:58 +00:00
stephan
e9763e4ed7 configure script: remove an overzealous is-a-file check in the tclsh search which fails to account for implicit .exe extensions on Windows builds. Reported in [forum:c27403ef974df9f1|forum post c27403ef974df9f1]. (Same change as [89306d1a4905] but to a different file, as that content was moved since the 3.48 release.)
FossilOrigin-Name: 239a3d1573f4cb720308018280b2add54034e69e38fe7060a7238875eee4f1c9
2025-01-20 16:14:09 +00:00
stephan
87cdd5926d Get libsqlite3.so and .a building in the autoconf bundle.
FossilOrigin-Name: 88cee3fc7c8bfd9b6955fb6b2fd6b25660563e4d043ffa5ea18d8abe91afdb7f
2025-01-19 21:47:06 +00:00
stephan
17dca772e0 Get the CLI shell building in the autoconf bundle.
FossilOrigin-Name: 241cdbc40a2f82df53c149849a103a335b0643a65e229a1e80ab90a0e457bb6b
2025-01-19 19:51:47 +00:00
drh
3640785453 Add an SQLITE_TESTCTRL_OPTIMIZATION mask that can disable the query planner
heuristics that are designed to help with star queries.

FossilOrigin-Name: fec4ff185a2f3f1bee8f27432206276636cf27365d2d41cd7282f8c0425f2e96
2025-01-19 19:14:21 +00:00
stephan
2534bf4011 Initial work towards converting the autoconf bundle to autosetup. Currently non-functional.
FossilOrigin-Name: d7708372ff2fef4bfa61e56dbfbb363cac7685587a61a151497991d9a08bb07f
2025-01-19 18:58:09 +00:00
stephan
c6a39debf9 Further refactoring of auto.def to simplify creation of variant builds like the autoconf bundle.
FossilOrigin-Name: f806c563a29240c709508316846fbe0cb3ed61b68a6c1d9544eb699e30141d8d
2025-01-19 18:32:45 +00:00
stephan
815709dd00 Minor internal refactoring of auto.def to support the pending autoconf subdir port to autosetup. No functional changes.
FossilOrigin-Name: 01ff37584708f3f79c62c1b5ed8cceab721cf8348a69a65f0559b1ef8845e85b
2025-01-19 16:26:25 +00:00
stephan
6cd83aecb9 Move some of the auto.def functions into autosetup/sqlite-config.tcl for re-use in the pending migration of the autoconf bundle to autosetup. This is just reorg, no functional changes.
FossilOrigin-Name: 2f1e94994f3595baad4045ab05ffee0668059c23ab37a39c25b83c62bfbaea28
2025-01-19 14:53:45 +00:00
drh
8291cd78f2 Enable automatic query-time indexes for WITHOUT ROWID tables.
FossilOrigin-Name: 8534af5b94be9f5b1f02453e1c3b6b3f78a698af91595bdbbfdea00676510116
2025-01-18 23:44:06 +00:00
drh
0f4de9bf9d Add a simple test case (many more are coming soon to TH3). Fix an obsolete
assert().

FossilOrigin-Name: aa829a131a3431791083cf60d9cf00e7b3c0fafdd39a23e761b629a2287ab875
2025-01-18 21:19:02 +00:00
drh
50c4420030 Add support for automatic query-time indexes on WITHOUT ROWID tables.
FossilOrigin-Name: 89c4cbd9529081941d7283a401c4a8d71b241f4577ebf6d3eb2ebe5a1cf92f2e
2025-01-18 21:00:19 +00:00
stephan
1a1fe1d1da When cross-compiling, change the CFLAGS default to exclude -g, per /chat discussion prompted by [forum:9a67df63eda9925c|forum post 9a67df63eda9925c].
FossilOrigin-Name: 4309da2ca5cb99ea81f3034ae3c5809187c0131d21f9f9469ea0d69c941f393e
2025-01-18 16:05:38 +00:00
stephan
e52cdadea7 When running make install, avoid the -s (strip) flag when cross-compiling, as it only works for the build platform. Reported in [forum:9a67df63eda9925c|forum post 9a67df63eda9925c].
FossilOrigin-Name: 230e49c10e3aa6fe9c487a1e026016a8bf97f7e736e7477d5976d987da5e83cf
2025-01-18 13:51:01 +00:00
drh
e432f2a316 For the purpose of the query planner heuristic added by [38db9b5c83], a query
should only count as a star query if the fact tables are connected to the
dimension table by an INNER JOIN.  If a LEFT JOIN is used, then the fact
tables are constrained to be in inner loops anyhow and so the heuristic does
not make any sense.  But it does interfere with AUTOMATIC index creation, which
causes the performance regression reported by
[forum:/forumpost/d87570a145599033|forum post d87570a1455].

FossilOrigin-Name: 0852c57ee2768224af79910e6f26e70a4962651dae0f8b45cbfc847e6707d7bb
2025-01-17 23:49:40 +00:00
drh
f462046cd1 Enhance a comment on a test case to add recent context.
FossilOrigin-Name: c2647d1bd16fd46dd03953afee6cad44ce14fa2c36713c487b678d63660bc072
2025-01-17 17:09:42 +00:00
stephan
0887b70286 Typo fix in speedtest.md.
FossilOrigin-Name: 36027cf340fe2e351c63129d069f9bced090c4a028ffd78d5b8c0f418ad9f230
2025-01-17 15:56:16 +00:00
drh
ada3470075 Improvements to the speedtest.tcl script. Add documentation on how to use the
script.

FossilOrigin-Name: eb3853d08141bf941193e8ecaf991191bb7fb46287818708a84018520eb1835e
2025-01-17 15:39:48 +00:00
drh
e024421624 Add the test/speedtest.tcl script to simplify performance and size testing.
FossilOrigin-Name: ad7b38672656d0336a73bb789ec83f6939fbdae81e21be68e0313006826dc294
2025-01-17 12:32:01 +00:00
drh
d0c6c6586e Fix a potential one-byte buffer overrun when reading from the Windows
console in the CLI. [forum:/forumpost/95e17b8f5c|Forum post 95e17b8f5c].

FossilOrigin-Name: 4d96759694c91301410f53a3f737a049c33e8b259b0954ff659714aff8b21ae8
2025-01-17 10:39:04 +00:00
drh
1425bae1ab speedtest1: further improvements to the "json" testset.
FossilOrigin-Name: c4750f7cf7e2188623de8b12e01acf3e3d7dc7b5ea87ac449571eb36f97d842a
2025-01-16 20:46:08 +00:00
drh
7edb0c3920 speedtest1: Improvements to the "json" testset. Better balance in "mix1".
FossilOrigin-Name: 2cc73c5e08f1a16fe8accf0af6af061e42d27635883d09234516fd470e99bc0a
2025-01-16 20:08:59 +00:00
drh
c957673bf7 Revamp the "json" testset in speedtest1.
FossilOrigin-Name: d33508836bc88314a205bfa9d80f3ebe695163cf0c46d500ad674535975408fb
2025-01-16 17:19:06 +00:00
drh
bfa7218982 Add the "json" test case to speedtest1 and include it in "mix1".
FossilOrigin-Name: 2db3a3ee37a9d2fe9b94d16d35c24846c37abe73b89cde4dd763e01a2bfaa8b7
2025-01-16 14:37:48 +00:00
drh
4a25b740f2 Speedtest1 enhancements: (1) Add the ability to scale performance of
tests sets using "/NNN" after the testset name, even for testsets in a
comma-separated list.  (2) Add the "mix1" macro testset.

FossilOrigin-Name: 85667b3a572bc9afd8c862a0b2c5f47f76ca80d6e61302ca7d7c1b326d3dd578
2025-01-16 14:06:29 +00:00
stephan
ec50c5a2a4 wasm: after generating the .js/.mjs file, strip out all of the generated pieces which create Emscripten call() bindings for the sqlite3 APIs, as we don't use those binding, so both the setup time and the memory they use installing WASM proxy bindings is wasted. This eliminates some 200 superfluous/unused bindings from the init process.
FossilOrigin-Name: 020d2c7528be6f11a5b2b849d7b2f04e47abe2b0842520ff60eb7defb3768e1c
2025-01-16 13:10:06 +00:00
stephan
b6953280e7 When generating the autoconf snapshot, replaces the Libs.private line from sqlite3.pc.in with one compatible with the legacy build, as reported in [forum:e40b9b424a|forum post e40b9b424a].
FossilOrigin-Name: fe47154799bfefb12eb1209d9ada64ecac38bee1b7c3558d175215a2beba991d
2025-01-16 12:15:51 +00:00
stephan
3202b11f66 Replace use of Emscripten's Module.postRun() with a custom callback so that we get consistent library init timing with both Emscripten 3.1.x and 4.0.x. Details and discussion are in [https://github.com/emscripten-core/emscripten/issues/23420|Emscripten ticket #23420].
FossilOrigin-Name: 4863a70ac61ff6f868429f16f0141484ea98f973fde1a9aff879252d0f1dbb6b
2025-01-16 09:27:40 +00:00