drh
ce2aa8bebe
If the page size is wrong on the page1 content inside a WAL file, then
...
running VACUUM could trigger an assert(). This check-in changes that assert()
into a branch that returns SQLITE_CORRUPT.
[forum:/info/4ef9b37d74d2d2e8|Forum post 4ef9b37d74d2d2e8]
FossilOrigin-Name: 0512f82a2cde7447cb348d9fd620f39f2f0e359141903cde20f7ba30b5d34af3
2023-05-03 06:48:08 +00:00
drh
681307dc80
Improved detection of excess recursion on arrays and objects in the JSON
...
parser. Fixes a problem detected by dbsqlfuzz.
FossilOrigin-Name: d40fd5924adaa8d6b1dd6b9a4087f64d496cf60096ae11c9229c59309c0d4844
2023-05-03 06:38:03 +00:00
drh
790adfd8ec
Do not overflow the Index.aSample[] array if the same index appears in
...
the sqlite_stat4 table under multiple names because it is a WITHOUT ROWID
primary key index. [forum:/info/537d8ab118df7edd|Forum post 537d8ab118df7edd]
FossilOrigin-Name: 9350a25ac0b55a6b901bc50e4db6d4e883c2617e1d2a8fdc90effabe52bb0012
2023-05-03 05:00:10 +00:00
drh
8777bdb78a
Do not even attempt to load the sqlite_stat4 table if the use of STAT4 is
...
disabled using sqlite3_test_control().
FossilOrigin-Name: 0bf94c77d97582be5368bcfd149f3db7b9f928b4684aaa2626d98a2bdee8f96f
2023-05-03 04:21:31 +00:00
larrybr
164b332d80
Fix CLI mishandling of OOM during .import _of_ a DB. [forum:7ed4a250d3|Reported by forum post 7ed4a250d3].
...
FossilOrigin-Name: 30da3f0ebd944754881bce678c61289fdaf1e32198d241cc6b5c003e4fb33c0e
2023-05-03 02:32:42 +00:00
drh
b504623802
In the CLI, ensure that the argument to quoteChar() is not a NULL pointer
...
due to a prior OOM.
FossilOrigin-Name: 776d1a47aae3c3679a2d158595e84facf118adf2d1bca0f0642311dd346479b8
2023-05-03 01:25:37 +00:00
dan
9cf09b5672
Fix a problem with the sqlite3changeset_size() API and rowid tables.
...
FossilOrigin-Name: 92ade220dcf5c1b76a5db605b1467a01051271957cd26f790755904fd82772eb
2023-05-02 20:34:15 +00:00
larrybr
8594f02c5d
Cure CLI hang on .import with high-ASCII column separator.
...
FossilOrigin-Name: aac8ac631de5c5b439c48c13f5fd271d76c11b1a5fd0919dfe4506ef7725f5ab
2023-05-02 18:03:25 +00:00
drh
bdb40cb18f
Allow for lower-case "nan" to mean NaN in JSON.
...
FossilOrigin-Name: 6bee0a19e2efb6e39097fb22602556791d3d3962c50a1a0471c39a0c61db632e
2023-05-02 17:33:34 +00:00
drh
d6b3a02d21
Interpret negative arguments to sqlite3_sleep() as zero.
...
FossilOrigin-Name: 2b542326aa8e7e1f6ed9d999b95ae5340278e0821277a17de3cc803b4af793ae
2023-05-02 16:34:15 +00:00
drh
8c79ea8447
Improved handling of NULL arguments to json_valid() and
...
json_error_position(). [forum:/forumpost/06c6334412|Forum post 06c6334412].
FossilOrigin-Name: ab78e6946ba8125a83ff155561adf9c8df4d1c09a645fce08c8245ddb08bfa3b
2023-05-02 11:12:01 +00:00
drh
67a17779cb
Fix typo in comment. [forum:/forumpost/3da7d9c445|Forum post 3da7d9c445].
...
FossilOrigin-Name: 41a8a15c4b6f6157b12d43976e300763ef8a4963986d2806557ad0d8b0a784cd
2023-05-02 10:22:05 +00:00
drh
53ffe6e21d
Minor code change in the CLI to make a UAF warning from scan-build go away.
...
FossilOrigin-Name: ad6aae768ad0816bfd1c8e9db5c0153226982d3af9a089f31e608223339e9829
2023-05-02 00:33:45 +00:00
drh
f9b58eb4f8
Fix harmless compiler warnings.
...
FossilOrigin-Name: 342af5b4fa0bd7c699e5497161db13d0cf795c7a5875ae30d666122e518f213b
2023-05-01 20:42:15 +00:00
drh
0f97dc28b0
The gcc definition of the SQLITE_INLINE macro is not compatible with
...
string ANSI, so disable it if the -std=c89 command-line option is used.
FossilOrigin-Name: 62d703d83cf8cf3358715792347c49315a82c659e475158e385746f4329a4f39
2023-05-01 20:09:52 +00:00
drh
1f02cd6cd6
Fix harmless compiler warnings in FTS5.
...
FossilOrigin-Name: f6210017b3143ccbaea23655852f947f779bb438ad4fbf582f5da42f7cd1d9f5
2023-05-01 19:59:10 +00:00
stephan
58d40363b9
Remove xFileControl() handling from the OPFS VFS altogether, re-routing all syncing through xSync() instead. This eliminates superfluous syncing introduced in [a371374148a2], as discussed in [forum:647d2f811dbc2dfe|forum thread 647d2f811dbc2dfe].
...
FossilOrigin-Name: f809de7f232c8c2731a877c7bf1ad39fda5b326b2e45e4748cab4dc5e5b535bd
2023-05-01 19:28:07 +00:00
drh
59fe13e39a
Fix harmless compiler warnings.
...
FossilOrigin-Name: 0a926994691ccb02ea4f0ba3c2e8f728871ae67d24c705fbc0f7af81f38d5f47
2023-05-01 18:52:35 +00:00
drh
abdcfcef83
Add support for JSON5.
...
FossilOrigin-Name: f8c3ed23a6931b1da3b93b3274b132387078112a5c8e8d06b5312c47987d3937
2023-05-01 18:28:48 +00:00
dan
5ecee3dae3
Fix typos in comments in sqlite3session.h preventing documentation from being correctly generated.
...
FossilOrigin-Name: ab75170d5609c477613466e8880f20b74b0069281db6536fe09db06ea9d7cff3
2023-05-01 15:59:20 +00:00
drh
4cc6f869a4
New enhancements to the sqlite3_db_config() constants documentation.
...
FossilOrigin-Name: d74011a3c495719fe1816e15251269824396ac2a40e41f7b96f0dd507c9be609
2023-05-01 15:57:46 +00:00
stephan
043353483e
Expose the SQLITE_DBCONFIG_STMT_SCANSTATUS and SQLITE_DBCONFIG_REVERSE_SCANORDER sqlite3_db_config() options to JS.
...
FossilOrigin-Name: 0a7024af3f0e1dddc1a60c67bc4084e46b297dc16fe753bd5e6a45a59fd1cfa4
2023-05-01 15:42:59 +00:00
stephan
d45bbbb05c
Implement full xSync() for the OPFS VFS. The previous implementation was not correct for journal files. Reported in [forum:647d2f811dbc2dfe|forum post 647d2f811dbc2dfe].
...
FossilOrigin-Name: a371374148a2874be6e48890781aa5952229056b146a50fa4d035693341c5636
2023-05-01 15:15:11 +00:00
drh
b5fab68162
Fix typos in documentation comments in sqlite3.h.
...
FossilOrigin-Name: 6a8b00788e7911287a8287277eb603e983e3324c9d62de0889ce6f0b2d848f4a
2023-05-01 14:50:54 +00:00
drh
908dec7404
Do not apply the "AND false" optimization if either operand comes from the
...
ON clause of a join. Fix for the problem identified by
[forum:/forumpost/96cd4a7e9e|forum post 96cd4a7e9e].
FossilOrigin-Name: d095da0e7a24e3bcab6495d964f76a86d7a5910d2d6edddc6e8092bfa6084fe6
2023-05-01 11:24:35 +00:00
drh
e210c93903
Fix abbreviated paths for objects such that they work even if the object
...
key begins with '$'.
FossilOrigin-Name: 1b991c78141a9915ae9350ecb347a758e50d7d25c8a0f4cc098ae10d47c27043
2023-05-01 03:56:48 +00:00
drh
5196d93505
Fix a problem with json_patch() when one side or the other is JSON5.
...
dbsqlfuzz bc10593a4ba8e7a7862593532285be31f00f8e41
FossilOrigin-Name: e18c0899cc774f6f20d2a73381fa3ab3af9355cf4d108c7612db259eadbb8b96
2023-04-30 23:52:55 +00:00
drh
dae7ae359e
Accept the full ECMAScript 5.1 IdentifyName syntax for keys in objects.
...
FossilOrigin-Name: 9be2c87518b33713210e3e2fa56924888e19415c71329141d18150b275f6f25e
2023-04-30 20:37:49 +00:00
drh
4a398c317d
All JSON to understand floating point literals "Inf" and "QNaN" and "SNaN" in
...
any case, without the SQLITE_EXTENDED_NAN_INF compile-time option. This
extension is always available.
FossilOrigin-Name: fb551145e0d84213b3343dc1bc7db70c898b9dea24a72b968240617f4b52d821
2023-04-30 19:45:25 +00:00
drh
7be1473ccb
Omit the json_valid() function. Change the name of json_error() to
...
json_error_position(). Use "NOT json_error_position(X)" as a substitute
for "json_valid5(X)".
FossilOrigin-Name: 34c4e900a9cc51630eeaf01deef74bf5b18d66e0ab1dc61a2023ac8f837a5197
2023-04-30 19:34:41 +00:00
drh
5a5cba0692
Merge all the latest trunk enhancements into the JSON5 branch to
...
facilitate testing of the JSON5 branch.
FossilOrigin-Name: 30d12edebad9b097cd5f0da355304d1cb2f8b70d7c7dff378fd7ad7c8ebf9279
2023-04-29 18:40:48 +00:00
dan
e01e3b5b94
Fix a crash that could occur in fts5 'secure-delete' mode when operating on corrupt records.
...
FossilOrigin-Name: 2e85b0e3dcae0915aa6472a3654c8ac72a6b2083c11747f3f657c79bbdaf530b
2023-04-29 18:31:44 +00:00
drh
440f7b4833
More ALWAYS() macros.
...
FossilOrigin-Name: 770b09f7a795956be63a06847059370db8dfc88654878d742b7b826947029962
2023-04-29 17:35:29 +00:00
drh
f8ae2d2a2a
Add ALWAYS macros on unreachable branches in the new JSON5 logic.
...
FossilOrigin-Name: 91e15ed9d93e51b750172a074dbbcf206128e9476571ce6189b8ea0ba5ab4135
2023-04-29 17:13:39 +00:00
drh
399875f6c5
Simplification of the logic that normalizes JSON5 integer literals into
...
canonical JSON integer literals. Improved reporting of OOM.
FossilOrigin-Name: 01ee613c07fcb87e7d7b7f1b1387982715d1343418f37f4a1dc90e43a76d20e8
2023-04-29 16:31:08 +00:00
drh
d76d954de3
Do not allow leading zeros on non-zero numeric literals in JSON.
...
FossilOrigin-Name: 3e91494390ba88498eb243f61ce4ef4efa23b58326108a769bc72331d7d7d75b
2023-04-29 16:00:20 +00:00
larrybr
b608d7e2c6
Cure CLI generate_series() overflow bug (forum:754e2d4db2a5|noted by forum post #754e2d4db2a5) and bring behavior with negative step arguments closer to as-documented and eponymous function in PostgreSQL.
...
FossilOrigin-Name: 07383758d68e05021ccd393a69c1fa94836dfb02331326c082495a531a384363
2023-04-29 15:42:46 +00:00
larrybr
29c2f0366d
Replace duped generate_series() test with another corner case.
...
FossilOrigin-Name: fb2f08783fdfef4d5123ad66792de2265d39272d40d7bf1be7dd21876e8ffd73
2023-04-29 15:29:29 +00:00
larrybr
e0a3e4bd51
Sync w/trunk, improve generate_series() variable names.
...
FossilOrigin-Name: ecbf7e13e6454ee879c178c53ffa6face789e93ccbebb0cfac8fde72cb3a4952
2023-04-29 12:29:15 +00:00
drh
64953f0fb8
Minor fixes to to the JSON% parser.
...
FossilOrigin-Name: 2fe684cdcdc3cab4ec3348ca5aa5948e4472c562b739c29faebcb77397f8d969
2023-04-29 12:13:27 +00:00
drh
f176776bd7
Correctly recognize an isolated U+feff as a space character in JSON5.
...
FossilOrigin-Name: 4473dc8e3ad18bb6185ed4a819baf881a7d26ac74bc70fae6ba23a0030be8316
2023-04-29 00:59:22 +00:00
larrybr
7667f5f12f
Add tests for generate_series(), and change an existing test that enforced varying rowid-to-value mapping with query ordering. (That no longer varies.)
...
FossilOrigin-Name: 9605db4ae37ef383f8e5568af4543a9e6f336bace6ed80ff80fe4c0b0f437078
2023-04-28 23:39:16 +00:00
drh
8f3fe2ead2
Bug fixes in the logic to skip over JSON5 comments.
...
FossilOrigin-Name: c736b77a2fc5f8f2ba8f770adf05443dfdc3a9847ee519f411e661f76756d611
2023-04-28 23:38:54 +00:00
drh
6e2de57963
Bug fix in the offset computation for json_error().
...
FossilOrigin-Name: 8f7ab5d9210490eb451534df246b82081a5aa252a1bd662659df3da429290837
2023-04-28 23:19:11 +00:00
larrybr
b0d46fcd72
Revise generate_series() extension (in CLI) to address overflow reported in [forum:754e2d4db2a5|forum post #754e2d4db2a5] and to make behavior better match the like-named PostgreSQL function.
...
FossilOrigin-Name: beeea3e1b010dace9789f27172462b912819d0f8142a67e3e1e7335211e0e9a8
2023-04-28 21:25:03 +00:00
drh
8e7efe3764
Improvements to the accuracy of json_error(). Add the extension SQL
...
functions random_json(SEED) and random_json5(SEED).
FossilOrigin-Name: 8d09dc1c45a8026b94f70273d064e47939f30cadedc17548b5a26ba054a8d3a7
2023-04-28 17:38:35 +00:00
drh
272ae627c5
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
2023-04-28 14:48:11 +00:00
drh
016f46666b
Fix indentation and omit trailing whitespace in the random JSON generator
...
script.
FossilOrigin-Name: 629db09fceb7bf37561b52ccee06ebf4df261291e9a8ffcca82b243f6db5ff07
2023-04-28 13:25:35 +00:00
drh
1170fb52e1
Fix json_tree() so that it is able to deal with the JNODE_RAW labels of
...
a JSON5 object.
FossilOrigin-Name: f56528d413d8e622f7c4f18b2f9f2e620bfb441c020461299b35a90072ee6c13
2023-04-28 11:02:01 +00:00
drh
ea2529528e
Merge all the latest trunk fixes and enhancements into the json5 branch.
...
FossilOrigin-Name: b5ca15cfc19380cf870b70be6a86e70f2026cc3d6d89005b45891d58c4f11c2d
2023-04-28 10:23:01 +00:00