1f3207a52a
Fix for forum-post [/forum/forumpost/b5fde3596c|b5fde3596c]. Also fix encoding issue for non-ASCII characters.
...
Also includes a fix from Stephan Beal, about a missing <stdint.h> include.
FossilOrigin-Name: e60198001e12f85a5d6504ce72226dfceb8666fe5ec649237fa23ae20e8aa32d
2025-03-27 17:30:49 +00:00
7b3477c776
Fix an off-by-one bug in the ".dbtotxt" command from the shell that results
...
in incorrect output.
FossilOrigin-Name: 2345094e879c5538bfea005785ce0848e6d565a49bcb48b323c258d00ccbe9b8
2025-03-27 10:59:18 +00:00
a6f6fa8675
On winOpen(), redo the read-only test on every retry attempt. Just
...
don't retry the winAccess() call.
FossilOrigin-Name: ccdd67ad9a508530ccfcec582410768c24bca4eb8b05939577fb99a50dd44b15
2025-03-26 17:05:29 +00:00
4a6de7ff7c
Further attempted improvements at fast-fail for an inaccessible
...
database file.
FossilOrigin-Name: cdeb21a312d4f1a9e3009a0baf0af33857c172f7bc22bca047dcd46a03e9c964
2025-03-26 15:51:05 +00:00
517a0e04d1
Attempt to reduce the amount of retry time when trying to open
...
an inaccessible database file on Windows. See
[forum:/forumpost/e7991420f54dca50|forum thread e7991420f5]
FossilOrigin-Name: 986e45912cde7cb8e6db8ba7a9364aef7187a23032be64ef6cd573163f56676d
2025-03-26 14:45:15 +00:00
b0c3118cad
Clarify and reduce redundancy in an assert() in walChecksumBytes().
...
FossilOrigin-Name: 3c53abf5e6df446d569040042363265737aa10fc8aaa20b31c587100c557c5e7
2025-03-24 23:08:40 +00:00
7f4efdcb65
Teach the CLI that VT100-escape codes that do things like change font
...
colors have zero-width for the purpose of laying out the columns of a
table.
FossilOrigin-Name: 2d0a8a6c38981552748ff5fc2eeba86590e0f116abac260a7fc9318de0a0dbda
2025-03-21 18:15:13 +00:00
4c13878ac2
Fix a problem in the sqlite_dbpage() table-valued function when it is
...
trying to truncate a file in locking-mode=EXCLUSIVE and the file was
obtained via sqlite3_deserialize(). Problem found by dbsqlfuzz.
FossilOrigin-Name: 346cf9794c6ce82ac32f7ccabc67240309306626709951593720abd198b103e3
2025-03-20 11:47:39 +00:00
31fd886576
Fix a problem that could occur when the RHS of an IN operator was a compound SELECT featuring an ORDER BY on a subquery that was flattened into one of the component SELECTs introduced by [baa83b460c677c21]. Forum post [/forumpost/1e17219c88].
...
FossilOrigin-Name: 7101ccd5331e36fd1a539f540e79ce0ce159be76ec422e1d9436eec6f3908c6e
2025-03-18 19:21:04 +00:00
7bd72d4abf
Fix alignment problems on Linux with -m32 and on Mac PPC.
...
FossilOrigin-Name: 8a91aeca60548d5cd19add128cf65b9c3815c9103b1ef8ff6bc02711b6d709de
2025-03-15 18:26:27 +00:00
01ef1dfc1f
Use flexible arrays for RTREE.
...
FossilOrigin-Name: 2b41776179c726586e3ff836edcf235938cf02f7c5e33c1d6954b84d4061b8d5
2025-03-14 20:19:49 +00:00
b6e8f65ffe
KeyInfo is now an indeterminate size, so we cannot declare a variable of that
...
type, only a pointer to an instance of that type.
FossilOrigin-Name: 37b687dc2d3b9dc82ed09a9c5b2c00e576b1eebe358a20d18a3da190347b644e
2025-03-14 19:07:11 +00:00
cebf06c798
Make use of the flexible-array feature of C99, when available, to try to
...
pacify -fsanitize=strict-bounds. This check-in fixes the core. There is
more yet to do in FTS3, RTREE, and in FTS5.
FossilOrigin-Name: 6fd6b32d06bd6a705e5140cd613af823b8183a6f6a9ceeeedfcf5e8b50821d68
2025-03-14 18:10:02 +00:00
dae87df198
Fix an internal doc typo reported in [forum:e25e581f917|forum post e25e581f917].
...
FossilOrigin-Name: fa6f6ccdffc50024624306900efd2538c7415d8bdd0f02835b2e9c05adab3cf1
2025-03-14 12:37:36 +00:00
1560045c32
Cherrypick the [2b582c0097e33] doc addition, which was initially committed to the wrong branch.
...
FossilOrigin-Name: f786de8d1873cd27b1bf83273a1e100e9d481144674888ccf65974e003a3caad
2025-03-14 09:34:09 +00:00
62d9d70edd
The --echo flag on the CLI also echos dot-commands provided on the command-line.
...
FossilOrigin-Name: 6ec0c03b954cf705da076d035a1cc2e784233ae28857385379e44a59af6c5ec4
2025-03-12 15:17:13 +00:00
642479d1cd
Ensure that the TEMP database has been initialized at the beginning of
...
a call to sqlite3_open_blob() for the TEMP database. Fix for the issue
reported by [forum:/forumpost/0a556d619b|forum post 0a556d619b].
FossilOrigin-Name: 2cfccdbe08b7b14a6b255f7157ac20d0807327adefcb33fcffeeed14c7603fe1
2025-03-10 22:31:55 +00:00
eed4e1d2df
Disable the [d1ba200234f40b84|count-of-view optimization] if any subquery
...
is DISTINCT, as the optimization does not work in that case.
Bug reported by [forum/forumpost/a860f5fb2e|forum post a860f5fb2e].
FossilOrigin-Name: d7013b63932b2f5750572ae6bdd259a2b6e6548c20fb9a5559edd22d2f2fc6cb
2025-03-10 10:32:31 +00:00
47991d973a
Various typo fixes reported by Daniel Dumitriu. No functional changes.
...
FossilOrigin-Name: 37e6ec777445d8ef81acecbb66f86ae78f2ae67ef0bfd3fbd089da51fff35cc9
2025-03-06 09:08:38 +00:00
ba6510a399
Additional 'array index is signed char' warning cleanups for the shell and its embedded extensions, analog to [44bd44532d].
...
FossilOrigin-Name: f31042595b8f8a378db9778c9a8223b07ec02cf2f528581ba43bf72b5b03c964
2025-03-06 07:48:45 +00:00
fc9b5d2a95
Have the recover module add "PRAGMA foreign_keys = off" to SQL output. Have the shell tool add ".dbconfig defensive off".
...
FossilOrigin-Name: dcfe3d3292851aa48a085a2c68623b049e2786c8dc7154ccc78508443973b5a1
2025-03-05 19:39:02 +00:00
bee4fb401e
Always ignore comments in the schema of a database, even if
...
SQLITE_DBCONFIG_ENABLE_COMMENTS is turned off.
FossilOrigin-Name: 373ae3f4de526c636c35db03d6b5c84526d6f144c1c3bebcbb257e52f563a203
2025-03-05 18:18:17 +00:00
427e0076a9
Use AtomicRead() and AtomicWrite() to access the pcache1_g.bUnderPressure
...
global, to forestall unnecessary angst from thread analyzers.
FossilOrigin-Name: 41ec85637a7fac710a3986ee78ed25a96d331a03653069bae4d9f826cc6f944a
2025-03-05 17:12:42 +00:00
9f19ea83e7
Improvement output for ".schema --indent" in the CLI when the schema contains
...
partial indexes with long and complicated WHERE clauses.
FossilOrigin-Name: defd7187ff8c4388f8b5467ed168462ec48215a1f4263bc4128b8e4d89a0bb2a
2025-03-05 16:35:51 +00:00
e34ad2b0b3
tclsqlite3 patch from Christian Werner: replace FILE handles with TCL channels for the db copy command.
...
FossilOrigin-Name: ea1f7f8de4abb80fe41a115c9f601ff27cd728493640c6d47d868913feec28dc
2025-03-04 21:25:18 +00:00
3ce81095f9
Minor doc typo fixes via [forum:65bd941da8|forum post 65bd941da8].
...
FossilOrigin-Name: 6f6a03e93cf58eaee79603de0b28ad34c872fb4b4b7d9c4e7fe35c698b27618a
2025-03-04 06:29:03 +00:00
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
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
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
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
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
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
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
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
1c03a34400
Fix harmless "unused parameter" compiler warnings.
...
FossilOrigin-Name: 7a68a3ead8e6c75203641542256bcfa05067bed4bf9035452fbd134534801a08
2025-02-25 20:02:58 +00:00
82769e7d04
Improved help messages for the --escape option in the CLI.
...
FossilOrigin-Name: e6784af6d50f715338ae3218fc8ba1b894883c27d797f0b7fd2625cac17d9cd7
2025-02-25 18:10:47 +00:00
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
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
d4c686ed8f
Small performance improvement for the new %#Q conversion in printf.
...
FossilOrigin-Name: 17e440781e68d7d3ea68c5144e1e08e183f0caef595a6c7ac4ce56489c60f476
2025-02-25 12:18:27 +00:00
a357a90f12
Consolidate two different UTF8 encoders into a single subroutine.
...
FossilOrigin-Name: 6208e494858b9d362efc7db4e8aac6f8e93fe51d2e038c94dfa97c55a74688a0
2025-02-25 11:47:34 +00:00
a4cf066d64
Remove an assert() added by [e88212b1] that is sometimes false.
...
FossilOrigin-Name: 0f6223b8f6c044db687f78e19f6373d0dda9155445c511a297efa05bac3b16e5
2025-02-25 11:29:04 +00:00
f037440bfe
Support SQLITE_ENABLE_SETLK_TIMEOUT on windows.
...
FossilOrigin-Name: e88212b10a7829ff42ef51a02863d788c929e54161faf492f9ef2ad90fd7074e
2025-02-24 21:27:16 +00:00
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
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
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
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
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
b081a391ce
Merge latest changes from trunk into this branch.
...
FossilOrigin-Name: 55324d1c862c42b95251a398c40930d9fa94debb1aec7d3d0ae734d6b17b4a59
2025-02-24 10:52:34 +00:00
6a9c3b407e
Make column output modes in the CLI responsive to the --escape setting.
...
FossilOrigin-Name: 14ff5557d450475ad959f8c753c0cecb85dfca7346fcacd91da16e4d36e30508
2025-02-24 00:40:36 +00:00