Commit Graph

27885 Commits

Author SHA1 Message Date
drh
41fb2eed07 The -DSQLITE_JSON_BLOB_INPUT_BUG_COMPATIBLE compile-time option causes blob
inputs to JSON functions that are not JSONB to be processed as if they
where text, immulating historical bugging behavior which some applications
have come to rely upon.  See
[forum:/forumpost/012136abd5292b8d|forum thread 012136abd5292b8d] for
discussion.

FossilOrigin-Name: 65572223583d43e1d61ec029641f9d3ff340e68ecfba8342c8d1b0a91a680f2a
2024-01-22 14:16:10 +00:00
dan
b4b7088d5f Fix test script literal.test so that it works with SQLITE_OMIT_ALTER_TABLE builds.
FossilOrigin-Name: 4dc00f577632c7b13135505007804d42a12f81a9ebd58d4c380727256b054b7e
2024-01-22 14:01:07 +00:00
drh
776fe42c70 Fix userauth so that it works together with SQLITE_OMIT_SHARED_CACHE.
([forum:/forumpost/0bfc5888a384d430|Forum post 0bfc5888a384d430]).
However, also change to code to issue a deprecation warning whenever
SQLITE_USER_AUTHENTICATION is used.

FossilOrigin-Name: 249048b0cbc37058c229a785182e07b46029584aff9c385269b0b93503153476
2024-01-22 12:56:58 +00:00
drh
3b799b0fca Add a notice to the user-authentication documentation to say that the
extension is deprecated and may disappear in the future.

FossilOrigin-Name: fe6fc7b91ad1771a2d2d4e3d9d60831b3056d528a700932bf11a336c7e3414a2
2024-01-22 12:30:17 +00:00
dan
17589f7811 Fix test script literal.test so that it works with SQLITE_OMIT_ALTER_TABLE builds.
FossilOrigin-Name: b57327be4be9638f5ee834a6c9e06135aaef9e499516f8b53f927ffe81033f61
2024-01-22 11:12:38 +00:00
larrybr
05ab0f72c3 Make CLI .dump immune to pragma reverse_unordered_selects, as reported in [forum:/forumpost/c42be01880e961eb|Forum thread "Missing ORDER BY in .dump?"]
FossilOrigin-Name: 488caed24453fcef6fddcf40353e3b44cf37fb9d21e0ed743d39d60cbff020a7
2024-01-22 01:11:24 +00:00
drh
199b0b2d6e Fix a harmless typo in a comment.
FossilOrigin-Name: 382a8f94bffef3e5f715116e363a30e21e2c53cd42d4959dfbe90c4624143e6d
2024-01-21 21:20:33 +00:00
dan
b75dc61a53 Merge trunk changes into this branch.
FossilOrigin-Name: 03ade4a810516ff84bc5c1a716b0e454cc8a89374100415ff21a82449112811b
2024-01-20 18:45:30 +00:00
dan
f28bff745c Ensure that values generated by DEFAULT clauses that specify real numbers that can be expressed as 64-bit integers (e.g. -1234.0) are not silently converted to integers.
FossilOrigin-Name: 298d6977285c71be917896bc875a8a26d985dcf0a74069b7c4d290e8ff0ac618
2024-01-20 18:41:13 +00:00
drh
514bf99b6a Simplifications to the strftime() logic.
FossilOrigin-Name: aaa5a044d8a4942278eb4269fa8c7252f9f1dc161408e618e7c97c55a12283ff
2024-01-20 18:26:28 +00:00
drh
6c64e24f9d Fix a memory leak in new memdb1.test test cases that were added by
[e638d5e408ea2e18].  No changes to SQLite itself.

FossilOrigin-Name: bb2b7a658e0186d8b09199170db17744536602d8282b83c71ed969494d2ca465
2024-01-20 18:21:50 +00:00
dan
95295a7e9b Add test cases for the new code on this branch.
FossilOrigin-Name: 49f29a7b4f44f691ecf7a57b26477971e6ffaf2a0b1690b4926ffbb43fa3929b
2024-01-20 16:46:25 +00:00
drh
2e12890732 Make sure that %V and %G are testing for every since day in between 1970-01-01
and 2023-01-19.

FossilOrigin-Name: 39c475f5fb86526622a715860385f0a3a4b2c18d8ef209779c423527e0639385
2024-01-20 16:38:00 +00:00
drh
b23f61b73f Rig sqlite3_serialize() so that it will initialize a previously uninitialized
database prior to serializing it, so that it does not have a zero-byte size
and does not return NULL (except for OOM).
[forum:/forumpost/498777780e16880a|Forum thread 498777780e16880a].

FossilOrigin-Name: e638d5e408ea2e189b6771d16bbc2e42c606e88e05fbea78079b6e39e41f344c
2024-01-20 16:29:19 +00:00
dan
3eae6664a0 Allow "_" characters to appear following any digit in an integer or real SQL literal.
FossilOrigin-Name: 401650aaccbc99246bd4e1ff37a28b78f528178aee2f294d87b9f7fecd7432bb
2024-01-20 16:18:04 +00:00
drh
4c43f1881e When doing a text-affinity comparison between two values where one or both
have both a text and a numeric type, make sure the numeric type does not
confuse the answer.  This is a deeper fix to the problem observed by
[forum:/forumpost/3776b48e71|forum pose 3776b48e71].  The problem bisects
to [25f2246be404f38b] on 2014-08-24, prior to version 3.8.7.

FossilOrigin-Name: 709841f88c77276f09701bf38e25503c64b3a0afbe2fbf878136db12f31cbe21
2024-01-20 15:13:13 +00:00
drh
8dca1905ed Ensure that the replace() SQL function always returns a TEXT value even
when its first argument is numeric and its second argument is an empty string.
Fix for the issue reported by
[forum:/forumpost/3776b48e71|forum post 3776b48e71].

FossilOrigin-Name: 01868ebcd25fadb2034da234c0636e82d07c5abc902ef66493cadfc988e74d7b
2024-01-20 13:18:22 +00:00
drh
777a08893b When backing out a character in a constructed string in JSON, first make sure
the string has not been reset by on OOM.
dbsqlfuzz 2fffbea91a5376526ea118d4fe4188c8dd35e317.

FossilOrigin-Name: 666690eb433fe38fa527ccbbb8e2c00041a33939da4f6b8bfb737d664f28f0d8
2024-01-20 12:13:00 +00:00
drh
a74a7f5b9e Fix the version number in the TEA configure script. This should have
been changed by [1481baf3d55effcc] three check-ins ago.
It is unclear how testing missed this.

FossilOrigin-Name: eaf2cf73fca3355edd05fef5b0d0262a6555633908794068805d12b1948beedc
2024-01-20 12:00:20 +00:00
drh
f08287cc12 Implement a new algorithm for computing ISO week values in strftime() based
on the idea (from [forum/forumpost/3681cb1bcd|Nuno Cruces]) of shifting the
date being tested to the Thursday of the same week.

FossilOrigin-Name: b06ab46a9ee98719159ed3e05cdfbf26281353d781206f56ed7cb12859210fed
2024-01-20 00:31:44 +00:00
dan
a4802720a1 Allow large hexadecimal literals to be used as DEFAULT values.
FossilOrigin-Name: 8cccc1f27d7470d3cdd3c9c6d74f6a5ac49ec6eaa7002bcf96f4842fb8c79e1a
2024-01-19 16:51:34 +00:00
drh
0a626b2b52 Increase the version number to 3.46.0 to begin the next development cycle.
FossilOrigin-Name: 1481baf3d55effcc117f2097e2d49a6f60f5f74b21190c3be943fd785b8a4c5b
2024-01-18 16:52:11 +00:00
drh
d0603eda6c Add support in the strftime() SQL function for conversion letters %G, %g,
%U, and %V.

FossilOrigin-Name: e1155d6aa4b960ecfd14fa3467f28672af3327699c547f5b9e75da3ac1348ff7
2024-01-18 16:50:25 +00:00
drh
31ebe65b5e Fix harmless "unused parameter" compiler warning in the new fts3IntegrityMethod
implementation.

FossilOrigin-Name: bb1fe53a97672fc868e3f3897162ea0d714dc1da95187f9c7e35255049f2b0e7
2024-01-16 16:14:52 +00:00
dan
75f9ba32bd Ensure that the xIntegrity methods of fts3 and fts5 work on read-only databases.
FossilOrigin-Name: b855886c4ccce0745af6957943e77be18949722f09821688725d546d3d79b4fb
2024-01-16 16:05:21 +00:00
drh
6ad928d91d Clutter the code with "fall-through" comments in order to suppress nuisance
compiler warnings.  No logic changes.

FossilOrigin-Name: 05d2cf5e90d2a6b8e7fbcdb9e12e7c1281db7cfbe212997bd63c8aa66797edda
2024-01-16 15:04:19 +00:00
drh
9239fb59ad Remove the LLONG_MAX preprocessor macro from the series.c extension as it
is apparently only C99 and later.
[forum:/forumpost/4af649419b|Forum post 4af649419b].

FossilOrigin-Name: f106bc0d21b7a815f0d23a97b6fd63c54d3f5353e965dfa550fa715e698ec6e3
2024-01-16 14:54:54 +00:00
stephan
6f30cac209 Various build- and code-reorg cleanups for ext/wasm. No functional changes.
FossilOrigin-Name: 835bd4a11e56ede378235379604ac01350ee92433f952a23c761f7be492fd475
2024-01-16 14:24:35 +00:00
drh
f352e0a9cf Version 3.45.0
FossilOrigin-Name: 1066602b2b1976fe58b5150777cced894af17c803e068f5918390d6915b46e1d
2024-01-15 17:01:13 +00:00
dan
4c6554223e Have the shell tool automatically enable SQLITE_CONFIG_DQS_DDL when executing a ".dump" script against an empty db.
FossilOrigin-Name: f47a5f4e0ce078e6cc1183e6cbb3c4013af379b496efae94863a42e5c39928ed
2024-01-12 11:44:49 +00:00
stephan
2fe917cfa5 wasm build: reformulate an awk invocation to account for awks which do not support the -e flag. Problem reported on the forum via a docker-hosted build.
FossilOrigin-Name: 5836657929d7d6d3f0d5865c9f6de4e4c00edd53d15a246802b375fa15d0f255
2024-01-11 16:10:22 +00:00
stephan
7a543f6fbf Internal JS doc cleanups.
FossilOrigin-Name: c8284170f66374fc528e9d6e5a03ee7321f27e80acf4360701a8b176497b7130
2024-01-11 14:21:15 +00:00
drh
e5b2132df6 Fix a comment in sessions. No functional changes.
[forum:/forumpost/8c20dc935b|Forum post 8c20dc935b].

FossilOrigin-Name: b0eb6d3628c1f70399a22d9fd3b79a796bc343adfeba50515440db609565961a
2024-01-11 14:13:17 +00:00
dan
c08a8a33d3 In fts5, flush the contents of the in-memory hash table whenever the secure-delete option is toggled. This prevents spurious corruption reports under some circumstances.
FossilOrigin-Name: ccf552319a62bfb329820a3bc1f490bacbaa6e90694a257fc65a568a605542c3
2024-01-11 14:03:08 +00:00
stephan
bb9ab35ab1 Remove some dead JS code. Minor doc cleanups.
FossilOrigin-Name: bf23cf204976516651b1c4c39ced21cd858dea4ba88052d96fc4f5f11525f170
2024-01-11 12:56:03 +00:00
stephan
598328209f Split the JS vfs/vtab helper code into discreet units as a step towards a build which optionally elides those pieces. This is an internal restructuring change and does not affect the API.
FossilOrigin-Name: ede945fd2360097d9961b8a4b8fb48fea57399cb9163534ed1c3c6b86588b0a5
2024-01-11 12:31:58 +00:00
drh
5fdabcf9ff Put an SQLITE_ENABLE_SETLK_TIMEOUT branch inside the appropriate ifdef with
an assert on the else since the condition is always false if SETLK_TIMEOUT
is not available.

FossilOrigin-Name: d81e7a036ac5d70b6a6ee6ab7d81e041c1f5fc04b70bcee47e203d521caf7e93
2024-01-09 23:15:46 +00:00
drh
ff6905a1a5 Improved resolution of unqualified names in the REINDEX command.
[forum:/info/74cd0ceabd|Forum thread 74cd0ceabd].

FossilOrigin-Name: 97709ce2a1f5ae05495e412ca27108048e5b8a63a1e3bca4be13933f7527da7b
2024-01-09 12:28:51 +00:00
dan
e452bf40a1 Automatically turn off DEFENSIVE mode in the shell tool when executing scripts generated by the ".dump" command against an empty database. Add a warning to the top of generated ".dump" scripts that populate virtual tables.
FossilOrigin-Name: cd016f26bb61549a304f2148035e050f76a8f4a35cdb7131bba2f5fc5d09f49e
2024-01-08 19:55:40 +00:00
dan
62f0c4d139 Fix date on new file shell9.test.
FossilOrigin-Name: c82da712113d5dcd63b764dbc68842026989627abc840acb4a33f3a4972b832a
2024-01-08 18:53:27 +00:00
dan
7cda91c33e Automatically turn off DEFENSIVE mode in the shell tool when executing scripts generated by the ".dump" command against an empty database. Add a warning to the top of generated ".dump" scripts that populate virtual tables.
FossilOrigin-Name: 6e9e96b7e7afb9420110f4b93d10b945c9eadfde5e9c81e59ae9ee8167e75707
2024-01-08 18:46:34 +00:00
drh
3e2ffbd476 Minor change to os_unix.c to facilitate 100% MC/DC testing.
FossilOrigin-Name: 0dfa7b4da134db281c3c4eddb4569c53a450f955f0af2f410e13db801aff4ea2
2024-01-08 15:23:45 +00:00
dan
f640f79d6f Ensure that SQLITE_PROTOCOL is not returned too early when a SQLITE_ENABLE_SETLK_TIMEOUT build fails to open a transaction on a wal mode database in cases where blocking locks are not being used.
FossilOrigin-Name: a8e9af1356f5fb2ec460f932dfbe89283bb4e3cf9fa677d1acdbe77ffa11dd04
2024-01-08 13:38:15 +00:00
stephan
6b36d0b461 Make explicit which JS APIs are for internal use only by moving the JS-bound internal-use-only functions out of client-visible reach and renaming the WASM-exported ones from sqlite3_wasm... to sqlite3__wasm... (with two underscores). These have always been documented as internal-use-only, so this is not a breaking change except for clients which have ignored the docs.
FossilOrigin-Name: 0eddc20f37988df6bce5f407b69e4a315e5cca4af104586e6fe942f0d656cccd
2024-01-08 07:52:47 +00:00
drh
bf64cbd463 Remove an ALWAYS() from RTREE. Dbsqlfuzz found a way to make it false.
FossilOrigin-Name: 40f0a29e6dd90fcb969d7c0e49728ba0ee8f31d9e8f502b9a21469620a8ad283
2024-01-07 20:27:54 +00:00
drh
cd6ea30b82 Updates to RTREE to facility testing.
FossilOrigin-Name: 7a5b42ff74882c58493dc8b710fde73d4ff251f5d42271d84be73ceaabc01698
2024-01-07 00:45:53 +00:00
dan
4e50f7763b Ensure that SQLITE_PROTOCOL is not returned too early when a SQLITE_ENABLE_SETLK_TIMEOUT build fails to open a transaction on a wal mode database in cases where blocking locks are not being used.
FossilOrigin-Name: b934a33671d8a0190082ad7e5e68c78fe0c558d102404eafc1de26e4e7d65b92
2024-01-06 19:16:54 +00:00
drh
1ba138401e Update JSON performance testing procedures for clarity and to describe how to
do performance testing of JSONB.

FossilOrigin-Name: b115b4f75bc7c4e6d9bab5edf13297f27a36f30083c80d2c502b01208da5dfc0
2024-01-06 15:22:16 +00:00
dan
f537bba1a1 Update extension ext/misc/totext.c to avoid both ubsan warnings and dubious real->integer conversions.
FossilOrigin-Name: 541436004df6458dc2f38bdfa421099f78cab397f5f4795ca5f227531aaa6a3e
2024-01-06 13:58:54 +00:00
dan
1cfc040bba Update extension ext/misc/totext.c to avoid both ubsan warnings and dubious real->integer conversions.
FossilOrigin-Name: c626aa108a7a30cef54af8d93ac9e45749568ed38e4e06623a6bad6b4bf6e8ec
2024-01-05 15:53:58 +00:00