]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 years agoBug fixes in the logic to skip over JSON5 comments.
drh [Fri, 28 Apr 2023 23:38:54 +0000 (23:38 +0000)] 
Bug fixes in the logic to skip over JSON5 comments.

FossilOrigin-Name: c736b77a2fc5f8f2ba8f770adf05443dfdc3a9847ee519f411e661f76756d611

2 years agoBug fix in the offset computation for json_error().
drh [Fri, 28 Apr 2023 23:19:11 +0000 (23:19 +0000)] 
Bug fix in the offset computation for json_error().

FossilOrigin-Name: 8f7ab5d9210490eb451534df246b82081a5aa252a1bd662659df3da429290837

2 years agoImprovements to the accuracy of json_error(). Add the extension SQL
drh [Fri, 28 Apr 2023 17:38:35 +0000 (17:38 +0000)] 
Improvements to the accuracy of json_error().  Add the extension SQL
functions random_json(SEED) and random_json5(SEED).

FossilOrigin-Name: 8d09dc1c45a8026b94f70273d064e47939f30cadedc17548b5a26ba054a8d3a7

2 years agoAdd the json_error(X) function that returns the 1-based character offset to
drh [Fri, 28 Apr 2023 14:48:11 +0000 (14:48 +0000)] 
Add the json_error(X) function that returns the 1-based character offset to
the first syntax error in JSON5 string X, or 0 if there are no errors.

FossilOrigin-Name: 901ad995d5a722ca2672516205ff488e9acd703a828ca5fc43f11fca5f2af120

2 years agoFix indentation and omit trailing whitespace in the random JSON generator
drh [Fri, 28 Apr 2023 13:25:35 +0000 (13:25 +0000)] 
Fix indentation and omit trailing whitespace in the random JSON generator
script.

FossilOrigin-Name: 629db09fceb7bf37561b52ccee06ebf4df261291e9a8ffcca82b243f6db5ff07

2 years agoFix json_tree() so that it is able to deal with the JNODE_RAW labels of
drh [Fri, 28 Apr 2023 11:02:01 +0000 (11:02 +0000)] 
Fix json_tree() so that it is able to deal with the JNODE_RAW labels of
a JSON5 object.

FossilOrigin-Name: f56528d413d8e622f7c4f18b2f9f2e620bfb441c020461299b35a90072ee6c13

2 years agoMerge all the latest trunk fixes and enhancements into the json5 branch.
drh [Fri, 28 Apr 2023 10:23:01 +0000 (10:23 +0000)] 
Merge all the latest trunk fixes and enhancements into the json5 branch.

FossilOrigin-Name: b5ca15cfc19380cf870b70be6a86e70f2026cc3d6d89005b45891d58c4f11c2d

2 years agoDo not assert() a bad string representation in an sqlite3_value after
drh [Fri, 28 Apr 2023 10:10:52 +0000 (10:10 +0000)] 
Do not assert() a bad string representation in an sqlite3_value after
an OOM.  dbsqlfuzz c822a17a23c524a0ac7cfb203c7198209da15de8.

FossilOrigin-Name: 91fee79a01971259b21478e60a069a711a00efc79ddfececa6224a152cd8d09a

2 years agoMake CLI .load slightly harder to abuse.
larrybr [Fri, 28 Apr 2023 00:28:06 +0000 (00:28 +0000)] 
Make CLI .load slightly harder to abuse.

FossilOrigin-Name: 2779f9270cc431786d0e16ef05ec05b0f22dda2307f3bf17467ad0b25304e160

2 years agoIn the CLI, early out from the output_quoted_string() routine if the
drh [Fri, 28 Apr 2023 00:19:55 +0000 (00:19 +0000)] 
In the CLI, early out from the output_quoted_string() routine if the
input string is NULL.  [forum:/forumpost/8a22c0bfa7|forum post 8a22c0bfa7].

FossilOrigin-Name: 2881978d7b7014738a21c590b0430c4fa40e6b00b9547d0284b7656124523ae9

2 years agoUse a new technique to detect fresh OOM faults in columnName() that does not
drh [Thu, 27 Apr 2023 23:59:51 +0000 (23:59 +0000)] 
Use a new technique to detect fresh OOM faults in columnName() that does not
rely on there being no OOMs prior to entry into columnName(), as
[forum/forumpost/fb6811c2f9|forum post fb6811c2f9] demonstrates a technique
which could cause an OOM prior to entry into columnName().

FossilOrigin-Name: a63346d6a0c0ca7ba4c87499de2e461be9c77e9b5d98f2bebf308cdb6599f33c

2 years agoRemove a faulty assert() from the CLI.
drh [Thu, 27 Apr 2023 23:44:38 +0000 (23:44 +0000)] 
Remove a faulty assert() from the CLI.
[forum:/forumpost/726c4f7db0|Forum post 726c4f7db0].

FossilOrigin-Name: 4bbebb6bfb9910265d91b777c1711b3b8e0732bcf299f7459b20c4ea110422bd

2 years agoRemove an ALWAYS() macro that can in fact sometimes be false.
drh [Thu, 27 Apr 2023 23:40:03 +0000 (23:40 +0000)] 
Remove an ALWAYS() macro that can in fact sometimes be false.
[forum:/forumpost/f0e872fcee|Forum post f0e872fcee].

FossilOrigin-Name: d85880e4ed89e2198beea642818051f7a91a71fea9929be0a7ed0603b493ce47

2 years agoTest cases added, and some bugs fixed.
drh [Thu, 27 Apr 2023 23:29:09 +0000 (23:29 +0000)] 
Test cases added, and some bugs fixed.

FossilOrigin-Name: bc84a82e4ddc1b71025c56c49e62a44f0b12fa87a6417ad61967d9d3121a0d4e

2 years agoFix compilation issues seen with older versions of MSVC.
mistachkin [Thu, 27 Apr 2023 22:17:12 +0000 (22:17 +0000)] 
Fix compilation issues seen with older versions of MSVC.

FossilOrigin-Name: 4ba2a651120391d779a3db9881c0fb17e1322cc9d8738f915a46e31a2f313578

2 years agoAdjust OSTRACE usage so that it works with the changes in the previous check-in.
mistachkin [Thu, 27 Apr 2023 21:31:21 +0000 (21:31 +0000)] 
Adjust OSTRACE usage so that it works with the changes in the previous check-in.

FossilOrigin-Name: 1eb4573e9092d350d00d05ba716cb0272e2dbb1ecbaadc2a7cc22de0b8cc2bda

2 years agoFurther optimizations to the JSON parser.
drh [Thu, 27 Apr 2023 19:30:53 +0000 (19:30 +0000)] 
Further optimizations to the JSON parser.

FossilOrigin-Name: bb8f1c16f244f893170f3d03bc445bd15fc337804c7c3e76c548397f5b95b39a

2 years agoFaster implementation of numberic literal parsing in JSON.
drh [Thu, 27 Apr 2023 19:13:20 +0000 (19:13 +0000)] 
Faster implementation of numberic literal parsing in JSON.

FossilOrigin-Name: 58398292e8473b0b9e4b77dd5ed27334bc24a85d0c399e8d0b86de6fb59dadce

2 years agoAdd support for hexadecimal integer literals in JSON.
drh [Thu, 27 Apr 2023 18:28:10 +0000 (18:28 +0000)] 
Add support for hexadecimal integer literals in JSON.

FossilOrigin-Name: 85e00c9e68d0695592e8f72555ee133c096bfca5a860a8e21d1e0ef756705aaf

2 years agoAll floating point literals "NaN" and "Infinity". Additional variants
drh [Thu, 27 Apr 2023 17:32:29 +0000 (17:32 +0000)] 
All floating point literals "NaN" and "Infinity".  Additional variants
of these literals are available if compiled with SQLITE_EXTENDED_NAN_INF.

FossilOrigin-Name: c13346afbecb92275e741252897d00478dab4be2d158889bc735e80efd9444f5

2 years agoFix handling of reverse solidus in string literals. Allow decimal points
drh [Thu, 27 Apr 2023 16:57:14 +0000 (16:57 +0000)] 
Fix handling of reverse solidus in string literals.  Allow decimal points
in floating point literals to occurs and the beginning or end of the mantissa.

FossilOrigin-Name: d92a6ab2871095ac66c60cfa15dbafa7b762f83d287d452f61792eb30cf5b26b

2 years agoFix the handling of escape solidus in the JSON routines.
drh [Thu, 27 Apr 2023 16:24:12 +0000 (16:24 +0000)] 
Fix the handling of escape solidus in the JSON routines.

FossilOrigin-Name: 676877aca235e620ee12d10235dd6ad009d4968455ec170daeb1998b94a7e0a2

2 years agoJSON string literals may span multiple lines by escaping new line characters.
drh [Thu, 27 Apr 2023 15:48:58 +0000 (15:48 +0000)] 
JSON string literals may span multiple lines by escaping new line characters.

FossilOrigin-Name: 66da4bd4a30c390fa1a7960ce2edaef82e63971ecf33ffb6b906db9f278041c5

2 years agoAllow the labels on JSON objects to be unquoted identifier names.
drh [Thu, 27 Apr 2023 15:11:26 +0000 (15:11 +0000)] 
Allow the labels on JSON objects to be unquoted identifier names.

FossilOrigin-Name: fb428db3f64f148ab9a3478fdcc8b3733e58102b3c8895a482e2551d974d5661

2 years agoPerformance optimization in the JSON parser.
drh [Thu, 27 Apr 2023 14:38:51 +0000 (14:38 +0000)] 
Performance optimization in the JSON parser.

FossilOrigin-Name: 5a88ba743f55d45b1c0ce0090bb3b396bcf7fcf7b3bcb989aaf30b8bb772599e

2 years agoFix a problem on windows sometimes causing SQLITE_NOMEM to be returned if an error...
dan [Thu, 27 Apr 2023 13:55:29 +0000 (13:55 +0000)] 
Fix a problem on windows sometimes causing SQLITE_NOMEM to be returned if an error occurred while opening a temp file.

FossilOrigin-Name: c22a39a6b28e3039fe453c0c0db98744b8a63ef9063cc3f6e0ed67d2506d34be

2 years agoPermit JSON5 whitespace in all contexts of objects and arrays.
drh [Thu, 27 Apr 2023 13:44:26 +0000 (13:44 +0000)] 
Permit JSON5 whitespace in all contexts of objects and arrays.

FossilOrigin-Name: 93f3ab26b57c0469862a56e97d4b3c796b27f9f582046fcff1f2aa8d8910c550

2 years agoTranslate JSON5-only string literal escape sequences into the JSON equivalents.
drh [Thu, 27 Apr 2023 12:24:00 +0000 (12:24 +0000)] 
Translate JSON5-only string literal escape sequences into the JSON equivalents.

FossilOrigin-Name: 14e82f36eed31af1237898728bf353b968523c62b1f8d1d90dbbabd92d0c2834

2 years agoImplement some of the JSON5 enhancements to string and numeric literals.
drh [Wed, 26 Apr 2023 20:26:14 +0000 (20:26 +0000)] 
Implement some of the JSON5 enhancements to string and numeric literals.
This is an incremental check-in of work in progress.

FossilOrigin-Name: 9508efa9d61c0ff0eb73100dd52889dadc5fa2a2091b944a9b8a74e8a5c50e82

2 years agoFix a typo in a printf() format string the sessions module.
dan [Wed, 26 Apr 2023 18:50:49 +0000 (18:50 +0000)] 
Fix a typo in a printf() format string the sessions module.

FossilOrigin-Name: 14d1c4a828660bc137dcea1bb4cc439e1ed3872867a0dab486f6a639ef3bcc45

2 years agoWhen changing a large integer into a floating point value, cancel the
drh [Wed, 26 Apr 2023 18:23:47 +0000 (18:23 +0000)] 
When changing a large integer into a floating point value, cancel the
string representation.  Fix for
[forum:/forumpost/5c74a3bc4a|forum post 5c74a3bc4a].

FossilOrigin-Name: 3e2da8a7e35c839128d26aac575605e1e34889e8ab3484440bdd65c4d752c6bb

2 years agoPartial implementation of JSON5 numeric literal extensions. Use a switch()
drh [Wed, 26 Apr 2023 17:30:28 +0000 (17:30 +0000)] 
Partial implementation of JSON5 numeric literal extensions.  Use a switch()
statement in the parser for better performance.

FossilOrigin-Name: 78404dc37024cad5fe7eacf78ea85b56f08b129a1b9a046c3e1b11275068a485

2 years agoImprovement to the way the JSON performance measure scripts work → keep the
drh [Wed, 26 Apr 2023 15:58:08 +0000 (15:58 +0000)] 
Improvement to the way the JSON performance measure scripts work → keep the
test database in the directory of the test, not in the source tree.

FossilOrigin-Name: ac411dbdcbf0b9040fb5b7de173271f383a6aa303d57f22ebd200809a5b4a6d3

2 years agoWork toward implementing JSON5 whitespace. Untested and incomplete.
drh [Wed, 26 Apr 2023 15:19:19 +0000 (15:19 +0000)] 
Work toward implementing JSON5 whitespace.  Untested and incomplete.

FossilOrigin-Name: d262c059455ebe0650a45a6c1c04d1baf9609c635df352732dd192426e1bdc39

2 years agoFix to the json-speed-check.sh script.
drh [Wed, 26 Apr 2023 13:52:20 +0000 (13:52 +0000)] 
Fix to the json-speed-check.sh script.

FossilOrigin-Name: d839c9544d7f28c1abc779eb2d40f95c1a9386984656fbd29d19b1e7830171bc

2 years agoAdd scripts for JSON performance testing.
drh [Wed, 26 Apr 2023 13:25:30 +0000 (13:25 +0000)] 
Add scripts for JSON performance testing.

FossilOrigin-Name: 3051d6a7c12cbf86634d8fab64f3f3bc9a1eb184260e56a82eb543cb634ba7ef

2 years agoThe json_valid() function only returns true for pure JSON. JSON5 (or
drh [Tue, 25 Apr 2023 21:24:20 +0000 (21:24 +0000)] 
The json_valid() function only returns true for pure JSON.  JSON5 (or
at least that subset of JSON5 that has been so far implemented) is accepted
by all routines, but json_valid() still returns false for JSON5 inputs.
The new json_valid5(X) routine returns true or false if X is or is not valid
JSON5.  All of this is experimental and subject to change.

FossilOrigin-Name: 5d33ab77800765c8b3a13ffcc02ba8a348d71b2b425924560418b517d723494d

2 years agoAllow the sessions module to be configured to capture changes from tables with no...
dan [Tue, 25 Apr 2023 20:41:19 +0000 (20:41 +0000)] 
Allow the sessions module to be configured to capture changes from tables with no explicit PRIMARY KEY.

FossilOrigin-Name: 5d4431bc44e206f48f3bcc1f51399b38bd4cb418e7e50a37495475fb8da04646

2 years agoRemove unused variable ltoj accidentally added by [1783655e].
dan [Tue, 25 Apr 2023 14:54:18 +0000 (14:54 +0000)] 
Remove unused variable ltoj accidentally added by [1783655e].

FossilOrigin-Name: faa1575ce0a39a2335a77057e8769a4e67aedd6326b4627988d03f0cb21fc39a

2 years agoAvoid assuming that an expression in an ON() clause that evaluates to zero implies...
dan [Tue, 25 Apr 2023 14:37:12 +0000 (14:37 +0000)] 
Avoid assuming that an expression in an ON() clause that evaluates to zero implies that the query will return zero rows when the query contains a RIGHT JOIN. [forum:95849acbe1|Forum Post 95849acbe1].

FossilOrigin-Name: 1783655ea422185e75593b89e4ef452a6f5496aefd389f88ce7fe4b7d41d6a98

2 years agoHandle newline-trimmed input TEXT correctly in base64, base85 UDFs.
larrybr [Tue, 25 Apr 2023 04:28:39 +0000 (04:28 +0000)] 
Handle newline-trimmed input TEXT correctly in base64, base85 UDFs.

FossilOrigin-Name: 8f637aae23e6638c064a34262dcf16a3cdfd000fb1fa1b2a834b292fe6659408

2 years agoCheck for OOM sqlite_value_x() returns in base64, base85 extensions.
larrybr [Tue, 25 Apr 2023 02:44:53 +0000 (02:44 +0000)] 
Check for OOM sqlite_value_x() returns in base64, base85 extensions.

FossilOrigin-Name: e6f9c0b1f963033a8e17d13935c5c6b12d263fe10c585035a3d1f1154c6ba5d6

2 years agoAllow trailing commas in objects and arrays of JSON.
drh [Mon, 24 Apr 2023 23:14:34 +0000 (23:14 +0000)] 
Allow trailing commas in objects and arrays of JSON.

FossilOrigin-Name: 4031b231c223db598b45dbd192b027a99a9b82a981d43c75f723a3fb06720b82

2 years agoUpdate the compile-time detection of architecture byte-order in the RTREE
drh [Mon, 24 Apr 2023 19:23:42 +0000 (19:23 +0000)] 
Update the compile-time detection of architecture byte-order in the RTREE
extension so that it is aligned with the latest enhancements in the core.

FossilOrigin-Name: 122431d3a7267ec83768316ab146c0557fb6c0577a4a47ac6ed3d7aa6811ca9a

2 years agoAllow the sessions module to be configured to capture changes from tables with no... sessions-rowid-tables
dan [Mon, 24 Apr 2023 19:22:21 +0000 (19:22 +0000)] 
Allow the sessions module to be configured to capture changes from tables with no explicit PRIMARY KEY.

FossilOrigin-Name: 8a612f0860126c0c8473b1e65fcabb9a8821d8bf09fdf3f6018acfc99df9af71

2 years agoAdd a note about the journaling mode in the OPFS VFS. No code changes.
stephan [Mon, 24 Apr 2023 04:25:42 +0000 (04:25 +0000)] 
Add a note about the journaling mode in the OPFS VFS. No code changes.

FossilOrigin-Name: e79c95fc130fc302719690eb6391d96070aff825b2b51ef6c4ad459d9a8918d7

2 years agoCLI to have "undocumented" dot-commands, not usually shown by .help
larrybr [Sun, 23 Apr 2023 00:12:23 +0000 (00:12 +0000)] 
CLI to have "undocumented" dot-commands, not usually shown by .help

FossilOrigin-Name: 17f5dd2d2ae02a95180b9208b7de805922ba20271d3263e3193f0d46f4ec324c

2 years agoThe sqlite_stat4.idx field is case insensitive. It should work even if
drh [Sat, 22 Apr 2023 22:32:19 +0000 (22:32 +0000)] 
The sqlite_stat4.idx field is case insensitive.  It should work even if
some entries use a different case than others.  Fix for
[forum:/info/6c118daad0f1f5ef|forum post 6c118daad0f1f5ef].

FossilOrigin-Name: f097ca70b5b967d1aadebd74ac5020813e00b7c30cc543814dbf5f359d1328f1

2 years agoAvoid a crash in fts5 when combining an empty expression with another.
dan [Sat, 22 Apr 2023 20:47:08 +0000 (20:47 +0000)] 
Avoid a crash in fts5 when combining an empty expression with another.

FossilOrigin-Name: 33681ff3d29c9f096dbd8c5d885993f780e93974a7653adc00fa41a158356d7c

2 years agoEnhance the ".tables" command in the CLI so that it is able to deal
drh [Sat, 22 Apr 2023 20:22:17 +0000 (20:22 +0000)] 
Enhance the ".tables" command in the CLI so that it is able to deal
gracefully with an OOM situation.

FossilOrigin-Name: 5157fd1cf753b1c01c6c00e9ac2712da2631a673837ed15ec3420ec869ee66aa

2 years agoThe assertion-fault fix in [53a61f7423a7f057] was not quite complete. This
drh [Sat, 22 Apr 2023 20:07:48 +0000 (20:07 +0000)] 
The assertion-fault fix in [53a61f7423a7f057] was not quite complete.  This
additional change enhances it to deal with WITHOUT ROWID tables.  No changes
to deliverable code.

FossilOrigin-Name: 4d5af42c651bc1655a4f09b743f2a1424f19c1e4248e041b3fd4a042fd1f9799

2 years agoAdd the --unsafe-testing command-line option to the CLI. Without this option,
drh [Sat, 22 Apr 2023 17:41:53 +0000 (17:41 +0000)] 
Add the --unsafe-testing command-line option to the CLI.  Without this option,
features of the CLI that are intended for testing and that might result in
incorrect answers, assertion faults, and/or corrupt database files if misused
are disabled.

FossilOrigin-Name: f28256a96af4263c0caded79b7481b88e9c7e7f1af7dbb3fd5e22ff07fbedaf3

2 years agoAdd --unsafe-testing invocation option to CLI. Needs some tests added and changed. shell-for-test
larrybr [Sat, 22 Apr 2023 16:46:38 +0000 (16:46 +0000)] 
Add --unsafe-testing invocation option to CLI. Needs some tests added and changed.

FossilOrigin-Name: b3d9ac052d5c2dd1afeeeb5c9cfac9dd91a1b8d6a74a2ef10aa2037ca505abce

2 years agoFix an incorrect assert() statement in btree.c as found by
drh [Sat, 22 Apr 2023 12:47:16 +0000 (12:47 +0000)] 
Fix an incorrect assert() statement in btree.c as found by
[forum:/info/d03345d572713fe6|forum post d03345d572713fe6].

FossilOrigin-Name: cd485b302c54aef066d751a153df34eea0cd23e54a414e291f636ad9929fe78a

2 years agoFix a incorrect assert() statement in the pre-update hook logic. No changes
drh [Sat, 22 Apr 2023 12:37:41 +0000 (12:37 +0000)] 
Fix a incorrect assert() statement in the pre-update hook logic.  No changes
to production code.  Fix for the problem reported by
[forum:/info/19b217bfe709a072|forum post 19b217bfe709a072].

FossilOrigin-Name: 53a61f7423a7f057568a1d8a1e63be01a2328997850dc32e3d8c6d51f1c5ab0b

2 years agoFix harmless compiler warning in [1489e7f53a4863b3].
drh [Sat, 22 Apr 2023 12:11:31 +0000 (12:11 +0000)] 
Fix harmless compiler warning in [1489e7f53a4863b3].

FossilOrigin-Name: da907dbc60b4f754845ae0bedc05cbda4cbfed9f468be3ffdc18860c763d9324

2 years agoAlso fix no-length string intolerance for CLI json mode.
larrybr [Sat, 22 Apr 2023 11:33:27 +0000 (11:33 +0000)] 
Also fix no-length string intolerance for CLI json mode.

FossilOrigin-Name: 3ac1984039a50445ff65db97468a5313d7f09db7b604755e444b77ac9346ea76

2 years agoEarly out from sqlite3Prepare() following an OOM to avoid possible
drh [Sat, 22 Apr 2023 11:29:36 +0000 (11:29 +0000)] 
Early out from sqlite3Prepare() following an OOM to avoid possible
problems further along in the parse.  Fix for the NULL pointer dereference
reported by [forum:/info/2e5131839365682a|forum post 2e5131839365682a].

FossilOrigin-Name: f35ce7c122017009496b777f33e641d0be086abee6ea8e25aab4c3e0fb45731a

2 years agoCLI to handle absurd string length limit better. [forum:5180af725f1cc375|forum post...
larrybr [Sat, 22 Apr 2023 11:24:52 +0000 (11:24 +0000)] 
CLI to handle absurd string length limit better. [forum:5180af725f1cc375|forum post 5180af725f1cc375]

FossilOrigin-Name: 1489e7f53a4863b316af6dee10d9c66491d1bed6cf52a3538ac118c03b1d7ef9

2 years agoAvoid need for cast in CLI shell_check_oom() calls.
larrybr [Sat, 22 Apr 2023 09:26:36 +0000 (09:26 +0000)] 
Avoid need for cast in CLI shell_check_oom() calls.

FossilOrigin-Name: c88550ef6711b03a81e2e6d121e2eb99ccff6e925c025dd6e85dd81088508400

2 years agoFix unchecked return in CLI .dbi command. ([forum 79e2cd1bc](forum:)79e2cd1bc)
larrybr [Sat, 22 Apr 2023 09:14:22 +0000 (09:14 +0000)] 
Fix unchecked return in CLI .dbi command. ([forum 79e2cd1bc](forum:)79e2cd1bc)

FossilOrigin-Name: 81a74ee9d66ba23dfadd875e372ce96491dd6bf146e03e7fec8c3fd98e6be825

2 years agoChange the return type of the ts_read/write() family of functions from int to ssize_t...
stephan [Fri, 21 Apr 2023 15:37:33 +0000 (15:37 +0000)] 
Change the return type of the ts_read/write() family of functions from int to ssize_t, per report in [forum post 947169d5e7](forum:947169d5e7).

FossilOrigin-Name: 7809e7ce6a70657b8ea239eb4778698f7986a658e9177a57b2fb7814c069c936

2 years agoIncrease CLI tolerance of arifically low memory.
larrybr [Thu, 20 Apr 2023 20:07:14 +0000 (20:07 +0000)] 
Increase CLI tolerance of arifically low memory.

FossilOrigin-Name: 13f2638622871db9b91db547dcfd38f61c03e7696e4df5144adefcd86140aeba

2 years agoCLI .ar made to enforce getting a proper subcommand.
larrybr [Thu, 20 Apr 2023 16:15:20 +0000 (16:15 +0000)] 
CLI .ar made to enforce getting a proper subcommand.

FossilOrigin-Name: 104ab105ac0e96c0fc61c6d69179bf984fcfe5e0efb2c82f3742456c1b5fe5d1

2 years agoFix a function declaration so that it correctly appears as private in
drh [Thu, 20 Apr 2023 10:40:37 +0000 (10:40 +0000)] 
Fix a function declaration so that it correctly appears as private in
the amalgamation.  [forum:/forumpost/ec8c77516c|Forum post ec8c77516c].

FossilOrigin-Name: 1864569bb9fe28a5e77f34b199f26ac272dbbb1a6642dacd7e50ddd29aa567b6

2 years agoFix a broken assert() in the recovery extension. [forum:/forumpost/82a88f5812|Forum...
dan [Thu, 20 Apr 2023 10:26:56 +0000 (10:26 +0000)] 
Fix a broken assert() in the recovery extension. [forum:/forumpost/82a88f5812|Forum post 82a88f5812].

FossilOrigin-Name: 8a1ad137606ce5bddbed62f89ff9a5cd922c6530db84c12b8b27c08df3c66bc6

2 years agoAdd tests for the progress-handler callback with the fts5 'secure-delete' feature.
dan [Wed, 19 Apr 2023 20:29:26 +0000 (20:29 +0000)] 
Add tests for the progress-handler callback with the fts5 'secure-delete' feature.

FossilOrigin-Name: 48505ad950bc0902d58210be066d4672e6085eb27c525ba2bc663fde7e932ff7

2 years agoImproved rebustness of the pcache tracing logic.
drh [Wed, 19 Apr 2023 18:36:49 +0000 (18:36 +0000)] 
Improved rebustness of the pcache tracing logic.

FossilOrigin-Name: 0a43235b8368a0996d1856c4e956786a5321275458cb9179ce818aa47bb824ed

2 years agoRemove unreachable legacy code.
drh [Wed, 19 Apr 2023 18:32:32 +0000 (18:32 +0000)] 
Remove unreachable legacy code.

FossilOrigin-Name: e3e7fb87d90690c29b70da261887c8f7d87b62188d15577e48db91232e13608c

2 years agoFix a segfault that could occur if a non-empty in-memory database was the destination...
dan [Wed, 19 Apr 2023 17:07:35 +0000 (17:07 +0000)] 
Fix a segfault that could occur if a non-empty in-memory database was the destination of a backup operation from a database with a smaller page size.

FossilOrigin-Name: 020968f857d7b90bab3525fc9d6b859a019f6a80422c3d5ffb88f5bdb8e02a11

2 years agoDo not remove pages from the cache of an in-memory database due to a
drh [Wed, 19 Apr 2023 15:35:45 +0000 (15:35 +0000)] 
Do not remove pages from the cache of an in-memory database due to a
failure to acquire the page due to it being larger than the maximum page
size. Fix for [forum:/forumpost/a19bb49140|forum post a19bb49140].

FossilOrigin-Name: 982b35563da685dfdf50cbe4a7ae829d3b428e03587028df7efe520f819b1dc2

2 years agoFix ambiguity in the header comment to the sqlite3PagerUnrefNotNull() routine.
drh [Wed, 19 Apr 2023 14:26:43 +0000 (14:26 +0000)] 
Fix ambiguity in the header comment to the sqlite3PagerUnrefNotNull() routine.
No code changes.

FossilOrigin-Name: d419e65eef2954ed759121254024028854b55e8c4f52ff7a8896c8cadfc57f53

2 years agoFix a debugging printf() in pcache.c. This only comes up on custom builds.
drh [Wed, 19 Apr 2023 13:56:47 +0000 (13:56 +0000)] 
Fix a debugging printf() in pcache.c.  This only comes up on custom builds.

FossilOrigin-Name: f2d6756731caadf9a30214ab7d19717a2ca1dae2652bcc6b211f6b0830362240

2 years agoCorrect use of an undefined symbol in one of the OPFS VFS loading failure error repor...
stephan [Wed, 19 Apr 2023 13:39:13 +0000 (13:39 +0000)] 
Correct use of an undefined symbol in one of the OPFS VFS loading failure error reporting cases (copy/paste error).

FossilOrigin-Name: c81c968b458977b2d6dd2fdd3c3d667f0e7cee069f3715363d0e8aed4e6e8377

2 years agoAdd pager debug tracing of truncate operations.
drh [Wed, 19 Apr 2023 13:30:17 +0000 (13:30 +0000)] 
Add pager debug tracing of truncate operations.

FossilOrigin-Name: 0daadf36229816abe73ff684b55ef4f8045ed314347f3a694404a2084decb355

2 years agoAttempt to suppress harmless compiler warnings reported by
drh [Wed, 19 Apr 2023 12:08:46 +0000 (12:08 +0000)] 
Attempt to suppress harmless compiler warnings reported by
[forum:/forumpost/fc98845c06|forum post fc98845c06].

FossilOrigin-Name: f6e6c5f94cef83645288568a344a0ff64e4ef17b10fab28996567a94db0a002a

2 years agoCLI to cease dumping back to OS shell on single ^C when interactive.
larrybr [Tue, 18 Apr 2023 23:05:34 +0000 (23:05 +0000)] 
CLI to cease dumping back to OS shell on single ^C when interactive.

FossilOrigin-Name: ba8e4378f21d529a248d2d60b60974fef0d6612dcaaa1f6b7f8a6946fc46b39b

2 years agoAdd comment on CLI ^C fix (because it is a bit subtle.) cli-no-dump
larrybr [Tue, 18 Apr 2023 22:53:30 +0000 (22:53 +0000)] 
Add comment on CLI ^C fix (because it is a bit subtle.)

FossilOrigin-Name: 19c062f1cd814a33bf9c10928217464cddaea7c3291ff44e605901a86b82a06d

2 years agoCLI to cease dumping back to OS shel on ^C.
larrybr [Tue, 18 Apr 2023 22:28:48 +0000 (22:28 +0000)] 
CLI to cease dumping back to OS shel on ^C.

FossilOrigin-Name: 7b1f635268bd5b093b22f832c3ac9e5d642d1aac5ebc620619be5a24930feb83

2 years agoEnsure that the VACUUM command is not confused by alternative encodings when
drh [Tue, 18 Apr 2023 15:21:55 +0000 (15:21 +0000)] 
Ensure that the VACUUM command is not confused by alternative encodings when
it is the first command run on new database connection.
[forum:/forumpost/09503b4d33|Forum post 09503b4d33].

FossilOrigin-Name: 8b0fe63f873661037351fc1eba6071b98b5c97a0fc8bd8a504a90d047f78bc0d

2 years agoAnother fix to the indexed expressions in aggregate queries with GROUP BY
drh [Tue, 18 Apr 2023 14:13:54 +0000 (14:13 +0000)] 
Another fix to the indexed expressions in aggregate queries with GROUP BY
enhancement of ticket [99378177930f87bd] and implemented by
check-in [b9190d3da70c4171] to address a problem described by
[forum:/forumpost/f34e32d120|forum post f34e32d120],

FossilOrigin-Name: 5acc3ef83e16a9f2803981a6e61eca62fe177cac4eed1befe2ade3a5977a1eab

2 years agoAdd the --fullsync option to speedtest1.
drh [Tue, 18 Apr 2023 11:35:09 +0000 (11:35 +0000)] 
Add the --fullsync option to speedtest1.

FossilOrigin-Name: 960fe54c8227a376c97bb2a3ba604d97e79e27e51a9798be9d318cf56c04fa99

2 years agoFix an assert() in fts5 that could fail following an OOM or IO error.
dan [Tue, 18 Apr 2023 11:33:35 +0000 (11:33 +0000)] 
Fix an assert() in fts5 that could fail following an OOM or IO error.

FossilOrigin-Name: 49595083ba58e13d404b6a11c28f53768a257c59f3f36be3591438127df7e875

2 years agoWhen CLI -utf8 active, do no translation to MBCS for output to Windows console. plus...
larrybr [Mon, 17 Apr 2023 23:59:15 +0000 (23:59 +0000)] 
When CLI -utf8 active, do no translation to MBCS for output to Windows console. plus code style improvements

FossilOrigin-Name: 25edf6089724bf9f97c796e5abf838ec508ebc132895d8325620c16d63996fef

2 years agoMinor coding style changes.
mistachkin [Mon, 17 Apr 2023 22:28:02 +0000 (22:28 +0000)] 
Minor coding style changes.

FossilOrigin-Name: 481aa3ccf6f12c2c2fd11a1a20d8fb59f4f9b1cd8dcff0586b4f52222463d720

2 years agoWhen CLI -utf8 active, do no translation to MBCS for output to Windows console.
larrybr [Mon, 17 Apr 2023 21:18:53 +0000 (21:18 +0000)] 
When CLI -utf8 active, do no translation to MBCS for output to Windows console.

FossilOrigin-Name: cc1d4296d71ee6e2ba133edc581385e201c89657911c2ed39108843c776633a4

2 years agoFix some problems with using fts5 options 'secure-delete' and detail=none together.
dan [Mon, 17 Apr 2023 18:32:22 +0000 (18:32 +0000)] 
Fix some problems with using fts5 options 'secure-delete' and detail=none together.

FossilOrigin-Name: 4d3f27ba90aa59837e49ceaae9f36cad426af3a33707d85d1bb848fc1bda6fed

2 years agoFix problems handling corrupt records in new fts5 code.
dan [Mon, 17 Apr 2023 11:41:42 +0000 (11:41 +0000)] 
Fix problems handling corrupt records in new fts5 code.

FossilOrigin-Name: 2f63d4a8bac6dc72197df32efd84c148adbc4794943088dff08da57b15dd7900

2 years agoFix an assert() in fts5 that may be true when dealing with corrupt records.
dan [Mon, 17 Apr 2023 10:39:51 +0000 (10:39 +0000)] 
Fix an assert() in fts5 that may be true when dealing with corrupt records.

FossilOrigin-Name: e8de2774463c07b76cd6b9a44ab32a583fe973f42a21b21af46fe82ab177c1b8

2 years agoChange a memcpy() to memmove() in new fts5 code.
dan [Sat, 15 Apr 2023 21:00:55 +0000 (21:00 +0000)] 
Change a memcpy() to memmove() in new fts5 code.

FossilOrigin-Name: 8de4542553ae20947787b4daf5e88bbe69f815679960e700e19f9c1148234b08

2 years agoFix a use-after-free that could follow an OOM or IO error in fts5 when using 'secure...
dan [Sat, 15 Apr 2023 19:58:58 +0000 (19:58 +0000)] 
Fix a use-after-free that could follow an OOM or IO error in fts5 when using 'secure-delete' mode.

FossilOrigin-Name: 904be83d9f3dd4b21a3aa47dde337b5c045b925ffdde4bccd1f8e8fdbef68c18

2 years agoAvoid dropping the error code following an OOM in fts5 when using 'secure-delete...
dan [Sat, 15 Apr 2023 19:13:51 +0000 (19:13 +0000)] 
Avoid dropping the error code following an OOM in fts5 when using 'secure-delete' mode.

FossilOrigin-Name: 9ee24a499c7b4a048f269f1c03c7c0b22b2898a3c23ea3e2511c2ba0342afa30

2 years agoAdd -utf8 option to CLI, for improved console behavior on Windows.
larrybr [Sat, 15 Apr 2023 17:56:43 +0000 (17:56 +0000)] 
Add -utf8 option to CLI, for improved console behavior on Windows.

FossilOrigin-Name: 414010d2366477285cb238f7af1e3d511ab4cda4bd4493441bd9868387dd5b66

2 years agoAdd the 'secure-delete' option to the fts5 extension. For configuring fts5 to delete...
dan [Sat, 15 Apr 2023 17:47:32 +0000 (17:47 +0000)] 
Add the 'secure-delete' option to the fts5 extension. For configuring fts5 to delete old entries directly from the full-text index instead of using delete keys.

FossilOrigin-Name: 394980e4fe12125460ab14da41edae9089a4da332a46f3124bf0b9778793791f

2 years agoFor CLI -utf8, set output codepage too. Adjust PP vars so that the code can be entire...
larrybr [Sat, 15 Apr 2023 16:12:46 +0000 (16:12 +0000)] 
For CLI -utf8, set output codepage too. Adjust PP vars so that the code can be entirely omitted for targets pretending to be "WIN32" but not quite doing so.

FossilOrigin-Name: 543594a7277b12d1c58af8e3cba3841667cf924172995536489ce7da704a11d7

2 years agoFix stray edits in comments in last check-in.
larrybr [Fri, 14 Apr 2023 21:34:58 +0000 (21:34 +0000)] 
Fix stray edits in comments in last check-in.

FossilOrigin-Name: fa3ce7f013d40147f012e26d0ede75b134174f144d314336310c9ac585e23fb7

2 years agoSet CLI -utf8 option and build with line-editing package to be mutually exclusive...
larrybr [Fri, 14 Apr 2023 21:23:08 +0000 (21:23 +0000)] 
Set CLI -utf8 option and build with line-editing package to be mutually exclusive. Integration of console-invasive UTF-8 handling with line-editing takeover of console may come later.

FossilOrigin-Name: 047344a91583f273a55fe3659bb8020ffc947c05c4274fbda54ee0608e62adb1

2 years agoCure CLI double-prompting (by ditching gcc fgetws()), general cleanup. Work remaining...
larrybr [Fri, 14 Apr 2023 19:56:32 +0000 (19:56 +0000)] 
Cure CLI double-prompting (by ditching gcc fgetws()), general cleanup. Work remaining is to avoid effect of -utf8 when a line editor is linked/used as part of CLI.

FossilOrigin-Name: 73a5f54231e9f6ad8f013df3987ea48c516080f9193ed873b56f982ee75658c2

2 years agoFurther tests for fts5 secure-delete mode. fts5-secure-delete
dan [Fri, 14 Apr 2023 18:00:03 +0000 (18:00 +0000)] 
Further tests for fts5 secure-delete mode.

FossilOrigin-Name: c5a47063b7971868ebbb3f0718434dd6bd22d01c43697f48941df9aae3885abc

2 years agoAdd extra OOM test for the new code on this branch.
dan [Fri, 14 Apr 2023 17:00:29 +0000 (17:00 +0000)] 
Add extra OOM test for the new code on this branch.

FossilOrigin-Name: 846ae7e099ce67dab6b5df0ad5648a01d7bf7f2acf8312d817ed8505d4ea5aec