1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00
Commit Graph

29860 Commits

Author SHA1 Message Date
272344d206 Internal configure script cleanups. Resolve an as-yet-hypothetical corner case involving the --dev flag mixed with custom CFLAGS containing SQLITE_ENABLE... or SQLITE_OMIT... flags. Fix an unrelated API doc typo reported in [forum:606ea661df|forum post 606ea661df].
FossilOrigin-Name: 0554c00f32b7cc81d35340080df10ea6d66c9ff07fe749ea76cc523a4149b5c8
2025-03-03 14:15:13 +00:00
31b72ff521 Minor configure script doc tweaks. This is also a note that the basic elements of the build run as-is on Haiku OS Beta 5 but the tcl bits do not (for lack of tclConfig.sh).
FossilOrigin-Name: acf9babf0efc346b26c8ac02c0bd973498bf1604b47fe320de14027f9b21ed33
2025-03-03 11:48:09 +00:00
drh
c171cf1ef7 Ensure that detection of control characters by comparison against 0x1f
uses unsigned characters. [forum:/forumpost/4c344ca61f|Forum post 4c344ca61f].

FossilOrigin-Name: b7c5ce84216cc7f5a3ba07404572edb94fd628b3a7421111cd5f5333f3e56ea8
2025-03-02 20:29:49 +00:00
c9cc6a5474 Use SQLITE_EXTRA_INIT_MUTEXED instead of SQLITE_EXTRA_INIT for the SQLITE_WASM_EXTRA_INIT feature, as suggested in [forum:14183b98fc0b1dea|forum post 14183b98fc0b1dea]. This doesn't make a functional difference now - this is in the name of future-proofing against eventual threading support in wasm.
FossilOrigin-Name: 46479c2e30b9676e0fa8da117ba67f673671fb340c9bea38ece19a1b2371a57b
2025-03-01 23:44:11 +00:00
drh
8346ceef5a Add an assert() in vdbesort.c to help both humans and static analyzer AIs
understand why a particular array cannot overflow.

FossilOrigin-Name: a14d4afd5020af327629e5c72b0699ddab0ef4e3f23938a1b72669aa29fc2e87
2025-03-01 11:47:01 +00:00
drh
557974e126 In the CLI, ensure that all calls to ctype.h macros are cast to unsigned char.
Apparently cygwin needs this.

FossilOrigin-Name: 44bd44532d4a63b2f600427dc425bde618bcc21e4abffaa2ec19f27350e54732
2025-02-28 15:54:28 +00:00
cf794e17cc Latest upstream autosetup. Fixes two minor corner-case issues which we haven't yet seen in practice.
FossilOrigin-Name: 5c2438a719de6787c2f7c9f38d14d5ccdb8d36a120657661ec28051c83a93270
2025-02-28 04:58:43 +00:00
da5f813878 Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.
FossilOrigin-Name: f50c21484d3cac73589da0376c423de39ae8b842218105786c5aa3726e4dcaed
2025-02-27 21:17:55 +00:00
3398441bfc Reimplement testrunner_data.tcl::trd_get_bin_name() to assume a .exe extension on all platforms not matching "unix", to avoid having to do file-exists checks.
FossilOrigin-Name: ce5519102a1b4df5d513835974799cdcda3478ec53ae99bbb631951095291919
2025-02-27 19:40:02 +00:00
drh
1d54203394 Strive to make sorts stable in the mkpragmatab.tcl build script, so that
we get consistent amalgamations regardless of platform.
[forum:/forumpost/c9914addebf3da51|Forum thread c9914addebf3da51].

FossilOrigin-Name: 3f57584710d611748eb0af797c58c72e4ac099db09f5286cafdbd9a8ce354c90
2025-02-27 16:07:49 +00:00
drh
157d9276a0 Merge back a sequence of three changes that were branched due to a build break.
FossilOrigin-Name: 67809715977a5bad0ec7830e27746aba2080852eb725d471c0fd62d4f464a884
2025-02-27 15:55:01 +00:00
drh
29820d39d8 Fix build break in [e2bd23f251359e7a].
FossilOrigin-Name: 6ed84211033ee0ff00c8fd088979fe06d3a264e4f935162f36a62c00af135c63
2025-02-27 15:52:15 +00:00
dan
fd3938fbca Add support for SQLITE_EXTRA_INIT_MUTEXED - like SQLITE_EXTRA_INIT, but is called from within sqlite3_initialize() when the SQLITE_MUTEX_STATIC_MAIN mutex is still held.
FossilOrigin-Name: 3cf88d429f6e7c10b8f19c283151541924c4bb84bbd0d2e05cabdd4f9f0e88c9
2025-02-27 11:03:54 +00:00
129203bce3 Internal doc typo fixes reported in [forum:01d15f21b6|forum post 01d15f21b6].
FossilOrigin-Name: d6514c20ff583ccc4fb3a526fb8f86a563224f513ee10bb39a978046bd952726
2025-02-27 03:23:33 +00:00
e1e822ca23 Teach testrunner how to run local binaries which have a .exe extension. Also teach it to recognized mingw environments (but actually building the test programs there currently doesn't work).
FossilOrigin-Name: e2bd23f251359e7a818c4cfacf114aa9fd8c0a9a1cb802654e96fad67b505508
2025-02-26 19:22:52 +00:00
94c42564f3 Test testrunner.tcl to identify an msys environment.
FossilOrigin-Name: e9f777ceda9fca51c37caca0afeadfc3f99b86e945496f52c71adcc520dcee98
2025-02-26 18:31:42 +00:00
666bbd4641 Undo part of [69e83ab859c], as that order of operations breaks the --prefix=... configure flag. Found a workaround for the library version and OS/environment info being emitted when --help.
FossilOrigin-Name: cd2a84a72c922c330441d6b75df0c8b2f6df2c25bc7c37ac37046fffd702624a
2025-02-26 17:11:25 +00:00
68d88cfec5 configure: extend the readline detection a bit so that it can find readline on termux environments without having to be told where it is. Fix a typo in a libedit-related message.
FossilOrigin-Name: 52f528c4be4ee4ae4ee4c05009c33bb97269d27380ce2cdd717a514616f39be7
2025-02-26 16:15:34 +00:00
a37aec123a Shift some bootstrapping configure bits to avoid emitting extra output if --help is specified.
FossilOrigin-Name: 69e83ab859ca37c047defdaba84e80d028b30045631e773bd8dfa286c41a57e8
2025-02-26 09:14:26 +00:00
69eaadbee3 Merge trunk into the sahpool-digest branch.
FossilOrigin-Name: fc1eeb7d1f2880907b0fe71a8c572dd7cd74a5d65ec0177332976ad2f8c2b216
2025-02-26 03:32:52 +00:00
d804893762 Fix a bug in mkwasmbuilds.c which caused sqlite3.wasm to get deleted directly after it was built.
FossilOrigin-Name: 1a72d1d13e42f69f02861f8ac3058e69b78d4fd2050ca8c53a1ce016b7e0863d
2025-02-26 03:20:26 +00:00
d2f7dfa619 More work on the sahpool digest fix. New/fixed versions can read legacy (no digest) files but the reverse is only possible in limited circumstances (when files originated from a legacy version). The burning question is whether the real fix would be to remove this digest check altogether, as it only applies in a very limited context, and the fact that it was broken for some 18 months unnoticed suggests that its value might not be worth the CPU cycles.
FossilOrigin-Name: 0df62b776c68bebb0e187b353b6f29b0a41a29f0a1c8d6728fa6b9f7ce0d13f7
2025-02-26 03:03:08 +00:00
drh
b5f74ee637 Disable some misuse tests that sometimes cause segfaults during
"make releasetest".

FossilOrigin-Name: 5856251a7e8a69aa181f89533bc2a78812d8b450a407b4b2f73f0c146cd78072
2025-02-25 21:16:13 +00:00
5d60f47001 Approximately 50 typo fixes, spanning the whole tree, contributed via [forum:006c8fa165083ac3|forum post 006c8fa165083ac3] and individually checked for correctness. Affects only code comments, docs, and a single line of debug output in a test app.
FossilOrigin-Name: af928818a030924060ee0762431dae0f16d53a62f4e1132754d052eb9c621ac2
2025-02-25 20:55:14 +00:00
drh
b8ec04ee02 Fix a test case that was broken when the default --escape type was changed
by the previous check-in.

FossilOrigin-Name: 5f2531e068b4856db2270518c370b65cbd0c0ab5443d76f1fb1116fe9ad80296
2025-02-25 20:36:46 +00:00
drh
846643ebad Change the default control-character escape algorithm from "symbol" to
"ascii", since the "ascii" algorithm works even on terminals that do
not support unicode.

FossilOrigin-Name: d35320495eb282601ab4f3b9efc53c7c1d58e890f025317e34c7046a43c8cb53
2025-02-25 20:10:46 +00:00
drh
1c03a34400 Fix harmless "unused parameter" compiler warnings.
FossilOrigin-Name: 7a68a3ead8e6c75203641542256bcfa05067bed4bf9035452fbd134534801a08
2025-02-25 20:02:58 +00:00
drh
82769e7d04 Improved help messages for the --escape option in the CLI.
FossilOrigin-Name: e6784af6d50f715338ae3218fc8ba1b894883c27d797f0b7fd2625cac17d9cd7
2025-02-25 18:10:47 +00:00
90454d8924 Configure script cosmetics: emit the host/build system info before the directory info.
FossilOrigin-Name: 6f0b6d95db17e69ac7e46a39f52770291ac4cfe43eea09add224946a6e11f04e
2025-02-25 16:39:51 +00:00
c3d2ec2289 Restructure [826bad10e9ccd6f71e] as that structure mysteriously breaks the --prefix=... configure flag.
FossilOrigin-Name: d284230f68616b78a527d34df777b0220376ba6a00e9e927d4ffb4cbddab900c
2025-02-25 16:11:25 +00:00
drh
87ad172c50 Enhancements to help avoid problems in the CLI when trying display content
that contains ANSI escape codes:  (1) Add the --escape MODE option to the CLI
where MODE is one of "symbol", "ascii", "off" where the default is "symbol".
(2) Add the unistr() SQL function.  (3) Add the unistr_quote() SQL function.
(4) Add the %#Q and %#q conversions in the built-in printf.

FossilOrigin-Name: e3e509ae145ee2623ac68ededa59991a97fcd28313e03f67a3890b560c5381b0
2025-02-25 15:57:49 +00:00
228e51d8cd Diverse configure tweaks to better support package maintainers on the unix-on-windows environments like msys2, cygwin, and mingw, based largely on feedback in forum posts [forum:e6cf2bbb70da2922|e6cf2bbb70da2922] and [forum:828fdfe9041fd725|828fdfe9041fd725].
FossilOrigin-Name: 85b56fb0cce4b628f80b26a67b43236ef1557282775739bdbe7cc4d65948d66f
2025-02-25 15:54:07 +00:00
dan
58bc525e32 Reinstate the assert() removed by [0f6223b8]. Avoid holding a wal-mode write lock after the transaction has been rolled back if an IO error occurs while restarting the wal file.
FossilOrigin-Name: 277e150d6ab75de2407f6761aa2359df80a4e1dbce30788df06621dee05b2ef1
2025-02-25 15:27:55 +00:00
dan
18d9b12e90 Fix a test script problem causing errors with Tcl 9.
FossilOrigin-Name: dbec2c47d09027f2458036f675c8af3f8f152c0530799582eeac231649eba501
2025-02-25 13:33:43 +00:00
drh
d4c686ed8f Small performance improvement for the new %#Q conversion in printf.
FossilOrigin-Name: 17e440781e68d7d3ea68c5144e1e08e183f0caef595a6c7ac4ce56489c60f476
2025-02-25 12:18:27 +00:00
drh
17b620eb60 Update the autoconf Makefile for nmake to support SETLK_TIMEOUT.
FossilOrigin-Name: 46909fe3348976448d6a0d9e9aacaeaccdf0978c9e9d10742a96842418ab3a08
2025-02-25 12:11:57 +00:00
dan
fb8c46510e Avoid running certain tests in walsetlk2.test if SQLITE_ENABLE_SETLK_TIMEOUT is set to 2, not 1.
FossilOrigin-Name: 86788c08fa09019f224d5dbd76f06c1d113b04ca5eca5d773719194a8b02da22
2025-02-25 11:48:57 +00:00
drh
a357a90f12 Consolidate two different UTF8 encoders into a single subroutine.
FossilOrigin-Name: 6208e494858b9d362efc7db4e8aac6f8e93fe51d2e038c94dfa97c55a74688a0
2025-02-25 11:47:34 +00:00
dan
a4cf066d64 Remove an assert() added by [e88212b1] that is sometimes false.
FossilOrigin-Name: 0f6223b8f6c044db687f78e19f6373d0dda9155445c511a297efa05bac3b16e5
2025-02-25 11:29:04 +00:00
drh
c46fbec350 Fix the new shellA.test test script so that it works with Valgrind.
FossilOrigin-Name: c3949852cee320c2e02123b99c33155c459b10b2ac8e4fe80b1b7624c9ce0817
2025-02-24 23:34:50 +00:00
dan
f037440bfe Support SQLITE_ENABLE_SETLK_TIMEOUT on windows.
FossilOrigin-Name: e88212b10a7829ff42ef51a02863d788c929e54161faf492f9ef2ad90fd7074e
2025-02-24 21:27:16 +00:00
51770439ff Slightly simplify auto.def and autoconf/auto.def.
FossilOrigin-Name: d84f591b962ea44efb902043444e4e54bc55e5bb32e5108f04df824407c412dd
2025-02-24 20:53:50 +00:00
drh
81d44c7e3e Use an assert() to fix a harmless (false-positive) scan-build warning
in the CLI.

FossilOrigin-Name: 4c56cd7392f114e27b43d8fcc79444c3078cd65285ba7dd3338a414e2a9f5392
2025-02-24 20:13:29 +00:00
31d54ad041 autoconf/auto.def: remove a define which made superfluous by [b8bf966628c0]. Add a check/status message for whether to statically link the library into the CLI shell.
FossilOrigin-Name: df95e908cacc7e8e749701ff49d2ce02a927c58a474dd9a362d5f84cb3d7413f
2025-02-24 18:45:30 +00:00
b16c76408a configure: in autoconf build if both --disable-shared and --disable-static-shell are used together, ignore the former and emit a notice to that effect.
FossilOrigin-Name: b8bf966628c0cbbb6f0bc09a70800ac0b6b7f8c2d2f70c91f4b6e65daae0b192
2025-02-24 18:14:27 +00:00
drh
e4f7af1908 Only use unistr() in columnar formats when strictly needed.
Do not use unistr() in insert mode when --escape is off.
More test cases.

FossilOrigin-Name: e029828de91b10b4c7f4a19bc70c35e4f36fae4ebf32b40553a6ba9f2b3af295
2025-02-24 17:50:49 +00:00
drh
b6205d4bc3 Add the unistr_quote() function that works like quote(), but also escape
control characters using unistr() if necessary.

FossilOrigin-Name: e99e37b54baf7283588ead4983e613a1e14c58a0b92be5f7b25b4d9d287b5324
2025-02-24 13:51:24 +00:00
drh
7db5e50b8d Bug fix and initial test-case infrastructure for control-character escaping
in the CLI.

FossilOrigin-Name: c809997792602a7299b8ab84d018a03d291695e308ce750fc8b9d7a824edfd6e
2025-02-24 13:27:16 +00:00
drh
21b431e685 Ongoing work to get all the quoting and escaping variations in the CLI
working correctly.

FossilOrigin-Name: b77aea93e7eff0af408f598727caedcfc4428361b8440fbc1cc54c18f93abb69
2025-02-24 12:41:30 +00:00
d2060072f3 Configure doc tweaks. Move the package version/build dir output so that it does not appear at the start of --help text, but otherwise still appears before the first output from low-level config initialization.
FossilOrigin-Name: 826bad10e9ccd6f71e6dad90d41fb7d4a941e459d2e080901345ed8877ad5e38
2025-02-24 12:19:06 +00:00