Commit Graph

27936 Commits

Author SHA1 Message Date
drh
0ebd1c382c Tweaks to the func4.test test module (which tests the rarely used totype.c
extension) so that it works on i586 compiled using gcc-13 with -O0.  Details
at [forum:/forumpost/0a7553b0f734c033|forum post 0a7553b0f734c033].

FossilOrigin-Name: d0fbe779bc2460e120da4f39063a9f4121c700f0b86d85f4311715b1366c3515
2024-03-15 13:16:13 +00:00
stephan
5a0fd81fce JS: remove an unused function argument and some debug-related comments. No functional changes.
FossilOrigin-Name: f15709430d4ba2fcf5729bc30a45dacb77102927b82cda12de0b67935b526cc0
2024-03-14 13:18:19 +00:00
drh
81a244c514 Minor change to the "mdevtest" and "sdevtest" in testrunner.tcl, to make it
easier to add configurations in branches.

FossilOrigin-Name: 9349d94e05dcf266b02afcd89f1e433cdc45f23e8536b2f3f9aa242d5d89c307
2024-03-13 16:32:05 +00:00
drh
6bb6a9c941 If the NJOB environment variable is a positive integer, it causes
testrunner.tcl to run that many jobs.

FossilOrigin-Name: 924281b94d8e6ba674d6fe2f7f01da890351355a854e9e6fe623fad1180f7392
2024-03-13 13:43:21 +00:00
drh
4565c8417b Document the testrunner.tcl --explain option in doc/testrunner.md.
FossilOrigin-Name: 5a7b5fc99a9d5c7693a5707c2050a8c59a8f97732e4763a56982579f8d5959ec
2024-03-13 13:27:16 +00:00
drh
4659ec34c1 Add the --explain option to testrunner.tcl.
FossilOrigin-Name: f0c9eb0326f189fe5ebbee83532ac2c413e91c6a8e9d5b93aa6170cba66fdd22
2024-03-13 13:09:58 +00:00
drh
9b6e535609 Improve one of the error messages from testrunner.tcl.
FossilOrigin-Name: 233155c174575fa99b34030c1936bc2b04489417f4d5223f18cdb3c8fc274a56
2024-03-13 11:46:23 +00:00
drh
c2764dbb33 Minor tweaks to the testrunner documentation.
FossilOrigin-Name: 3128b98d2656c7f23f6071c173f96329c7bdc49cd641050fbb7b105b810ba7c7
2024-03-13 11:29:04 +00:00
drh
484193fe7f Improvements to the "help" message generated by testrunner.tcl. Add the
special "list" permutation that does nothing but list all allowed
values for the PERMUTATION argument to testrunner.tcl.

FossilOrigin-Name: 1f5bfc6a9030f9905d258c5b665b9ff27efc7da71556c912ab3dce0f8f5aa8da
2024-03-13 10:55:47 +00:00
dan
1769640c8b Add pointer to documentation to testrunner.tcl help message.
FossilOrigin-Name: eff855102f9c0b4e9d876d1cff9d06c07de427b4880c2fa326d4d6e3e1dd13c8
2024-03-13 10:54:04 +00:00
dan
3de08a6ee0 Have testrunner.tcl set SQLITE_TMPDIR on windows as well.
FossilOrigin-Name: 64f4dad1f928716b8688c650d043f18afcc72ec78d990145c580e2b98905b919
2024-03-13 10:47:54 +00:00
drh
eea6bdce84 On testrunner.tcl: (1) Add the "help" command. (2) Add the "script" command
to the help message.  (3) Improve the error message generated by "script" when
an incorrect CONFIG option is provided.

FossilOrigin-Name: 1b7f0be44036fb90d763eabae84b95734e766f8010b39122f8787189308a7fc1
2024-03-13 00:37:37 +00:00
dan
f99ab38bdb Have testrunner.tcl have each test store its temp files in its working directory. To avoid unlikely, but possible, collisions.
FossilOrigin-Name: 18842d0d72048561312c2c83035c01253150e1fe1ff37160f266d24d41a01df3
2024-03-12 18:33:57 +00:00
dan
3ac5c08180 Have testrunner.tcl have each test store its temp files in its working directory. To avoid unlikely, but possible, collisions.
FossilOrigin-Name: 775a10d10b9bf2227071e778718ba4054d4b2b4238751eb147338d687b4e0d58
2024-03-12 18:04:40 +00:00
dan
38152d9d04 Fix another testrunner.tcl problem on windows.
FossilOrigin-Name: 7805844bc4433ae088dae6d54eb972e082c5a3df06e844cfc8b69e7d97aeb432
2024-03-11 20:34:02 +00:00
dan
f4783d4d7f Fix a missing brace problem in testrunner.tcl introduced by the previous commit.
FossilOrigin-Name: 1f5e334d98d98cd90a2fb53502015a883d96fed05c04c1c3e1e78c302bede50f
2024-03-11 19:43:43 +00:00
dan
2dbf276e93 Update mdevtest and sdevtest to do shell builds in parallel. And only if one or more of the tcl scripts run requires it.
FossilOrigin-Name: 6eae4547d4d50c798d1f05eaa1da02f4682d261dbd64e94748179923839024e6
2024-03-11 19:33:55 +00:00
drh
c6481e0289 Run shell*.test modules with "make mdevtest".
FossilOrigin-Name: 76c471061809307c1922a9460f1ea37291ff5f4dc11a71af594351e875fdc8e3
2024-03-11 18:21:02 +00:00
drh
5dfff386e5 Fix the ".import" command in the CLI so that it works correctly with tables
that contain computed columns.
[forum:/forumpost/ca014d7358|forum post ca014d7358].

FossilOrigin-Name: 95a9c88b258f18ac671a4c712603931167cc8bd0b86e41481b200c08043338b5
2024-03-11 11:24:59 +00:00
stephan
289507d78b Add more docs for the OPFS delete-before-open feature.
FossilOrigin-Name: cb8d9c269c01f78f09069a2361e15087d9aeac63e9f1fd63fbd96b951384e9aa
2024-03-11 09:39:52 +00:00
stephan
88abf9ad44 Add delete-before-open=1 URI flag to the 'opfs' VFS to tell it to xDelete the db file before opening it, primarily to enable users to work around a corrupt db without having to reach into OPFS-specific APIs to remove the db file.
FossilOrigin-Name: e87cf0d7700d33a439c91725460fbfe3a1765b48f71b4d73c38cadf6c166e0bd
2024-03-11 09:34:38 +00:00
stephan
bf030d53b1 Add delete-before-open=1 URI flag to the 'opfs' VFS to tell it to xDelete the db file before opening it, primarily to enable users to work around a corrupt db without having to reach into OPFS-specific APIs to remove the db file.
FossilOrigin-Name: e83f9788636f7f9bcca7d2a09620c13ab4eb83436d5b2946a827e48addf0267d
2024-03-11 09:32:38 +00:00
drh
5007833f5f Fix the .expert command in the shell so that it does not leak memory if not
followed by SQL and so that it works with reverse_unordered_selects.

FossilOrigin-Name: 7ead022edaf7a0cd6a8976a1261246084975c9a5be5c893f6c751bb5f963ac0f
2024-03-09 18:41:40 +00:00
drh
aa13f4c132 Fuzzcheck is run automatically by testrunner.tcl, so there is no need to
include fuzzcheck as a separate dependency for the releasetest target in
the MSVC makefile.

FossilOrigin-Name: 76629b2bff01df3d42eef2e93d626c291a2f129bd923498941465e5bca74e9f1
2024-03-09 13:31:10 +00:00
drh
61b77a6fe1 The NOT NULL strength reduction optimization from [de9c86c9e4cdb34f] should
be applied to the WHERE clause only.  Otherwise, the operand of the IS NULL
or IS NOT NULL operator might be a reference to a bare column of an
aggregate table, and we can't tell if it is NULL or not based only on its
NOT NULL attribute.  [forum:/forumpost/440f2a2f17|Forum post 440f2a2f17].

FossilOrigin-Name: 51704feae224eff601db5607f8651da11b3c2ed8a58ffe5b6ee8260cab50695b
2024-03-08 21:37:18 +00:00
drh
96f5ae6bd7 One of the assert()s added by the previous check-in was not quite correct.
This commit fixes it.

FossilOrigin-Name: d401358329f5a70f9a0b9b033609a4db2af89b83c6b40242be0c76f3d6474def
2024-03-08 19:03:30 +00:00
drh
744e5672bf Add new assert() statements, which if they had existed three years ago,
would have detected the code generator problem fixed by the previous check-in.

FossilOrigin-Name: 166d1e5d26ef88e995f44182144891f60bd51c1aa585b4a148f01a920b2a8eea
2024-03-08 15:39:59 +00:00
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