drh
926fb60b05
Silently ignore redundant ON CONFLICT clauses in an UPSERT. Only the first
...
ON CONFLICT for each index is active. Do not issue an error, since that might
break legacy queries. But ignore the redundant ON CONFLICT clauses to prevent
problems such as described in [forum:/forumpost/919c6579c8|forum post 919c6579c8].
FossilOrigin-Name: d0ea6b6ba64dba9d68c2b391ccf1171ea96fcdd7409dafdb2b697accb00246b8
2024-03-08 14:01:48 +00:00
dan
b89aa10cd0
Omit some extra tests for the intck extension in OMIT_VIRTUAL_TABLE or OMIT_PRAGMA builds.
...
FossilOrigin-Name: 29d9eb7d55755604781e507f6ca36c50d62fa8d8589ab932d7cefca94ba24f3e
2024-03-08 13:49:43 +00:00
dan
3041642b1a
Fix pragma6.test so that it works with ENABLE_OVERSIZE_CELL_CHECK builds.
...
FossilOrigin-Name: a02551de4c2d7085569ee76f88bfef5da429e40137cc1d1349b4637f88259ad1
2024-03-08 11:13:20 +00:00
dan
a219fb5bb9
Do not run tests for the intck extension in OMIT_VIRTUAL_TABLE or OMIT_PRAGMA builds.
...
FossilOrigin-Name: de8130c020821a1615cceeb730423a2d6e01578caaaddeb11950363c4f8ea412
2024-03-08 11:08:53 +00:00
drh
f10de5360a
Must use sqlite3IntFloatCompare() for accurate comparisons between very large
...
integer and floating point values in RTREE. Otherwise the comparison does
not work on all platforms. Further fix to [027e5336acc26f57].
FossilOrigin-Name: 820f106acff5f2cd01da0e95a0e6f2bcc087705bf8c08b730b1fdb08db5679c8
2024-03-08 03:24:09 +00:00
stephan
67fc3e0ac2
Introducing JS worker1 promiser v2, which initializes via Promise (instead of a callback function) and can be loaded as an ESM module.
...
FossilOrigin-Name: 2fbaf2f51d37f70ee26d45f0c62f32c15a9e03f68b6d2e2892115e7dc028b929
2024-03-07 19:29:53 +00:00
stephan
84016759dd
Resolve duplicate loading of promiser v2 demo code (a side effect of having done precisely what it was told to do). Consolidate demo-worker1-promiser(-esm).html/(m)js variants into central copies processed with c-pp.
...
FossilOrigin-Name: 9347d9b9a69277e40ea2f3ec6e1ff37ea19d24b4af80c6230b10624173f2f17c
2024-03-07 18:53:27 +00:00
stephan
ffa0fa69b6
wasm promiser.v2 is essentially working but the demo code is double-loading the module for as-yet-undetermined reasons.
...
FossilOrigin-Name: aa877ce0c3b3aa1accd6e5fcd722d1bfaa79bea28c04c6badd8a547cea4bbc63
2024-03-07 17:56:08 +00:00
stephan
61405c463d
Initial work at getting sqlite3Worker1Promiser.v2() to return a Promise instead of using an onready() callback, and also creating an ESM build for promiser1 per user request. It seems to work but requires more testing.
...
FossilOrigin-Name: 0e272123ace55ed63fe86632671cca48e8965a28fc3625324984028729fc203f
2024-03-07 16:04:43 +00:00
drh
c395f08099
Fix harmless compiler warnings in test code for the intck extension.
...
FossilOrigin-Name: 7fbdc1a849af3440579459bbb8797ebc7f9cce7b34d95675b8baa82db194ea9c
2024-03-07 15:58:06 +00:00
drh
5fb718aaab
Do not allow the query planner to be tricked into thinking that an index on a
...
constant expression might be useful for something. Problem reported on
[forum:/forumpost/ecdfc02339|forum post ecdfc02339]. This is a follow-up
to the fixes at [44200596aa943963] and [2d2b91cc0f6fed8c].
FossilOrigin-Name: 720ce06d93a9e4cc25c34c873c82165d8801f208c22701e51538f3210de84f65
2024-03-07 12:34:26 +00:00
drh
2b6cce16ff
Add the json_pretty() SQL function.
...
FossilOrigin-Name: ceb51c1cc36dfb78db8f2be042a0d74ab9a877d14a53dadf876d09e1a0616d6a
2024-03-06 20:49:05 +00:00
drh
1b977e3ae8
Add test cases for json_pretty().
...
FossilOrigin-Name: 6448b90708eeedef03e82dcb10d2879e1bc859d422b450c5fc403ffbe0343bed
2024-03-06 20:38:52 +00:00
mistachkin
1bd583e201
Work around obscure floating point issue seen with older versions of MSVC.
...
FossilOrigin-Name: 42d39f9140cc315df04b048f3811311fa50b51e1831d6cdf982fbce029778e43
2024-03-06 20:24:02 +00:00
stephan
31c3ac9049
Add a couple of json_pretty() examples to /fiddle.
...
FossilOrigin-Name: d5e1687b1d49cec5daa8793ea138fdf3bd29436c1e67071707ec0594bd1c66c6
2024-03-06 14:42:06 +00:00
drh
b4e7d59f4f
Add the json_pretty(J) function for pretty-printing of JSON. An optional
...
2nd argument is text used for indentation, with a default value being four
spaces.
FossilOrigin-Name: 39552bd36c06fe9ee346cb71e0659baceccde031b67c0974f2dd14eb11ebc055
2024-03-06 14:30:42 +00:00
drh
a64342ee9c
Correction to the previous check-in.
...
FossilOrigin-Name: 483fa2969e1e10cd8e8d2f9e3027871c65b1360b6c23897efe3ce63a3a55ae13
2024-03-06 12:28:55 +00:00
dan
53ca213e73
Fix handling of "id=?" corner cases in rtree when the value on the RHS is a real value.
...
FossilOrigin-Name: 027e5336acc26f57f21df4980928731026c30cf88688fa0b66f13ffa0b5da3a0
2024-03-06 11:35:36 +00:00
dan
7ab40cda7b
Remove code that added a P4 parameter to the OP_Variable opcode. This is no longer required.
...
FossilOrigin-Name: dd5977c9a8a418be3fbd646d74933996381099a9263a02eb4a990f0084463dc1
2024-03-05 18:41:03 +00:00
stephan
75aed69158
Reformulate [34439fe3aeea7cbb] slightly to resolve a false-positive OOM reported in [forum:2eadfe94e3|forum post 2eadfe94e3].
...
FossilOrigin-Name: 8290646792bc5411112b0c01dc5ac0837743056a7679725ee2edefef2e10d146
2024-03-05 17:33:04 +00:00
drh
28001204f4
The value returned by the json_each.json field needs to survive longer than
...
the json_each virtual table itself, in the event that the value is used in
an aggregate expression. dbsqlfuzz 5120bd0b3bb0b73eebbcb79ac37c6b0663fccad6
FossilOrigin-Name: 952ed71b9b61e79fe807ac3134bdfa7c94a415e02f13f94440a34d6d548d171e
2024-03-05 16:47:48 +00:00
stephan
891aa05450
/fiddle: reorder/replace example entries to make them more coherent when tried in order and clear the example selection list when the input area is cleared, both based on forum feedback.
...
FossilOrigin-Name: b4ce270b3f19499385d0923f0f28f702c8f664476def3994fdba5d418e3c5edb
2024-03-05 12:48:26 +00:00
stephan
7eb0ddf68b
/fiddle 'Mandlebrot' typo fix reported in the forum.
...
FossilOrigin-Name: ceefe6ba380c18279c2ae88443649e00e5e8110b529d447131ea9726de61f5d0
2024-03-05 08:48:40 +00:00
stephan
d5045a9246
Update fiddle.make to account for Makefile changes in [178b7d46f9].
...
FossilOrigin-Name: 7a5d810549f2686ae923fd0ca03ad8f536c9080b6879128ee8f00e653bb7f3f1
2024-03-05 07:55:20 +00:00
stephan
2c3973fdff
/fiddle: before resetting a db, roll back any transactions (resolves problem reported in [forum:0b41a25d65|forum post 0b41a25d65]) and remove an obsolete/broken reference to a long-gone API which could cause initialization to fail prematurely.
...
FossilOrigin-Name: ee164ca73cf4151b1a1bf351729afa9b0ec95bd5004a5d5bfce3ed46268bfbf3
2024-03-05 06:31:37 +00:00
drh
18281494a2
Fix a compiler warning in date.c. Update makefiles to include all necessary
...
dependencies for building shell.c.
FossilOrigin-Name: 178b7d46f9c8e1694ed6f506d2785a9f5c49e2b428e04c8096d557cc1b5c9680
2024-03-04 18:22:18 +00:00
drh
4cf953731f
Change test results in corruptC.test to account for the added detail in the
...
output of "PRAGMA integrity_check" from [b736519d3d2e93c7].
FossilOrigin-Name: 0d19eeaafb296aad212ee4f55a0f6df8c7c5185b14d7f7f49c020fe4cbe370c1
2024-03-04 16:44:37 +00:00
drh
90170503b4
Fix harmless compiler warnings in the increment integrity_check extension.
...
FossilOrigin-Name: 596668e6625208ff5d2ffbb4e0530530ebb3a400efa0df54bad1d91953e32694
2024-03-04 16:18:40 +00:00
drh
3f273db39b
Adjust date/time functions so that they do a better job of keeping track
...
of whether the current time is UTC or localtime, and no-op the 'utc' and
'localtime' modifiers accordingly. See
[forum:/info/e7a939e074|forum post e7a939e074].
Also add the datedebug() function, available
only under -DSQLITE_DEBUG, for improved visibility of the DateTime object
during debugging and testing.
FossilOrigin-Name: dc569683748354a6db83438904422e802d3ea780775c48da85b474fff03ca8a1
2024-03-04 13:58:09 +00:00
drh
8d25d07d50
Fix assert() statements in date/time computations: The month and day numbers
...
can be zero if an error has been seen.
FossilOrigin-Name: fc773f6c76ec114be8b6e25b13885acb5adcc9d052dca0d8d0ff94e2a0743d64
2024-03-04 11:12:15 +00:00
stephan
2775f10ebc
Document why the wasm build does not use Emscripten's -sSTRICT=1 flag and account for a behaviour change in emsdk 3.1.55 regarding the HEAPxyz symbols.
...
FossilOrigin-Name: f6e887203365b30cea6e9c145366345e48256a347388577edf2bada65e0655b7
2024-03-04 09:56:47 +00:00
stephan
bae55a7685
When warning about multiple invocations of JS's sqlite3ApiBootstrap(), use the warning logger installed by the first invocation, rather than console.warn.
...
FossilOrigin-Name: d162af2d9941cd8c53e3928efb42aaaf4e59454f7d39aebf980a30b1427ea75b
2024-03-04 09:23:52 +00:00
stephan
e6af60c14f
After wasm bootstrapping has read the optional global-scope config objects, delete those objects because any further changes would not have any useful effect. Expand the docs regarding the sqlite3ApiBootstrap() config object and explain the necessary evil of a separate global-scope object for that configuration.
...
FossilOrigin-Name: e6b14f73136aae4c1a92d6d6ab8c5d1510db5244d0b0f168eed5b4b257c99064
2024-03-04 06:54:41 +00:00
drh
aefa7afddb
Back out the previous change. Replace it with new date modifiers "ceiling"
...
and "floor".
FossilOrigin-Name: f0831cced2c919e409214d936c81473ae321a98c5bd78b5b729c1269bf71bc45
2024-03-03 20:15:36 +00:00
drh
ebc14e409f
New date/time modifiers "mnth" and "yr" work like "month" and "year" but
...
resolve day-of-month overflow by truncating rather than rolling over into
the next month. [forum:/forumpost/232d1abb5d|Forum thread 232d1abb5d]
FossilOrigin-Name: 5d392c16bb5658bc92f60d250ab82c45cc109e32d58a073498c9a487b8625e96
2024-03-02 21:02:41 +00:00
drh
f52afaf738
Change the magic time-interval names that do truncate-to-same-month to be
...
"mnth" and "yr" - "month" and "year" without the vowels.
FossilOrigin-Name: 296b46c529d79385d7f4db2c789254a992c01ff66fe8ba6d3a3ce4aaac0203fb
2024-03-02 20:50:56 +00:00
drh
6964005847
Proof-of-concept for new time-interval operator "pg-month" and "pg-year" that
...
use the truncate-to-month algorithm for month overflow instead of the
wrap-to-next-month algorithm that is used by SQLite by default.
FossilOrigin-Name: b606c0965788f56547435c9318b60e32990877e14a9640d887f33f39d1bdc7c3
2024-03-02 13:38:46 +00:00
stephan
91d7bd8ec7
Fix two -Werror=lto-type-mismatch warnings reported in [forum:ef62b57bd5|forum post ef62b57bd5].
...
FossilOrigin-Name: 803481f25020f3c25941f1e7d1a8071937820dea951e8798198b0b0fa3fb48ce
2024-02-29 10:55:02 +00:00
stephan
087e6c9ada
Fix two -Werror=lto-type-mismatch warnings reported in [forum:ef62b57bd5|forum post ef62b57bd5].
...
FossilOrigin-Name: 29f94610dc8319709b8d3726a60e2a7a33ffbf4998c681f772da26c9701cc0b0
2024-02-29 03:45:18 +00:00
drh
09a71d8d44
Add in a VdbeCoverage() macro needed by STAT4 that should have been part of
...
check-in [63ef234e88857a65].
FossilOrigin-Name: d51c699ae413215d534f954c129691ef5d95d540dc5d4304cbba576c976d931c
2024-02-28 15:32:32 +00:00
drh
8597eee119
Always convert 32-bit integer literals into EP_IntValue notation, even if
...
they contain "_" separators.
FossilOrigin-Name: 2dfc427f676255cbe189a26bfec2405d41d31ccc4512c55b31e6e633261d7a23
2024-02-28 01:12:21 +00:00
drh
b542933cba
Fix an eputf() macro without its argument in the CLI.
...
FossilOrigin-Name: c2f5e257d2cfb91341f5261ed3924dc4ec2a6f854f3692fb416043f5c654a963
2024-02-27 20:19:32 +00:00
drh
6324cdfdcd
Add an assert() to help scan-build recognize that a variable is initialized.
...
FossilOrigin-Name: 10d26f1ee8e7624cbb957332b4397d2f1fcdaf916acec93077f2ddd33e01f1d8
2024-02-27 19:57:31 +00:00
drh
2aea6083bd
Adjust a VdbeCoverage() macro in PRAGMA integrity_check to account for the
...
fact that arguments to the OP_Eq opcode used are never NULL.
FossilOrigin-Name: 759ccea3f6e21493c0153f884b601988efd59e409b113b28f8cf23f59a74e418
2024-02-27 16:36:40 +00:00
drh
39670a5345
Remove unreachable branches from the PRAGMA integrity_check enhancement of
...
[b736519d3d2e93c7].
FossilOrigin-Name: 6d02fb233fb86f9907cc374d06a7ed71a638091d6e75abc199001c42eab51e5c
2024-02-27 15:33:54 +00:00
dan
8732fce985
Ensure memory cells are properly freed before they are overwritten by OP_IntegrityCk.
...
FossilOrigin-Name: e50acaf934f44f8833bc588e0ae1abd59df907b9a42d4cafd5518427a8c7b627
2024-02-27 14:31:31 +00:00
dan
f8dc7d20f7
Have "PRAGMA quick_check" compare the number of entries in tables and indexes.
...
FossilOrigin-Name: b736519d3d2e93c76fa36253143f2664b9dd12e26acba555f0bf9c4d44705499
2024-02-27 11:03:10 +00:00
stephan
5b985fee64
Extend sqlite3.c makefile rule to support EXTRA_SRC=list-of-c-files to append to the generated sqlite3.c, as discussed in/around [forum:ccda88cf6f1754c5|forum post ccda88cf6f1754c5].
...
FossilOrigin-Name: 61676f1e18a405e4f3b6007488f2e68f3f55b312c107359ae5e52929f0c104c8
2024-02-27 11:02:31 +00:00
dan
1ffaa03adc
Allow "_" characters to appear between any two digits in an integer, real or hexadecimal SQL literal.
...
FossilOrigin-Name: 0e6700f43f133510c8049b2c5a2610cb3be29da7ed4d39b1fa65dc22c4cf529b
2024-02-27 10:52:41 +00:00
stephan
32888c2b30
Bring the extra-src branch up to date with the trunk.
...
FossilOrigin-Name: 12ff5c5c4162951a29b638a5bc6cffa50e057c5a5e8f5e9c627af5f4ab1e4cdb
2024-02-27 00:58:51 +00:00