]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
15 months agoAdd assert() statements to validate access to the SrcItem.u1.nRow union member.
drh [Mon, 18 Mar 2024 13:31:24 +0000 (13:31 +0000)] 
Add assert() statements to validate access to the SrcItem.u1.nRow union member.

FossilOrigin-Name: 21f616d9b948efca441f8d45d0a95f4c052ce8b6daec7fa582ad9a00b82ca570

15 months agoFix the patch at [10ee6fcba08ab128] so that it works on reduced-size Expr
drh [Mon, 18 Mar 2024 13:10:54 +0000 (13:10 +0000)] 
Fix the patch at [10ee6fcba08ab128] so that it works on reduced-size Expr
nodes.

FossilOrigin-Name: 260bd764c3f2d6d067adb9cd0045b7c24d5e00b02ab2735b1cba455a6143ff4c

15 months agoImprovements to EXPLAIN QUERY PLAN output for multi-row VALUES claues.
drh [Mon, 18 Mar 2024 12:49:30 +0000 (12:49 +0000)] 
Improvements to EXPLAIN QUERY PLAN output for multi-row VALUES claues.

FossilOrigin-Name: ac6f095e13e43d66c06552c8b01f6bec3407c9d41a34c4cdb0be57b0b828ad0d

15 months agoEnsure the database schema has been loaded and the database encoding gleaned before...
dan [Mon, 18 Mar 2024 11:12:22 +0000 (11:12 +0000)] 
Ensure the database schema has been loaded and the database encoding gleaned before beginning to code a multi-row VALUES clause.

FossilOrigin-Name: 2ff476eb3d1f4a2146f4a48b57895a00a3ff5beb29afa679ae53ea58cac07c76

15 months agoFix a problem caused by a non-aggregate function with an OVER clause in a multi-row...
dan [Mon, 18 Mar 2024 10:54:48 +0000 (10:54 +0000)] 
Fix a problem caused by a non-aggregate function with an OVER clause in a multi-row VALUES clause.

FossilOrigin-Name: 10ee6fcba08ab1281235197602148fe062560e1d5034a477b8e7b574dd3e2907

15 months agoOmit the "noop(X)" test SQL function. Accomplish the same thing using
drh [Sun, 17 Mar 2024 16:01:23 +0000 (16:01 +0000)] 
Omit the "noop(X)" test SQL function.  Accomplish the same thing using
the idiom:  "coalesce(X,random())".

FossilOrigin-Name: 0eb2fbb8910e7a372c50db3ae44238d7b161f0e45858b74061b5228aec5fcc7e

15 months agoAdd an ALWAYS on an unreachable branch.
drh [Sun, 17 Mar 2024 00:13:12 +0000 (00:13 +0000)] 
Add an ALWAYS on an unreachable branch.

FossilOrigin-Name: 0dce6211690210e802545cbca9b3375e07075e117fad3f8c921879da7671d981

15 months agoRecognize when an SQL function is constant and can occur inside an
drh [Sat, 16 Mar 2024 21:12:51 +0000 (21:12 +0000)] 
Recognize when an SQL function is constant and can occur inside an
optimized VALUES clause.

FossilOrigin-Name: c0e5ceb87d3cf28f22d381f863b8f91043804fd7901f23f3afb02fe698e6a12a

15 months agoA formerly impossible case has now become possible because of the new enhanced-expr-is-const
drh [Sat, 16 Mar 2024 21:04:32 +0000 (21:04 +0000)] 
A formerly impossible case has now become possible because of the new
ExprIsConstant enhancements.  So deal with that.

FossilOrigin-Name: 9ba3cff9d48fe8fc8a0a51291169599209d464465e44bdfd60058fd1e314a2b1

15 months agoFurther expand the scope of usage for the enhacement to expr-is-constant.
drh [Sat, 16 Mar 2024 20:15:34 +0000 (20:15 +0000)] 
Further expand the scope of usage for the enhacement to expr-is-constant.

FossilOrigin-Name: d7eadcf7dd089f0f4aa963c58f0df32edd951368c9906375fd62b0a61cd393b8

15 months agoAssert that the eCode is always non-zero upon entry into exprNodeIsConstant().
drh [Sat, 16 Mar 2024 19:48:51 +0000 (19:48 +0000)] 
Assert that the eCode is always non-zero upon entry into exprNodeIsConstant().

FossilOrigin-Name: f71b28f6713126745bca53e098dfe3444d4235d6a2b87ced5b333a7f0ee79be8

15 months agoActivate the enhanced constant-expression for the
drh [Sat, 16 Mar 2024 19:36:18 +0000 (19:36 +0000)] 
Activate the enhanced constant-expression for the
[constant propagation optimization](/info/f4229707ac08d66c).

FossilOrigin-Name: 92afea38881a1a4f266c79ddc6e1027cf17c288dcc8f7e7d50466899ac0054c4

15 months agoExtend the scope expr-is-constant for function to cover the IN-to-EQ
drh [Sat, 16 Mar 2024 17:04:08 +0000 (17:04 +0000)] 
Extend the scope expr-is-constant for function to cover the IN-to-EQ
optimization.

FossilOrigin-Name: dae669245c86021bcd28716aff6e316257cc8075d02081745d4b7de17f8ad553

15 months agoFix exprNodeIsConstantFunction() so that it returns WRC_Continue, not WRC_Abort,...
dan [Sat, 16 Mar 2024 14:27:10 +0000 (14:27 +0000)] 
Fix exprNodeIsConstantFunction() so that it returns WRC_Continue, not WRC_Abort, if the function really is constant.

FossilOrigin-Name: d85dd4de2d0989127e0ae6a2eec9d83a577777f8d5ba40700084a0b498016634

15 months agoEnhance the sqlite3ExprIsConstant() function so that it recognizes
drh [Sat, 16 Mar 2024 13:18:48 +0000 (13:18 +0000)] 
Enhance the sqlite3ExprIsConstant() function so that it recognizes
constant functions.  So far the enhancement only applies to the multi-row
VALUES clause, but it could possibly be applied in many other places.

FossilOrigin-Name: c9e0488c6c0135932b6e76b0f3f3acd69ef65327e0a54daa59777f35da1aef26

15 months agoFix testcase to account for new behaviors with this branch.
drh [Thu, 14 Mar 2024 20:39:03 +0000 (20:39 +0000)] 
Fix testcase to account for new behaviors with this branch.

FossilOrigin-Name: 823e579362c05bb8accf6c3b158c5162a16eb23cf81d6021c9e3246e32583d1c

15 months agoFix a problem with ALTER TABLE and correlated multi-row VALUES clauses.
dan [Thu, 14 Mar 2024 19:31:06 +0000 (19:31 +0000)] 
Fix a problem with ALTER TABLE and correlated multi-row VALUES clauses.

FossilOrigin-Name: d543c829ef74dbd64105bd757ca660e4f02e9ce562be4f1688a701fa535351c4

15 months agoFix a problem handling "INSERT INTO ... SELECT ... UNION VALUES(...), (...)" and...
dan [Thu, 14 Mar 2024 19:01:17 +0000 (19:01 +0000)] 
Fix a problem handling "INSERT INTO ... SELECT ... UNION VALUES(...), (...)" and similar statements.

FossilOrigin-Name: e8a2a8198a97046ff376bc5d38e4bc0a24fcac79f5a0dadb9d29d953a862a012

15 months agoAvoid some OP_SCopy instructions in "INSERT INTO .. VALUES" statements that insert...
dan [Thu, 14 Mar 2024 17:04:18 +0000 (17:04 +0000)] 
Avoid some OP_SCopy instructions in "INSERT INTO .. VALUES" statements that insert more than one row in cases where the VALUES clause contains a value for all columns of the table.

FossilOrigin-Name: 988f0ea70cd21b3194011e0cd1ddd4990a07669e0fd9c37afa48f69698ab7212

15 months agoAdd further tests for VALUES clauses in various contexts.
dan [Thu, 14 Mar 2024 11:45:39 +0000 (11:45 +0000)] 
Add further tests for VALUES clauses in various contexts.

FossilOrigin-Name: 973d197d9676c066a95cea77a27e36d2d7f5778283919d8cac4424d2ec952f47

15 months agoChange the way parse.y handles multi-row VALUES clauses to save a few cycles.
dan [Wed, 13 Mar 2024 20:04:11 +0000 (20:04 +0000)] 
Change the way parse.y handles multi-row VALUES clauses to save a few cycles.

FossilOrigin-Name: 88d5bc91a52675d2a83748b79ad50de0e9732b2afd23107627bdc604f744d275

15 months agoRemove unreachable code from this branch.
dan [Wed, 13 Mar 2024 18:41:05 +0000 (18:41 +0000)] 
Remove unreachable code from this branch.

FossilOrigin-Name: 657c7b4f9df53e041a33cfad00ee2f507ac09c97a2ae61164bd189d660d167da

15 months agoFix some OOM handling problems on this branch.
dan [Wed, 13 Mar 2024 17:33:45 +0000 (17:33 +0000)] 
Fix some OOM handling problems on this branch.

FossilOrigin-Name: 2085c7f12a3916ec883c31795e29f2e2b6641c30ecf748cce9bff7b13b061d1f

15 months agoMerge trunk into this branch.
dan [Wed, 13 Mar 2024 15:47:52 +0000 (15:47 +0000)] 
Merge trunk into this branch.

FossilOrigin-Name: 38635651f08d42110c01d6b24f6e362e340511846294f8696af4afc795dae80d

15 months agoEnsure that if a multi-row VALUES cannot be coded while being parsed, the SF_MultiVal...
dan [Wed, 13 Mar 2024 15:44:31 +0000 (15:44 +0000)] 
Ensure that if a multi-row VALUES cannot be coded while being parsed, the SF_MultiValue flag is correctly set.

FossilOrigin-Name: 94791824a6f04782aac6bc16c182685e2d6ebf5c688dc9f8d59e479c6fd5a40e

15 months agoAvoid creating a co-routine incrementally for a VALUES clause that has affinities...
dan [Wed, 13 Mar 2024 15:34:44 +0000 (15:34 +0000)] 
Avoid creating a co-routine incrementally for a VALUES clause that has affinities other than NONE.

FossilOrigin-Name: 4229b12b327b05561dcf49b8585a66467d17d4e998b14eff65eb886f2434b53c

15 months agoIf the NJOB environment variable is a positive integer, it causes
drh [Wed, 13 Mar 2024 13:43:21 +0000 (13:43 +0000)] 
If the NJOB environment variable is a positive integer, it causes
testrunner.tcl to run that many jobs.

FossilOrigin-Name: 924281b94d8e6ba674d6fe2f7f01da890351355a854e9e6fe623fad1180f7392

15 months agoDocument the testrunner.tcl --explain option in doc/testrunner.md.
drh [Wed, 13 Mar 2024 13:27:16 +0000 (13:27 +0000)] 
Document the testrunner.tcl --explain option in doc/testrunner.md.

FossilOrigin-Name: 5a7b5fc99a9d5c7693a5707c2050a8c59a8f97732e4763a56982579f8d5959ec

15 months agoAdd the --explain option to testrunner.tcl.
drh [Wed, 13 Mar 2024 13:09:58 +0000 (13:09 +0000)] 
Add the --explain option to testrunner.tcl.

FossilOrigin-Name: f0c9eb0326f189fe5ebbee83532ac2c413e91c6a8e9d5b93aa6170cba66fdd22

15 months agoImprove one of the error messages from testrunner.tcl.
drh [Wed, 13 Mar 2024 11:46:23 +0000 (11:46 +0000)] 
Improve one of the error messages from testrunner.tcl.

FossilOrigin-Name: 233155c174575fa99b34030c1936bc2b04489417f4d5223f18cdb3c8fc274a56

15 months agoMinor tweaks to the testrunner documentation.
drh [Wed, 13 Mar 2024 11:29:04 +0000 (11:29 +0000)] 
Minor tweaks to the testrunner documentation.

FossilOrigin-Name: 3128b98d2656c7f23f6071c173f96329c7bdc49cd641050fbb7b105b810ba7c7

15 months agoImprovements to the "help" message generated by testrunner.tcl. Add the
drh [Wed, 13 Mar 2024 10:55:47 +0000 (10:55 +0000)] 
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

15 months agoAdd pointer to documentation to testrunner.tcl help message.
dan [Wed, 13 Mar 2024 10:54:04 +0000 (10:54 +0000)] 
Add pointer to documentation to testrunner.tcl help message.

FossilOrigin-Name: eff855102f9c0b4e9d876d1cff9d06c07de427b4880c2fa326d4d6e3e1dd13c8

15 months agoHave testrunner.tcl set SQLITE_TMPDIR on windows as well.
dan [Wed, 13 Mar 2024 10:47:54 +0000 (10:47 +0000)] 
Have testrunner.tcl set SQLITE_TMPDIR on windows as well.

FossilOrigin-Name: 64f4dad1f928716b8688c650d043f18afcc72ec78d990145c580e2b98905b919

15 months agoOn testrunner.tcl: (1) Add the "help" command. (2) Add the "script" command
drh [Wed, 13 Mar 2024 00:37:37 +0000 (00:37 +0000)] 
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

15 months agoCorrectly initialize the SrcItem.iCursor field to -1 when creating a co-routine from...
dan [Tue, 12 Mar 2024 20:10:46 +0000 (20:10 +0000)] 
Correctly initialize the SrcItem.iCursor field to -1 when creating a co-routine from a multi-values VALUES clause.

FossilOrigin-Name: c32953ff6d72910815eaff29ab1b790c412e1a741d02c03c5911dda0c08e5130

15 months agoHave testrunner.tcl have each test store its temp files in its working directory...
dan [Tue, 12 Mar 2024 18:33:57 +0000 (18:33 +0000)] 
Have testrunner.tcl have each test store its temp files in its working directory. To avoid unlikely, but possible, collisions.

FossilOrigin-Name: 18842d0d72048561312c2c83035c01253150e1fe1ff37160f266d24d41a01df3

15 months agoHave testrunner.tcl have each test store its temp files in its working directory... testrunner-tmpdir-fix
dan [Tue, 12 Mar 2024 18:04:40 +0000 (18:04 +0000)] 
Have testrunner.tcl have each test store its temp files in its working directory. To avoid unlikely, but possible, collisions.

FossilOrigin-Name: 775a10d10b9bf2227071e778718ba4054d4b2b4238751eb147338d687b4e0d58

15 months agoFix another testrunner.tcl problem on windows.
dan [Mon, 11 Mar 2024 20:34:02 +0000 (20:34 +0000)] 
Fix another testrunner.tcl problem on windows.

FossilOrigin-Name: 7805844bc4433ae088dae6d54eb972e082c5a3df06e844cfc8b69e7d97aeb432

15 months agoFix a missing brace problem in testrunner.tcl introduced by the previous commit.
dan [Mon, 11 Mar 2024 19:43:43 +0000 (19:43 +0000)] 
Fix a missing brace problem in testrunner.tcl introduced by the previous commit.

FossilOrigin-Name: 1f5e334d98d98cd90a2fb53502015a883d96fed05c04c1c3e1e78c302bede50f

15 months agoUpdate mdevtest and sdevtest to do shell builds in parallel. And only if one or more...
dan [Mon, 11 Mar 2024 19:33:55 +0000 (19:33 +0000)] 
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

15 months agoRun shell*.test modules with "make mdevtest".
drh [Mon, 11 Mar 2024 18:21:02 +0000 (18:21 +0000)] 
Run shell*.test modules with "make mdevtest".

FossilOrigin-Name: 76c471061809307c1922a9460f1ea37291ff5f4dc11a71af594351e875fdc8e3

15 months agoAttempt to reduce the memory used by VALUES clauses in as many statements as possible...
dan [Mon, 11 Mar 2024 17:27:19 +0000 (17:27 +0000)] 
Attempt to reduce the memory used by VALUES clauses in as many statements as possible, not just INSERT. This branch still has problems.

FossilOrigin-Name: 17d1f7cfabc7593d0725051b0c7c9619a23a482265f30f15ab9493fef5caeeb0

15 months agoFix the ".import" command in the CLI so that it works correctly with tables
drh [Mon, 11 Mar 2024 11:24:59 +0000 (11:24 +0000)] 
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

15 months agoAdd more docs for the OPFS delete-before-open feature.
stephan [Mon, 11 Mar 2024 09:39:52 +0000 (09:39 +0000)] 
Add more docs for the OPFS delete-before-open feature.

FossilOrigin-Name: cb8d9c269c01f78f09069a2361e15087d9aeac63e9f1fd63fbd96b951384e9aa

15 months agoAdd delete-before-open=1 URI flag to the 'opfs' VFS to tell it to xDelete the db...
stephan [Mon, 11 Mar 2024 09:34:38 +0000 (09:34 +0000)] 
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

15 months agoAdd delete-before-open=1 URI flag to the 'opfs' VFS to tell it to xDelete the db... opfs-delete-before-open
stephan [Mon, 11 Mar 2024 09:32:38 +0000 (09:32 +0000)] 
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

15 months agoFix the .expert command in the shell so that it does not leak memory if not
drh [Sat, 9 Mar 2024 18:41:40 +0000 (18:41 +0000)] 
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

15 months agoFuzzcheck is run automatically by testrunner.tcl, so there is no need to
drh [Sat, 9 Mar 2024 13:31:10 +0000 (13:31 +0000)] 
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

15 months agoThe NOT NULL strength reduction optimization from [de9c86c9e4cdb34f] should
drh [Fri, 8 Mar 2024 21:37:18 +0000 (21:37 +0000)] 
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

15 months agoOne of the assert()s added by the previous check-in was not quite correct.
drh [Fri, 8 Mar 2024 19:03:30 +0000 (19:03 +0000)] 
One of the assert()s added by the previous check-in was not quite correct.
This commit fixes it.

FossilOrigin-Name: d401358329f5a70f9a0b9b033609a4db2af89b83c6b40242be0c76f3d6474def

15 months agoAdd new assert() statements, which if they had existed three years ago,
drh [Fri, 8 Mar 2024 15:39:59 +0000 (15:39 +0000)] 
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

15 months agoSilently ignore redundant ON CONFLICT clauses in an UPSERT. Only the first
drh [Fri, 8 Mar 2024 14:01:48 +0000 (14:01 +0000)] 
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

15 months agoOmit some extra tests for the intck extension in OMIT_VIRTUAL_TABLE or OMIT_PRAGMA...
dan [Fri, 8 Mar 2024 13:49:43 +0000 (13:49 +0000)] 
Omit some extra tests for the intck extension in OMIT_VIRTUAL_TABLE or OMIT_PRAGMA builds.

FossilOrigin-Name: 29d9eb7d55755604781e507f6ca36c50d62fa8d8589ab932d7cefca94ba24f3e

15 months agoFix pragma6.test so that it works with ENABLE_OVERSIZE_CELL_CHECK builds.
dan [Fri, 8 Mar 2024 11:13:20 +0000 (11:13 +0000)] 
Fix pragma6.test so that it works with ENABLE_OVERSIZE_CELL_CHECK builds.

FossilOrigin-Name: a02551de4c2d7085569ee76f88bfef5da429e40137cc1d1349b4637f88259ad1

15 months agoDo not run tests for the intck extension in OMIT_VIRTUAL_TABLE or OMIT_PRAGMA builds.
dan [Fri, 8 Mar 2024 11:08:53 +0000 (11:08 +0000)] 
Do not run tests for the intck extension in OMIT_VIRTUAL_TABLE or OMIT_PRAGMA builds.

FossilOrigin-Name: de8130c020821a1615cceeb730423a2d6e01578caaaddeb11950363c4f8ea412

15 months agoMust use sqlite3IntFloatCompare() for accurate comparisons between very large
drh [Fri, 8 Mar 2024 03:24:09 +0000 (03:24 +0000)] 
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

15 months agoIntroducing JS worker1 promiser v2, which initializes via Promise (instead of a callb...
stephan [Thu, 7 Mar 2024 19:29:53 +0000 (19:29 +0000)] 
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

15 months agoResolve duplicate loading of promiser v2 demo code (a side effect of having done... wasm-promiser1-v2
stephan [Thu, 7 Mar 2024 18:53:27 +0000 (18:53 +0000)] 
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

15 months agowasm promiser.v2 is essentially working but the demo code is double-loading the modul...
stephan [Thu, 7 Mar 2024 17:56:08 +0000 (17:56 +0000)] 
wasm promiser.v2 is essentially working but the demo code is double-loading the module for as-yet-undetermined reasons.

FossilOrigin-Name: aa877ce0c3b3aa1accd6e5fcd722d1bfaa79bea28c04c6badd8a547cea4bbc63

15 months agoInitial work at getting sqlite3Worker1Promiser.v2() to return a Promise instead of...
stephan [Thu, 7 Mar 2024 16:04:43 +0000 (16:04 +0000)] 
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

15 months agoFix harmless compiler warnings in test code for the intck extension.
drh [Thu, 7 Mar 2024 15:58:06 +0000 (15:58 +0000)] 
Fix harmless compiler warnings in test code for the intck extension.

FossilOrigin-Name: 7fbdc1a849af3440579459bbb8797ebc7f9cce7b34d95675b8baa82db194ea9c

15 months agoDo not allow the query planner to be tricked into thinking that an index on a
drh [Thu, 7 Mar 2024 12:34:26 +0000 (12:34 +0000)] 
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

16 months agoAdd the json_pretty() SQL function.
drh [Wed, 6 Mar 2024 20:49:05 +0000 (20:49 +0000)] 
Add the json_pretty() SQL function.

FossilOrigin-Name: ceb51c1cc36dfb78db8f2be042a0d74ab9a877d14a53dadf876d09e1a0616d6a

16 months agoAdd test cases for json_pretty(). json-pretty
drh [Wed, 6 Mar 2024 20:38:52 +0000 (20:38 +0000)] 
Add test cases for json_pretty().

FossilOrigin-Name: 6448b90708eeedef03e82dcb10d2879e1bc859d422b450c5fc403ffbe0343bed

16 months agoWork around obscure floating point issue seen with older versions of MSVC.
mistachkin [Wed, 6 Mar 2024 20:24:02 +0000 (20:24 +0000)] 
Work around obscure floating point issue seen with older versions of MSVC.

FossilOrigin-Name: 42d39f9140cc315df04b048f3811311fa50b51e1831d6cdf982fbce029778e43

16 months agoAdd a couple of json_pretty() examples to /fiddle.
stephan [Wed, 6 Mar 2024 14:42:06 +0000 (14:42 +0000)] 
Add a couple of json_pretty() examples to /fiddle.

FossilOrigin-Name: d5e1687b1d49cec5daa8793ea138fdf3bd29436c1e67071707ec0594bd1c66c6

16 months agoAdd the json_pretty(J) function for pretty-printing of JSON. An optional
drh [Wed, 6 Mar 2024 14:30:42 +0000 (14:30 +0000)] 
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

16 months agoCorrection to the previous check-in.
drh [Wed, 6 Mar 2024 12:28:55 +0000 (12:28 +0000)] 
Correction to the previous check-in.

FossilOrigin-Name: 483fa2969e1e10cd8e8d2f9e3027871c65b1360b6c23897efe3ce63a3a55ae13

16 months agoFix handling of "id=?" corner cases in rtree when the value on the RHS is a real...
dan [Wed, 6 Mar 2024 11:35:36 +0000 (11:35 +0000)] 
Fix handling of "id=?" corner cases in rtree when the value on the RHS is a real value.

FossilOrigin-Name: 027e5336acc26f57f21df4980928731026c30cf88688fa0b66f13ffa0b5da3a0

16 months agoRemove code that added a P4 parameter to the OP_Variable opcode. This is no longer...
dan [Tue, 5 Mar 2024 18:41:03 +0000 (18:41 +0000)] 
Remove code that added a P4 parameter to the OP_Variable opcode. This is no longer required.

FossilOrigin-Name: dd5977c9a8a418be3fbd646d74933996381099a9263a02eb4a990f0084463dc1

16 months agoReformulate [34439fe3aeea7cbb] slightly to resolve a false-positive OOM reported...
stephan [Tue, 5 Mar 2024 17:33:04 +0000 (17:33 +0000)] 
Reformulate [34439fe3aeea7cbb] slightly to resolve a false-positive OOM reported in [forum:2eadfe94e3|forum post 2eadfe94e3].

FossilOrigin-Name: 8290646792bc5411112b0c01dc5ac0837743056a7679725ee2edefef2e10d146

16 months agoThe value returned by the json_each.json field needs to survive longer than
drh [Tue, 5 Mar 2024 16:47:48 +0000 (16:47 +0000)] 
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

16 months ago/fiddle: reorder/replace example entries to make them more coherent when tried in...
stephan [Tue, 5 Mar 2024 12:48:26 +0000 (12:48 +0000)] 
/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

16 months ago/fiddle 'Mandlebrot' typo fix reported in the forum.
stephan [Tue, 5 Mar 2024 08:48:40 +0000 (08:48 +0000)] 
/fiddle 'Mandlebrot' typo fix reported in the forum.

FossilOrigin-Name: ceefe6ba380c18279c2ae88443649e00e5e8110b529d447131ea9726de61f5d0

16 months agoUpdate fiddle.make to account for Makefile changes in [178b7d46f9].
stephan [Tue, 5 Mar 2024 07:55:20 +0000 (07:55 +0000)] 
Update fiddle.make to account for Makefile changes in [178b7d46f9].

FossilOrigin-Name: 7a5d810549f2686ae923fd0ca03ad8f536c9080b6879128ee8f00e653bb7f3f1

16 months ago/fiddle: before resetting a db, roll back any transactions (resolves problem reported...
stephan [Tue, 5 Mar 2024 06:31:37 +0000 (06:31 +0000)] 
/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

16 months agoFix a compiler warning in date.c. Update makefiles to include all necessary
drh [Mon, 4 Mar 2024 18:22:18 +0000 (18:22 +0000)] 
Fix a compiler warning in date.c.  Update makefiles to include all necessary
dependencies for building shell.c.

FossilOrigin-Name: 178b7d46f9c8e1694ed6f506d2785a9f5c49e2b428e04c8096d557cc1b5c9680

16 months agoChange test results in corruptC.test to account for the added detail in the
drh [Mon, 4 Mar 2024 16:44:37 +0000 (16:44 +0000)] 
Change test results in corruptC.test to account for the added detail in the
output of "PRAGMA integrity_check" from [b736519d3d2e93c7].

FossilOrigin-Name: 0d19eeaafb296aad212ee4f55a0f6df8c7c5185b14d7f7f49c020fe4cbe370c1

16 months agoFix harmless compiler warnings in the increment integrity_check extension.
drh [Mon, 4 Mar 2024 16:18:40 +0000 (16:18 +0000)] 
Fix harmless compiler warnings in the increment integrity_check extension.

FossilOrigin-Name: 596668e6625208ff5d2ffbb4e0530530ebb3a400efa0df54bad1d91953e32694

16 months agoAdjust date/time functions so that they do a better job of keeping track
drh [Mon, 4 Mar 2024 13:58:09 +0000 (13:58 +0000)] 
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

16 months agoFix assert() statements in date/time computations: The month and day numbers
drh [Mon, 4 Mar 2024 11:12:15 +0000 (11:12 +0000)] 
Fix assert() statements in date/time computations: The month and day numbers
can be zero if an error has been seen.

FossilOrigin-Name: fc773f6c76ec114be8b6e25b13885acb5adcc9d052dca0d8d0ff94e2a0743d64

16 months agoDocument why the wasm build does not use Emscripten's -sSTRICT=1 flag and account...
stephan [Mon, 4 Mar 2024 09:56:47 +0000 (09:56 +0000)] 
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

16 months agoWhen warning about multiple invocations of JS's sqlite3ApiBootstrap(), use the warnin...
stephan [Mon, 4 Mar 2024 09:23:52 +0000 (09:23 +0000)] 
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

16 months agoAfter wasm bootstrapping has read the optional global-scope config objects, delete...
stephan [Mon, 4 Mar 2024 06:54:41 +0000 (06:54 +0000)] 
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

16 months agoBack out the previous change. Replace it with new date modifiers "ceiling"
drh [Sun, 3 Mar 2024 20:15:36 +0000 (20:15 +0000)] 
Back out the previous change.  Replace it with new date modifiers "ceiling"
and "floor".

FossilOrigin-Name: f0831cced2c919e409214d936c81473ae321a98c5bd78b5b729c1269bf71bc45

16 months agoNew date/time modifiers "mnth" and "yr" work like "month" and "year" but
drh [Sat, 2 Mar 2024 21:02:41 +0000 (21:02 +0000)] 
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

16 months agoChange the magic time-interval names that do truncate-to-same-month to be month-truncate
drh [Sat, 2 Mar 2024 20:50:56 +0000 (20:50 +0000)] 
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

16 months agoProof-of-concept for new time-interval operator "pg-month" and "pg-year" that
drh [Sat, 2 Mar 2024 13:38:46 +0000 (13:38 +0000)] 
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

16 months agoFix two -Werror=lto-type-mismatch warnings reported in [forum:ef62b57bd5|forum post...
stephan [Thu, 29 Feb 2024 10:55:02 +0000 (10:55 +0000)] 
Fix two -Werror=lto-type-mismatch warnings reported in [forum:ef62b57bd5|forum post ef62b57bd5].

FossilOrigin-Name: 803481f25020f3c25941f1e7d1a8071937820dea951e8798198b0b0fa3fb48ce

16 months agoFix two -Werror=lto-type-mismatch warnings reported in [forum:ef62b57bd5|forum post... lto-type-mismatch
stephan [Thu, 29 Feb 2024 03:45:18 +0000 (03:45 +0000)] 
Fix two -Werror=lto-type-mismatch warnings reported in [forum:ef62b57bd5|forum post ef62b57bd5].

FossilOrigin-Name: 29f94610dc8319709b8d3726a60e2a7a33ffbf4998c681f772da26c9701cc0b0

16 months agoAdd in a VdbeCoverage() macro needed by STAT4 that should have been part of
drh [Wed, 28 Feb 2024 15:32:32 +0000 (15:32 +0000)] 
Add in a VdbeCoverage() macro needed by STAT4 that should have been part of
check-in [63ef234e88857a65].

FossilOrigin-Name: d51c699ae413215d534f954c129691ef5d95d540dc5d4304cbba576c976d931c

16 months agoAlways convert 32-bit integer literals into EP_IntValue notation, even if
drh [Wed, 28 Feb 2024 01:12:21 +0000 (01:12 +0000)] 
Always convert 32-bit integer literals into EP_IntValue notation, even if
they contain "_" separators.

FossilOrigin-Name: 2dfc427f676255cbe189a26bfec2405d41d31ccc4512c55b31e6e633261d7a23

16 months agoFix an eputf() macro without its argument in the CLI.
drh [Tue, 27 Feb 2024 20:19:32 +0000 (20:19 +0000)] 
Fix an eputf() macro without its argument in the CLI.

FossilOrigin-Name: c2f5e257d2cfb91341f5261ed3924dc4ec2a6f854f3692fb416043f5c654a963

16 months agoAdd an assert() to help scan-build recognize that a variable is initialized.
drh [Tue, 27 Feb 2024 19:57:31 +0000 (19:57 +0000)] 
Add an assert() to help scan-build recognize that a variable is initialized.

FossilOrigin-Name: 10d26f1ee8e7624cbb957332b4397d2f1fcdaf916acec93077f2ddd33e01f1d8

16 months agoAdjust a VdbeCoverage() macro in PRAGMA integrity_check to account for the
drh [Tue, 27 Feb 2024 16:36:40 +0000 (16:36 +0000)] 
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

16 months agoRemove unreachable branches from the PRAGMA integrity_check enhancement of
drh [Tue, 27 Feb 2024 15:33:54 +0000 (15:33 +0000)] 
Remove unreachable branches from the PRAGMA integrity_check enhancement of
[b736519d3d2e93c7].

FossilOrigin-Name: 6d02fb233fb86f9907cc374d06a7ed71a638091d6e75abc199001c42eab51e5c

16 months agoEnsure memory cells are properly freed before they are overwritten by OP_IntegrityCk.
dan [Tue, 27 Feb 2024 14:31:31 +0000 (14:31 +0000)] 
Ensure memory cells are properly freed before they are overwritten by OP_IntegrityCk.

FossilOrigin-Name: e50acaf934f44f8833bc588e0ae1abd59df907b9a42d4cafd5518427a8c7b627

16 months agoHave "PRAGMA quick_check" compare the number of entries in tables and indexes.
dan [Tue, 27 Feb 2024 11:03:10 +0000 (11:03 +0000)] 
Have "PRAGMA quick_check" compare the number of entries in tables and indexes.

FossilOrigin-Name: b736519d3d2e93c76fa36253143f2664b9dd12e26acba555f0bf9c4d44705499

16 months agoExtend sqlite3.c makefile rule to support EXTRA_SRC=list-of-c-files to append to...
stephan [Tue, 27 Feb 2024 11:02:31 +0000 (11:02 +0000)] 
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