Commit Graph

26111 Commits

Author SHA1 Message Date
dan
4042d2b424 Limit the number of nested NOT nodes in an fts5 expression to 256.
FossilOrigin-Name: 0e5c1ee40a146ef8b2b3c5f53d0a45e092bc8d8e933f3819805c995819d31bae
2023-05-15 17:14:16 +00:00
drh
307db965c6 Add the --wait command-line option to fuzzcheck.
FossilOrigin-Name: 5a479a2c7637a018d1828d9d37973bf3d36a2fc4cd5b752bca61a41cd0920d39
2023-05-15 10:55:04 +00:00
larrybr
b579db6d5c Make generate_series() correct on ones complement ALUs and acceptable to UBSAN.
FossilOrigin-Name: 4c5cd3e6968c44749b7663beee790969b41d247b9201b771ef90cbb03d09108f
2023-05-15 03:48:48 +00:00
drh
eb4455e4e4 As evidenced by [forum:/forumpost/f3f546025a|forum post f3f546025a], the
new RIGHT JOIN related restriction on the push-down optimization implemented
by [da3fba18742b6e0b] also needs to apply to the automatic index
(a.k.a. hash-join) optimization and to the Bloom filter optimization.
Computation of the restriction is now
moved into the sqlite3ExprIsSingleTableConstraint() routine.

FossilOrigin-Name: 4902015dcf3869f08d9986e422faa231d9218a5e0fc59ba8df0f407e4eb3d605
2023-05-15 02:06:35 +00:00
drh
fa746af4a3 Simplify the interface to constructAutomaticIndex().
FossilOrigin-Name: c5da16551619718bf649c517515261706843e11e131f0b99e1fd6927d0f7e238
2023-05-15 01:02:50 +00:00
dan
b8d689b666 Fix windows-specific problems in test scripts sessionnoop2.test and sessionrowid.test.
FossilOrigin-Name: e4989c111ddffe6818cbb88a72bd027b30124d1e8de0cce4109c72a214ffb5b8
2023-05-13 20:01:27 +00:00
dan
5e65cd1caa Remove unnecessary call to sqlite3_dbdata_init() from shell.c.
FossilOrigin-Name: 84ca2000007d217f911a3b1586143fc9261c0697a9e9fadda6bd3dd6afdfb099
2023-05-13 19:38:30 +00:00
dan
fd0791587b Add an "#ifndef SQLITE_HAVE_SQLITE3R" directive to shell.c.in, to avoid including the recovery code a second time if the shell is being compiled with sqlite3r.c.
FossilOrigin-Name: 6f1a60fb7b3ef463b4131dfecbc72b7c778c794a9aa13ce4617ab6dd895508b2
2023-05-13 19:13:40 +00:00
larrybr
ea51c09a8b Mention that sqlite3_mutex_free() accepts NULL as a no-op.
FossilOrigin-Name: 603d9ad5012ca8996783996d7b8cd6a1aabf12b21604a2ccc137f4c2d99427b9
2023-05-13 15:34:15 +00:00
mistachkin
273c2a9425 Fix compilation issue seen with MSVC.
FossilOrigin-Name: 67001887044da71ab50c07d8345bd950a0a1f9688cf9cd6966312ea163cf6e17
2023-05-13 05:13:29 +00:00
drh
59b6a2bcbe Fix harmless compiler warning caused by [0772ddf56713d013].
FossilOrigin-Name: f06c16a8b0e7a15ce4f7d99af3376a1bf1bfbfc0fdc048b079418ae74c619d6b
2023-05-12 19:06:00 +00:00
dan
83be5586a0 Add multi-threaded test for "INSERT ... RETURNING ..." and SQLITE_BUSY errors.
FossilOrigin-Name: 559cb1c6de384fd14160db005acaf1858b8b018d3d40d7f786a56a49d3cdbd59
2023-05-12 19:02:50 +00:00
drh
4f3dc93978 Make the regexp extension more robust against OOM errors during compilation
of the recognizer engine.
[forum:/forumpost/f50aecd5e8|Forum post f50aecd5e8].

FossilOrigin-Name: 0772ddf56713d013cd1bd44f9c75977ca14f852e3a8f038b0a6b9814f6519d79
2023-05-12 15:45:34 +00:00
larrybr
fb74019a14 Fix unlikely strange result of CLI edit().
FossilOrigin-Name: ab3797e844c97fed344b36f30cfb788aca9e0d68c574fb833712219eb712db44
2023-05-12 14:51:00 +00:00
drh
69bc8c70f9 Ensure the _O_U16TEXT is defined for Windows builds of the CLI.
[forum:/forumpost/c80aa942dc6bf2|Forum post c80aa942dc6bf2].

FossilOrigin-Name: 504effa89b48c0dc6cd12b3eaf6017be3f32017c601af17759a3cc185346d868
2023-05-12 13:20:57 +00:00
drh
26a3e56649 Remove a stray CR from end of line in a source file.
FossilOrigin-Name: 48139fb904de4b7b383e7f8c29bed83ad878eb22b1dd773c366a0aee74613d23
2023-05-12 12:57:44 +00:00
drh
61791c6f4c Fix harmless typos in comments.
FossilOrigin-Name: 607c3efbe0293d7c11a955a9f21e24fb9f7f1bb758e13e60f4ba0cc0ac8b900c
2023-05-12 12:45:56 +00:00
drh
6b429dc11b Ensure that all prepared statements are expired and forced to reprepare
whenever the database text encoding changes.
[forum:/forumpost/43cbfc4d23|Forum post 43cbfc4d23].

FossilOrigin-Name: 469718f106e1cfa7f8f4714a9e743108c361af81e0258061c2b76880a7c352ae
2023-05-12 10:52:12 +00:00
drh
78b404d976 Add [/info/cec6a06508239c09e363?ln=5525-5531|restriction (5)] to the
omit-noop-join optimization.  Fix for the issue reported by
[forum/forumpost/49f2c7f690|forum post 49f2c7f690].

FossilOrigin-Name: 3e9c9bbdb59b9d500ff218db538c047c83da7ac18ebb95c3ee7629ab15e0b43a
2023-05-11 21:15:55 +00:00
drh
5ca40d84ad Fix a minor typo in a comment. No code changes.
FossilOrigin-Name: 607cfb5bc5c0fb8b789944c2326cfdebf0629e45fbf0a61dd5f667ed685a1bbe
2023-05-11 18:03:11 +00:00
dan
418d212308 Fix the rbu_exclusive_checkpoint=1 option so that it works with a zipvfs database in pass-through mode.
FossilOrigin-Name: caca67d30670913914335aa3edff784e1c3d26aed70ae32efb5607ccf31ad142
2023-05-11 17:25:14 +00:00
stephan
0c7bcf4c0e Doc typo fix. No code changes.
FossilOrigin-Name: e841b142f583e49350c7cdd14dc4da72434cc67c7b521ae741e03e37e785d7e0
2023-05-10 21:08:01 +00:00
stephan
161f742856 Resolve the JS-side corner case reported in [forum:7774b773937cbe0a | forum post 7774b773937cbe0a] by not caching oo1.Stmt.columnCount.
FossilOrigin-Name: c3d25c3a25e79e01c4ad0cf11f7dc3b0fb1932f3bcd04935a728ef62f7e07cf1
2023-05-10 21:06:02 +00:00
drh
28f4e7b286 Enhance the split-sqlite3c.tcl script so that it uses single-character
extensions on subordinate source files, even when the number of subordinates
exceeds 9.  This is not yet needed, but might be soon.

FossilOrigin-Name: 4150e416263f24efcbfe68d5b1e15ec7e79df41dff0b6dfdc59f06ee9e205049
2023-05-10 16:04:04 +00:00
drh
0051a56dec Fix harmless compiler warnings from the CBMC compiler.
FossilOrigin-Name: 5bc17cbccdd369486fca049be9d7457e18f162c0e2f5475809ffc8f01c5fa9d2
2023-05-10 13:56:32 +00:00
drh
5af043c2e7 Rename sqlite3IsTableConstraint() to sqlite3IsSingleTableConstraint() and
improve its header comment, in an attempt to make the code easier to reason
about.  No functional changes - should generate identical machine code.

FossilOrigin-Name: 5dae897431a0a9dbb354c4a8a48f935ea7438035d96f90b83dd81eae434c8277
2023-05-10 11:05:59 +00:00
drh
d733ee5cca Add a missing comma to the documentation for the OP_Jump opcode. No changes
to code.

FossilOrigin-Name: 7e2c2b1cee760af68cf303ce9ec1babbaf607fe54e043893c046d2d37cd0ab46
2023-05-10 10:03:28 +00:00
drh
88a99437b9 New restriction on the push-down optimization to prevent an ON or USING clause
on the left side of a RIGHT JOIN from being pushed down into a subquery that
is on the right side of that RIGHT JOIN.
[forum:/forumpost/a7d4be7fb6|Forum post a7d4be7fb6].
Also add comments to describe previously undocumented push-down optimization
restrictions.

FossilOrigin-Name: da3fba18742b6e0bd5290bee9d86a2d5cb1ff2de25d737ef93060d7c1143273f
2023-05-10 00:33:21 +00:00
larrybr
5fbb2adf7d Fix bug in fall-back logic of CLI .clone
FossilOrigin-Name: 0dcd9785c11e33e6393b7c1be1ff8fe7129f280439aed12de22d4687609a8bac
2023-05-10 00:20:42 +00:00
dan
d9be387361 Fix recover1.test so that it works with DEFAULT_AUTOVACUUM builds.
FossilOrigin-Name: 4ffae48e831eedf8f5e61dc6d38817c0fdccfb2f4f1189d07f9722b9e3a48b5e
2023-05-08 16:26:22 +00:00
drh
bbd0ae2e87 Improved error handling when ".open" fails in the CLI.
FossilOrigin-Name: 38544b11f0e19cc6c6f8230a89d28e36c7c3587481deaac6cedbf82338ca0d47
2023-05-08 13:47:38 +00:00
drh
addc7e0e5b In editPage(), if an attempt is made to edit an empty 64KB page, then take
the slow path through rebuildPage(), in order to maintain strict invariants
in the editPage() code.
[forum:/forumpost/0f37727c0d|Forum post 0f37727c0d].

FossilOrigin-Name: a865e574e510c1ca192d0bd5293fb583def90f7ed086af2c89ca856ce93d115b
2023-05-08 13:38:14 +00:00
drh
c42bbfc550 Ensure that the label for a JSON object really is a string and not an array
or object that just happens to end with a string.
dbsqfuzz 32f62ed8676d0a153dbe756aeae3202d3670fe50.

FossilOrigin-Name: c335737c2889722ea05b732a5efff8a2f31140c18ca038c41e05c2a26e0db5bd
2023-05-08 11:11:08 +00:00
dan
6d841fdc89 Add tests for recovering data to a lost-and-found table from a utf-16 db. No code changes.
FossilOrigin-Name: 832f6e9f797eecb9a3dae4e7e20c70eda1e91372e9d3ce4223d57f26582cdbd2
2023-05-08 10:51:35 +00:00
drh
28f32bedd1 It turns out that pagerExclusiveLock() can be called with the lock state
already set to RESERVED if the SQLITE_FCNTL_PERSIST_WAL setting is set and
a specific sequence of multiple journal mode changes occur.
Enhance pagerExclusiveLock() to deal with this.
[forum:/forumpost/8130545bc6|Forum post 8130545bc6]

FossilOrigin-Name: 2bb8d977392f635515aa4a36f6f763a2e4858f7adc1120519e2e74c04a9749b5
2023-05-07 03:23:32 +00:00
drh
4e73863fd4 Fix a comment in the JSON logic. No code changes.
FossilOrigin-Name: 3f30ea5ec9d849c64d8c38f4fffbc06c749ecff91ab90bc29b3a3cc9ec5b9df0
2023-05-05 20:22:06 +00:00
dan
77eb3e305c Fix a buffer overrun that could occur when using the format() function to format a very small real value with the "," modifier.
FossilOrigin-Name: 910e770ad4d8e8e45bf069af963f2e975bfcfb882578dc5fe714cd2396258934
2023-05-05 19:36:13 +00:00
dan
ed96436f23 Reduce the maximum depth of nesting in json objects to 1000.
FossilOrigin-Name: c7697a0d45bfab20ec09f17ad65e375ddb43af6762278481c13a65c9a784978e
2023-05-05 15:52:44 +00:00
dan
3e49355e17 Do not attempt to run json502.test with SQLITE_OMIT_VIRTUALTABLE builds.
FossilOrigin-Name: 6664850647cd314c076842df5bf94e4f12d9be7fb56795b2af25f15c1267fa4d
2023-05-05 15:28:35 +00:00
drh
e030619109 Updates to compile-time option usage and especially to the compile-time option
test script in tool/omittest.tcl.

FossilOrigin-Name: fece588b186c4f9f76d626313e35336fd5681e966e9bd0fa1053b147c4e3c315
2023-05-05 14:16:31 +00:00
drh
fb18d81038 Fix the pager2-3.1 test case so that it does not run if a required
dependence (shared-cache) is omitted from the build.  Fix for
[forum:/forumpost/7a028538a7|forum post 7a028538a7].

FossilOrigin-Name: a77c8a780f884d0cb01d20912cf1aeec0bb7f3999d23117fe5bd82bc4405d483
2023-05-05 14:14:10 +00:00
dan
cad6aae45e Allow virtual tables to prepare writes to shadow tables in defensive mode from with xRelease() callbacks - even if the xRelease() is invoked from within sqlite3_finalize().
FossilOrigin-Name: a17106494a8a67bc92cfe27ee8ef9bf160517d6930d796980ae12287b98c1cfe
2023-05-05 11:47:31 +00:00
drh
0498caec89 Improved formatting of comments on SQLITE_CONFIG_xxx defines as those
comments are used by documentation.

FossilOrigin-Name: 2cb840bc9df81f76699f742e5db03835f4c272548cca0e6d24412503db3d76b3
2023-05-05 11:33:59 +00:00
drh
d2bef86709 Add the "subsecond" modifier to the date/time functions.
FossilOrigin-Name: 6fcb5a941fba0449d017954590bde7da74e5a1f8fd9b3e1febdff9bed1f22051
2023-05-04 20:28:19 +00:00
larrybr
88813681c2 Add some tests of subsecond modifier for date/time functions. Sync with trunk.
FossilOrigin-Name: 6499ebff545e663198bd0534be205a4e9ca68c7fb20fdcfa54fae4d9b79bfe3a
2023-05-04 20:19:33 +00:00
drh
6242c9386f Enhance the format() function so that the "," modifier works for floating
point numbers in addition to integers.

FossilOrigin-Name: 83683e108bce83c105bbcce1aa62880d8f14ebf3383d87d83a1e5c85026a7817
2023-05-04 14:44:53 +00:00
drh
e8468098a0 Add support for the comma (,) modifier to %f formats in the format() function.
FossilOrigin-Name: 7080e196a1f887640ff51ddc508ec6796ce12874c2944855702753b64a8e5e50
2023-05-04 13:07:49 +00:00
drh
c1e40a3a02 Fix a bug in cursor hints that can cause references to tables that have not
been opened.  Cursor hints are intended for use by COMDB2 only and should not
appear in production builds, so this should not be a factor for the vast
majority of users.

FossilOrigin-Name: d3370d59cffb7ab982d6c620c93d22aa6a9dc786e1c4af95ca8d45ff0b9b7d6f
2023-05-04 11:29:15 +00:00
drh
62b28db5c7 Add another assert() to FTS5 to demonstrate that a pointer is never NULL.
FossilOrigin-Name: b8a84a1bf53fa07ef01c57c6db6329ba439774a262b3adcbe94e7bd77525e296
2023-05-03 14:10:05 +00:00
dan
3f23eb6813 Add an assert() to fts5_config to ensure that a potential OOM is being handled correctly.
FossilOrigin-Name: fe9c207657400f9d9f4e822eb658157bc147ed538e2701322f6f973933f023ed
2023-05-03 13:57:57 +00:00
drh
3442306989 Protect a macro argument with parentheses in FTS5.
FossilOrigin-Name: bc07fe51fe0c6bb50ca8ae1baefcc35c8f5395b2d0de641bf0b0cedc92d754d4
2023-05-03 13:48:33 +00:00
drh
dda2833a4e Add a comment to the [0512f82a2cde7447] change to link it to its TH3 test case.
FossilOrigin-Name: 1281d4d9d799ef83e6eb51d656ede82b4503d39adf169deb936b30ebfddd88b1
2023-05-03 13:33:37 +00:00
drh
69e2422973 Enhancement to showwal such that it shows what the page hash should be
on a hash mismatch.

FossilOrigin-Name: 960dc97083ed9a7bfa912010b9ea19114f51dd10e73d5c5bf06cc642ebd1a2e7
2023-05-03 13:03:30 +00:00
larrybr
6539977cfd Conform CLI double-quoted escaping to what its doc says.
FossilOrigin-Name: 910535ba518f35ecc64c980ad67e3af69008d1995235f52ab12db6cefdb6602b
2023-05-03 11:27:15 +00:00
drh
b4824b055c In the zipfile extension, leave the catalog list in a consistent state when
the last entry is removed from the list.
[forum:/info/f03f1e4c5a5c9959|forum post f03f1e4c5a5c9959].

FossilOrigin-Name: 1b489d008b7bda12f9bf92e246bc613ef61e9c74ace0652d6d088e5a6e0696f6
2023-05-03 07:30:15 +00:00
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
d8200de04d Give CLI quoted args hex escapes (as documented.)
FossilOrigin-Name: 90e434a6ae370a35109802fc336b98298d345f3d23125ef2cc68c31d8e69bb50
2023-05-02 19:33:27 +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