1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00
Commit Graph

29914 Commits

Author SHA1 Message Date
drh
5dcf5890ae Enhance ./configure to issue an unambiguious error if the pathname to either
the source tree or the build directory contains any space characters.

FossilOrigin-Name: 614ae5c74f3b534f50432c875681d7a1e6135be883508939c9c57822cc1e9361
2025-01-27 17:48:51 +00:00
drh
7c727bb61b Avoid splitting a hyperlink across lines in the documentation comment for
sqlite3_serialize().

FossilOrigin-Name: 74b770bd445d98ff883000ab2e31603d729e415e4e4f640646eef30825634f48
2025-01-27 14:12:14 +00:00
dan
43aad25b1b Add the sqlite3_setlk_timeout() API. For setting the timeout used by SQLITE_ENABLE_SETLK_TIMEOUT blocking locks without also setting the regular retry-based busy-timeout.
FossilOrigin-Name: 4a7eb492797abb47b18b7dfc557aeae43a0dea5b861efc203398d5059b10d131
2025-01-27 11:50:03 +00:00
drh
e097db7210 Make two private routines in FTS "static" so that they are not callable from
outside of SQLite itself.

FossilOrigin-Name: 9b11bed0448b95319206b413c35f23bb80f3f4c0a4394d40f2e64066400a01ed
2025-01-26 23:34:49 +00:00
drh
2228567ad3 Further comment improvements in the star-query heuristic. Add an ALWAYS()
on an unreachable branch to achieve MC/DC.

FossilOrigin-Name: 5e18ce68fbc5e73e6694936f3ba71f5b5e3758cf380951805ca6ea6a3f0943aa
2025-01-26 20:09:57 +00:00
drh
fe54b7a1f4 Small size and complexity reduction on the star-query heuristic. Improved
comments for the star-query heuristic.

FossilOrigin-Name: a7ecb2f4b7eee78b88f1b2e026dffed2007ca4ffeb152632624ab2582839b250
2025-01-26 17:29:33 +00:00
drh
fb9e8e48fd Revise the strategy used by the star-query heuristic: Instead of decreasing
the cost of all fact-table WhereLoops, increase the run-cost of WhereLoops that
are SCANs of dimension tables.

FossilOrigin-Name: 1bc09c9e8bd77ac41ecbe510c7e003757fc11d0f586da6cdf3584315aa9d6407
2025-01-25 23:04:05 +00:00
drh
0186ee1cd7 Improvments to debug output on the star-query heuristic.
FossilOrigin-Name: b3ebeb0682a2c837987acf4ed92f06cf91aea235830c5a0f9dd1ce64afe16e84
2025-01-25 14:30:36 +00:00
drh
dea434ea65 Avoid calling computeMxChoice() after an OOM as some assert()s can fail
in that routine if a prior OOM occurred while building the WhereLoop array.

FossilOrigin-Name: 8b9e621dbf599d7e75e07d75d4c400247d693ea76e00eba0919f4e33e3e10bdd
2025-01-25 00:07:14 +00:00
drh
bc7e41c03c Remove an incorrect ALWAYS() added in check-in [7cfbe14d199bb631].
FossilOrigin-Name: 431a1a29f93dc642779dc21c3a0edad5fcda1d175e9d1e3b216fa02c234fe774
2025-01-24 20:59:12 +00:00
stephan
77731d5ec0 Clarify handling of a NULL for the 2nd argument to sqlite3_serialize(), as pointed out in [forum:3df7168b90|forum post 3df7168b90].
FossilOrigin-Name: 340edbe5540762656b648c18a359ab7039b4a0af15db199fc86317a415e2bafa
2025-01-24 18:37:55 +00:00
drh
079f840e47 Improve the star-query heuristic so that it does a better job of identifying
actual star queries.  Also includes improved diagnostic output from the
query planner.

FossilOrigin-Name: 7cfbe14d199bb631abd4d009698eeaee9b8450d5061ded612095ee4738ac6a1f
2025-01-24 16:37:31 +00:00
drh
d37412b80c The debugging output for WhereLoop objects now shows cost
estimate changes due to the star-query heuristic.

FossilOrigin-Name: a280f5f5480e560fc2b80e8947d8062e8b3487d930e71cb60fc9ba90d87977c1
2025-01-24 16:27:18 +00:00
drh
f1c5830311 Minor tweaks to the star-query detection and processing.
FossilOrigin-Name: 61f76a45ac7aa454419fd7539a3d8e60f0733fb5a2abd034d795328f3c1b6e9b
2025-01-24 15:55:20 +00:00
dan
2539fb2bc5 Fix a race condition causing SQLite to use a busy-handler for an operation that should not.
FossilOrigin-Name: 6ab9ed8eef77781898375038ab05fc6e5f46b745e4906691393b8b1d90570eb6
2025-01-24 15:49:47 +00:00
stephan
7ae051df2a Correct a version number in autosetup/README.md.
FossilOrigin-Name: c338caf0fd4adc7baacf20f6d4274b1776b9487a5a976b8d85e490791be82b11
2025-01-24 15:41:33 +00:00
drh
299fe02393 When looking for star-queries, do not count a table as a dimension table
if that table is separated from the fact table by an OUTER or CROSS join
or if the table is a self-join.

FossilOrigin-Name: 5aebd7df0d577e98b3affd22b84b42dfe84a9f37fa29187505cc245b95460ba4
2025-01-24 14:51:15 +00:00
stephan
7a16413a84 Update autosetup/README.md to reflect recent refactoring.
FossilOrigin-Name: 601636829b79888deda7d4dc5786f82b4f0b302d84663ee96b4d47fcb429abcf
2025-01-24 14:13:20 +00:00
stephan
8bfb186728 Replace a handful of hard tabs in string literals with \t in mkwasmbuilds.c.
FossilOrigin-Name: e8e4d497a7b6aae450cb93927c7583fcce3fe971cd3691f9d9cad605de3cfb1f
2025-01-24 12:54:59 +00:00
stephan
4331e6bd1d Minor additions to ext/wasm/README.md.
FossilOrigin-Name: 85747ea1654c74d330614aa174ede4a989b6456eb1fc5eb0fc9f2d1418b6ef99
2025-01-24 09:21:39 +00:00
stephan
dfb5f32758 Update ext/wasm/README.md to reflect simplifications permitted by the current configure script behavior.
FossilOrigin-Name: 9abb56c6acb1c84c2df8534ca3ebb2894afd68bc7b8331d4d12611896c576749
2025-01-24 09:18:19 +00:00
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