1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-20 01:22:32 +03:00
Commit Graph

1592 Commits

Author SHA1 Message Date
drh
f1928b3e54 Do not attempt to make the generated file "shell.c" read-only. This turns
out to be annoying in general, and especially annoying on macs.

FossilOrigin-Name: 6ab18d036a3e412ee01806a40f69aca2b77283bd5336df27597cc19d32e6e6f2
2025-11-18 19:11:21 +00:00
drh
f639befec8 New subcomponent, the Query Result Formatter (QRF), that formats query
results for display to humans on a fixed-width font terminal.  Rework the
CLI to make use of the QRF.  Renovate the .mode command of the CLI.  Also
incorporate the QRF into the TCL interface as the "format" method.

FossilOrigin-Name: 7e460ffa5aae884807db9e7c8214d6d822d5d38ea406fe3b3eac04ac16f158fa
2025-11-18 17:49:48 +00:00
drh
9e91a1fe89 Modify the "%realloc" and "%free" commands in Lemon so that the functions
they specify take an extra parameter at the end, the %extra_context pointer.
This allows the implementation to distinguish between OOM errors and
failures to increase the stack size because of the stack size limit.

FossilOrigin-Name: 9862c945d9a8531f9bef123aee9ed1fd3f64542250a57beb3a150227bc3c1a12
2025-11-18 15:40:02 +00:00
drh
fef2233090 Add the SQLITE_LIMIT_PARSER_DEPTH value for sqlite3_limit(). This isn't
something that many applications will need, but it is useful for testing.

FossilOrigin-Name: 8f0b07f36159225c476f756f8f9b35c75783bc8bed43b578f4d1055fa800ecc9
2025-11-18 14:48:33 +00:00
drh
d26ac414c8 Yet another attempt at controlling the parser stack size.
FossilOrigin-Name: cb19986dc6bc483df21e082e54a14cb6d7540b1734259e6d326d676908ac0172
2025-11-18 13:03:08 +00:00
drh
ef4abc0a63 Fix incorrect "#line" generation in Lemon.
FossilOrigin-Name: 5c0214df2c0a7470ac2edca0c483a3edd3c39ef0739688ab9a06e23882200360
2025-11-18 10:38:41 +00:00
drh
a7b9a10707 Fix harmless compiler warnings. Incorporate "USAGE:" comments on dot-command
implementations into the CLI ".help" command output.

FossilOrigin-Name: 046bfab4a01e8a7cc58d1bdf0756c90ba354562d79e5453c08202daf648e76a6
2025-11-14 14:59:43 +00:00
drh
0296bab9fd The new "format" method in the TCL interface is now partially functional.
FossilOrigin-Name: ace1ebda08740bb248c009cc4a6c99da318a2bba3e43ef20bd0c365c5021705f
2025-11-05 14:07:16 +00:00
drh
9ff8a73ba4 New build product "tclsqlite-ex.c" is the tclsqlite.c file with QRF added.
This is now used whereever tclsqlite.c was used.  Hence QRF is now in the
testfixture and in the tclextension.  The sqlite3 method is "format".  That
method is currently just a non-functional stub.

FossilOrigin-Name: e08d21fe1365176f268f1dcca4048fb5ff043356e5817c8622b4ed9a1a5a58cf
2025-11-05 12:37:42 +00:00
drh
eaacb4ac37 Add pedantic OOM detection logic to some disused diagnostic and test code.
No changes to any deliverables.

FossilOrigin-Name: abb6945fc62a1855786bda1f473edef0e937a791c453387a0859a6ce0451635a
2025-11-02 22:57:26 +00:00
drh
f3b396494f Updates to the tool/warnings.sh script for better compiler warnings.
FossilOrigin-Name: c9c64892c76cb9f2efb58428b349d43b075e7595b6a391d4818a7e9fb68b85fd
2025-10-30 18:32:32 +00:00
drh
01f5e6e757 Add ENABLE compile-time options to enable carray() and median(). Hence
there is no new code and no increase in library size without the ENABLE
macros.

FossilOrigin-Name: 7dec290b413ca1bc67694743d8b771e1634fd85251f1a23d60aaf36c63f0f366
2025-10-08 18:11:37 +00:00
drh
cdaff852bf Were we to choose to integrate the carray() table-valued function into the
amalgamation, that integration might look something like this.

FossilOrigin-Name: 2b43d5d7dcc5aee14a050c824a5e09b6a38a9c78ddcc25a994eba5d4c5ad9ba2
2025-10-08 15:32:55 +00:00
dan
7aa5271c72 Fix a minor problem with building sqlite3.c without manifest.tags.
FossilOrigin-Name: 140f0f9fd389c99dc6ba1fdca7658c43d8dc3f3c128484fbafa7d67c33fe1001
2025-10-06 20:11:18 +00:00
stephan
6f7c977ed9 Add info from the SQLITE_SCM_... macros to tool/version-info.c's --json output, prompted by [forum:0c513ae3fca7d55c|forum post 0c513ae3fc].
FossilOrigin-Name: 951882aa4e1684b7b0f7e10590de81eae1ddb8c5ac21588e3f9b9cd4cb9f0f51
2025-10-06 16:54:45 +00:00
drh
eb8089ef46 Fix an off-by-one error in sqlite3_rsync.
[forum:/info/46753431d4|Forum post 46753431d4].

FossilOrigin-Name: ef3b7be6f2037871f6f1b1944fed3dda28216e7f179080d3be2e2620c031f48c
2025-09-11 10:58:49 +00:00
stephan
be4cf645a8 In mkautoconfamal.sh use $MAKE if it's set so that it can be made to work on platforms where 'make' from the PATH is not usable, e.g. HP-UX's standard make. This means that 'make snapshot-tarball' will inherit that value from the outer makefile and set it appropriate when the in-use make is named gmake.
FossilOrigin-Name: a8635cae05d2bce28d0c0c39b599cf8ca6f3b89b114fbeef519a8024692180c5
2025-09-11 10:08:19 +00:00
stephan
62ed0b79da Add 'from a check-out' to the mksqlite3h.tcl manifest instructions.
FossilOrigin-Name: 7728a74ca87934c333a66e46dc1f88ce572473e345d9ff20e5d566c0e26da82d
2025-08-29 11:21:08 +00:00
stephan
a00b9b99ba Fix the mksqlite3h.tcl SQLITE_SCM_... changes to work from out-of-tree builds. Problem reported in [forum:812f8d6ff4|forum post 812f8d6ff4].
FossilOrigin-Name: 127f0ab16370fe02b4456669bf60e45ce8c96c4e24b2db3080eaf376d77e0df8
2025-08-29 11:09:20 +00:00
stephan
9976684d26 Remove some commented-out debugging lines and fix a doc typo. No code changes.
FossilOrigin-Name: af32cb3e30ee527a89768b98d8646e2b25d3fb642e61e805187bb3e4613b0960
2025-08-28 17:10:44 +00:00
stephan
8200750eb1 Add macros SQLITE_SCM_BRANCH/TAGS/DATETIME to sqlite3.h, pulled from the fossil-generated manifest.tags.
FossilOrigin-Name: db6b6240ad465f865dd2ca8fa0cdfba8b5315c45041b91b76efade6427c213e1
2025-08-28 17:05:37 +00:00
stephan
88f7807fa6 Add an explicit call to sqlite3_initialize() to sqlite3_rsync so that it works when built with SQLITE_OMIT_AUTOINIT, as suggested in [forum:c4ec6b33097b8536 | forum post c4ec6b33097b8536].
FossilOrigin-Name: 8c9db6237154d1c153916ed821f576f91b353bf988182127d2a619506707d6bd
2025-08-07 20:20:22 +00:00
stephan
de048aeda9 Extend the sqlite3_rsync PATH to include /opt/local/bin, per request in [forum:ca3c1bb7ca8e03 | forum post ca3c1bb7ca8e03].
FossilOrigin-Name: 79a14a5ebd0e8a0aa7f7bb180fcaa348a3ecd046662e3ee05a34f2c9a7db3dd6
2025-08-06 15:57:44 +00:00
drh
7270a56fdf Minor bug fixes in the script added by the previous check-in
FossilOrigin-Name: 2e1a2db3f92b0bd484d979b422fe28e86732121594d190b76dbf46f5d7533643
2025-08-06 12:47:58 +00:00
drh
aa86b2a373 Add a script to build ARM64EC binaries on Windows11 for ARM64.
FossilOrigin-Name: 2d5b74b84a9c778183a11070623e89b553ba9cde905b779dbf115ea95aa0ca9b
2025-08-06 12:43:06 +00:00
stephan
095d399e7c Ensure that certain local files are not inadvertently carried over into the snapshot tarball and causing confusing build results.
FossilOrigin-Name: 47fdf7ed2cad7ec56118cf4f77297b1178cd2104a21b19d4afad46437a944378
2025-07-20 18:29:35 +00:00
drh
97e6368abc Add the snapshot-zip makefile targets for both Windows and Posix.
FossilOrigin-Name: 8c73c0c5935431556f687556bfdb459754609f07c6366c810a55bf7583ee303d
2025-07-14 18:27:32 +00:00
drh
1c11aa3da2 Enhance the "mktoolzip.tcl" script (used by the "tool-zip" makefile target) so that
it uses "fossil test-filezip" to build the ZIP archive if available, and so that
it also generates windows-dll-*.zip on Windows platforms.

FossilOrigin-Name: 63ddc215eb6106985c53d3c8d99f5445a92acf4359a6bb2681882c49583df871
2025-07-14 16:05:59 +00:00
stephan
12bd8ea09a Add the --tclConfig.sh FILE flag to buildtclext.tcl to eliminate the discrepancy between the configure-time-detected tclConfig.sh and the one auto-detected by the tclextension family of makefile targets. Add the tclextension-all target to run all of the various tclextension-... targets in their natural order to facilitate testing changes like this one. Update the --help text to note that --with-tclsh should only be used if there's a specific need, and that --with-tcl is generall preferred. This is in response to [https://github.com/termux/termux-packages/issues/23268 | Termux ticket 23268].
FossilOrigin-Name: 928976abcb11f9d5abe1f7631002592c4af7bf83ecadba5b0763866d039c2270
2025-06-18 11:11:30 +00:00
drh
368c549044 Update the "msort" function in Lemon so that it works with lists of any
length, and also so that the sort is stable.  This patch was motivated by
[forum:/forumpost/63750d717c9ed961|forum post 63750d717c] but was
independently developed, then tested by temporarily setting LISTSIZE to 2.

FossilOrigin-Name: aba5c3135edf7de2798ad808fa0ff176fdba3f4a9b101f1f4210b441cba8e75d
2025-06-06 23:02:03 +00:00
drh
b1929b7117 Remove the clunky test_windirent.h and test_windirent.c files from src/
and replace them with a much cleaner and more compact ext/misc/windirent.h.

FossilOrigin-Name: acc978df52ec41ffdb5c27764f30d53efa1f25a314b7d98983dc0d211a36b570
2025-06-05 20:12:41 +00:00
drh
1d151e6d25 Enhance sqlite3_rsync so that it works even if the replica database is
initially malformed.

FossilOrigin-Name: ea1754f7d8a770477a1b19b606b27724fdc0b733e51fef32c1ef834f972c3cc5
2025-06-03 10:49:51 +00:00
drh
df724c893a Fix an off-by-one error in sqlite3_rsync, reported in
[forum:/forumpost/b6d78f60fc|forum post b6d78f60fc].

FossilOrigin-Name: 27d9e8e79b921c4a86916556f3bf56b94684a7e3d40166c0fdaaf750d4011de0
2025-06-03 10:28:47 +00:00
drh
b163f66de0 Fix a goofy hash function in Lemon. No changes to SQLite itself.
FossilOrigin-Name: d6cbabe23d3919d5bde6a83421cdae92125caec09d5c39a648d0305878c6a1dc
2025-05-29 17:46:34 +00:00
drh
f08f71a21d Slight change to tool/split-sqlite3c.tcl to make it compatible with jimsh
FossilOrigin-Name: fe670ddda933007386eb10facf4048ee88671f74b1fd41dfc3120beb717b8c9e
2025-05-26 23:20:23 +00:00
drh
8f06aed1df Avoid calls to sprintf() in Lemon, since OpenBSD hates sprintf().
FossilOrigin-Name: ed17858ddf833b6b9c2164f31ee9138a998d28ec1564d09e20deb102eefedbc8
2025-05-26 15:36:43 +00:00
drh
890de76cf5 Remove stray tab characters from source files.
FossilOrigin-Name: 298ff5a1dc5dbccaf6acd91731044f478a5ce522745332801708ceee996b01e6
2025-05-19 12:46:08 +00:00
drh
acf95a3217 Adjust the tool/warnings.sh script so that it works on the latest versions
of clang on Mac.

FossilOrigin-Name: 05a3dd9a179193d00968329152c8ffe6532f0cbdad7d19b47af32aebc0cd0d9e
2025-05-19 11:08:30 +00:00
stephan
1e24694b59 Latest upstream teaish pieces for minor fixes. Restructure this copy of teaish to simplify maintenance and the autoconf bundle build.
FossilOrigin-Name: 2b8d9b75ec5fe96cb5d06a3464fd4eb9a53018b7b548fedcd6cdbc46cdb55bdc
2025-05-17 07:02:06 +00:00
drh
eb55814c62 Remove a redundant typedef from the sqlite3_rsync.c source file.
FossilOrigin-Name: b4c37c6bcc644e21a29955e31151ea22a07627e524ce913afd3d2d6eeb7e0bb6
2025-05-11 10:48:10 +00:00
drh
94e22bc077 Provide the SQLITE_BUG_COMPATIBLE_20250510 compile-time option that restores
the JSON5 bug fixed in the previous check-in, in case some applications need
it for legacy compatibility.

FossilOrigin-Name: 491cf31904fdbc9567b838d1ba27901e75f8ea3a117043017d08354bb09f9711
2025-05-10 17:09:53 +00:00
drh
d7324103b1 Enhance sqlite3_rsync so that if the first attempt to invoke a copy
of itself on the remote system using ssh fails, try again after
augmenting the PATH.  This enables sqlite3_rsync to work without the
--exe option when the remote system is a Mac.

FossilOrigin-Name: 38d4c94d8c7802101ef3bfb411002f9497fdbbbd2b4d3514cef5b76ffd66f75b
2025-05-03 15:17:21 +00:00
drh
37b76bac18 Fix a harmless redundant variable declaration in sqlite3_rsync.
FossilOrigin-Name: f8f15eff6ae50d569ed13a3b18f33eaa43453c0cb80b6007df38e880b62f45d0
2025-05-03 10:55:47 +00:00
drh
e618674714 Addition summary results output when using -vvv on sqlite3_rsync.
FossilOrigin-Name: c702999cfac37fdcae64d261408e58d1f49fee65434fe346db6a2a6c7f8ac54e
2025-05-03 10:49:39 +00:00
drh
d7b83224bb Promote the --protocol option to sqlite3_rsync from being an undocumented
debug option to being a supported and user-visible option.  This is 
sometimes needed to work around bugs in prior versions running on the
remote.

FossilOrigin-Name: 4855e04e44e8fce2d6e37dd468eb6e9f4565c36cbc964156e65ac0449d7c212f
2025-05-03 10:35:32 +00:00
drh
e2826db73a Improvements to protocol negotiation.
FossilOrigin-Name: 4f5a06e42010c3e047429f736ffb8e2e89a1eb599277c176945b57710f6713ca
2025-05-03 07:00:51 +00:00
drh
5f4d013732 Clean up command-line parsing. Add the undocumented
-protocol option for debugging.

FossilOrigin-Name: 2a52b174e6e91cd7cfca0b20b39cdd231f377c7bc073f4223574556b94b16aa5
2025-05-02 23:50:30 +00:00
drh
bef9565485 Now appears to be working. More testing needed. Refinement of the
version-2 algorithm needed.

FossilOrigin-Name: cb035181d9fb5909696b8ec8f9c3eeb7a7dfb4b50e82e1d3f2d5ad150afcc0ff
2025-05-02 22:25:40 +00:00
drh
f124ddf36a Bug fixes. Added new debugging features to better visualize the
protocol.

FossilOrigin-Name: c70330668690e7c3c55ae34137d5b2c91871432004b82b2b23a89fc3f1322a62
2025-05-02 18:32:46 +00:00
drh
fbafaa5619 This is the start of an experiment in getting sqlite3_rsync to use less
bandwidth when the two databases are very similar, by sending hashes
over blocks of pages initially, rather than over individual pages, then
requesting more detail when hashes do not match.

FossilOrigin-Name: 266b4b8f0104bd4b1cff87ed78b0223006bf661a9650294a2b330d50c7ee8a0c
2025-05-02 17:39:21 +00:00