]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
15 months agoFix a typo in a comment. rowid-in-view
drh [Wed, 20 Mar 2024 10:40:25 +0000 (10:40 +0000)] 
Fix a typo in a comment.

FossilOrigin-Name: 54680d0fbec1f0575ac4be6dca866971795dab2c42b02a492d5cd485f46d153f

15 months agoFix typos in the SQLITE_CONFIG_ROWID_IN_VIEW documentation.
drh [Wed, 20 Mar 2024 09:45:44 +0000 (09:45 +0000)] 
Fix typos in the SQLITE_CONFIG_ROWID_IN_VIEW documentation.

FossilOrigin-Name: 1ad1ca498296493c8e89cda911cc153baa51c90ae6c19961841e6b4e37302a23

15 months agoChange the SQLITE_CONFIG_NO_ROWID_IN_VIEW configuration option to be
drh [Tue, 19 Mar 2024 23:01:56 +0000 (23:01 +0000)] 
Change the SQLITE_CONFIG_NO_ROWID_IN_VIEW configuration option to be
just SQLITE_CONFIG_ROWID_IN_VIEW (without the "_NO_" in the middle) and give
it the ability to turn the option on and off.  Otherwise, it is difficult
to test.

FossilOrigin-Name: 5d412edc2e378999ad798d1d7d73c7f7a17ee4e3c751a0dd00b9d5ce32759550

15 months agoReturn the error "ambiguous column name: rowid", instead of "no such column: rowid...
drh [Tue, 19 Mar 2024 19:56:39 +0000 (19:56 +0000)] 
Return the error "ambiguous column name: rowid", instead of "no such column: rowid", when a "rowid" reference is ambiguous.

FossilOrigin-Name: 0615bdae2dfc70c7e0416a28e89ffde31fa44ed4b3dac46e5ef20eed0d89e58c

15 months agoAdd the --no-rowid-in-view option to the --help output of the CLI.
drh [Tue, 19 Mar 2024 19:48:50 +0000 (19:48 +0000)] 
Add the --no-rowid-in-view option to the --help output of the CLI.

FossilOrigin-Name: 134da9c348a5e3b5cef97b79f37d48257afd4fa958a84f6930ac9874284a14cd

15 months agoUpdate test scripts to account for [8fcea4cd].
dan [Tue, 19 Mar 2024 16:51:18 +0000 (16:51 +0000)] 
Update test scripts to account for [8fcea4cd].

FossilOrigin-Name: 0c543c51a8c5c8916f649a5e7fd3fedc9c05f2df36064b1699ea6f5e08eaa9e0

15 months agoIn the name resolver when SQLITE_ALLOW_ROWID_IN_INDEX is enabled, if there
drh [Tue, 19 Mar 2024 16:34:32 +0000 (16:34 +0000)] 
In the name resolver when SQLITE_ALLOW_ROWID_IN_INDEX is enabled, if there
are multiple views that might resolve to the "rowid" but only one real table,
then use that one real table and ignore the views.

FossilOrigin-Name: 8fcea4cdfc89dd78eca5e7f62aa31aff0e296f41e79349d3af1cc3a2bc4d77c6

15 months agoUpdate tests to work with SQLITE_ALLOW_ROWID_IN_VIEW.
dan [Tue, 19 Mar 2024 15:27:15 +0000 (15:27 +0000)] 
Update tests to work with SQLITE_ALLOW_ROWID_IN_VIEW.

FossilOrigin-Name: 495b8c7b08b998ddfe2ad055703f058c768e7e94014952e5cd8a81c7c1515cb1

15 months agoReturn the error "ambiguous column name: rowid", instead of "no such column: rowid... ambiguous-rowid-error
dan [Tue, 19 Mar 2024 14:55:49 +0000 (14:55 +0000)] 
Return the error "ambiguous column name: rowid", instead of "no such column: rowid", when a "rowid" reference is ambiguous.

FossilOrigin-Name: 021f34fcfed41b607be8169bbda59aef93f130108d944f4741b46e8e345b2bbb

15 months agoFix the fuzzinvariants.c test module so that it does not generate
drh [Tue, 19 Mar 2024 14:38:39 +0000 (14:38 +0000)] 
Fix the fuzzinvariants.c test module so that it does not generate
invariants that depend on rowid when SQLITE_ALLOW_ROWID_IN_VIEW is used,
since rowid values can be unreliable in that context.

FossilOrigin-Name: 0d711aaaa14472a82f8893e1b07d845073f3d018bd5b8093ec0b00ffbbc8cd5a

15 months agoImprovements to the first check-in on this branch, causing less collateral
drh [Tue, 19 Mar 2024 14:21:26 +0000 (14:21 +0000)] 
Improvements to the first check-in on this branch, causing less collateral
damage.

FossilOrigin-Name: 7bc882897b6910f93695ad372445df7791b096412089ccbcd4fde365c62fa074

15 months agoOn second thought, change SQLITE_TESTCTRL_ROWID_IN_VIEW into a start-time
drh [Tue, 19 Mar 2024 13:55:10 +0000 (13:55 +0000)] 
On second thought, change SQLITE_TESTCTRL_ROWID_IN_VIEW into a start-time
option SQLITE_CONFIG_NO_ROWID_IN_VIEW.

FossilOrigin-Name: b8e045c9e1d098d116f8745704b10ed76569d4b063c0b81cce16bc136930755d

15 months agoWhen compiled with SQLITE_ALLOW_ROWID_IN_VIEW, rowid-in-view is on by default
drh [Tue, 19 Mar 2024 13:31:54 +0000 (13:31 +0000)] 
When compiled with SQLITE_ALLOW_ROWID_IN_VIEW, rowid-in-view is on by default
but can now be turned off using SQLITE_TESTCTRL_ROWID_IN_VIEW.  Without the
compile-time option, rowid-in-view is always off.

FossilOrigin-Name: 8a6196ab29052071be753c5c77ac945c2d62ecc8019c6160f954eafe34ab05a8

15 months agoAdjustments to the test cases for the previous check-in to make them
drh [Tue, 19 Mar 2024 10:41:18 +0000 (10:41 +0000)] 
Adjustments to the test cases for the previous check-in to make them
cross-platform Linux/Mac/Windows.  Test chance only.  No change to core code.

FossilOrigin-Name: 0dddadbd5b217a48bb5c1b0568a03fbafb89dba98c577727bf4f79ff7e0ca849

15 months agoFix another problem from [c63e26e705f5e967] involving infinities and the
drh [Tue, 19 Mar 2024 10:16:17 +0000 (10:16 +0000)] 
Fix another problem from [c63e26e705f5e967] involving infinities and the
Kahan-Babushka-Neumaier summation algorithm.  Problem reported by
[forum:/forumpost/23b8688ef4|forum post 23b8688ef4].

FossilOrigin-Name: 45d272ef38d5ee6189f81369aefb8e3ac35868a67687012d93c84f2bbc42520a

15 months agoFirst steps toward getting -DSQLITE_ALLOW_ROWID_IN_VIEW to work again. That
drh [Tue, 19 Mar 2024 02:30:24 +0000 (02:30 +0000)] 
First steps toward getting -DSQLITE_ALLOW_ROWID_IN_VIEW to work again.  That
compile-time option is untested, undocumented, and unsupported.  But it was
mentioned in the release notes for version 3.36.0, so I think that means we
need to support it forever.

FossilOrigin-Name: 7c46ff640247584f1ea260c062de29a0e49f649d1894a526574c1a479006a1fc

15 months agoFix asan problems in sqlite3rbu.c. Enable RBU for sanitizer release tests.
dan [Mon, 18 Mar 2024 21:08:33 +0000 (21:08 +0000)] 
Fix asan problems in sqlite3rbu.c. Enable RBU for sanitizer release tests.

FossilOrigin-Name: ad2ae7717e7a10cf42aeabd3c544e7884fa082295c2babf0fdb19a684d2aba1e

15 months agoAvoid spurious SQLITE_IOERR_DATA errors when reading partial pages from a cksumvfs...
dan [Mon, 18 Mar 2024 20:52:45 +0000 (20:52 +0000)] 
Avoid spurious SQLITE_IOERR_DATA errors when reading partial pages from a cksumvfs database using a SQLITE_DIRECT_OVERFLOW_READ build.

FossilOrigin-Name: 0f485dbece9146eabe5a5c0998a9e35c685a170c3fe6d4509e92aa8dae18a2c0

15 months agoRemove unnecessary blank lines from build commands in the default Makefile.in.
drh [Mon, 18 Mar 2024 18:03:17 +0000 (18:03 +0000)] 
Remove unnecessary blank lines from build commands in the default Makefile.in.

FossilOrigin-Name: 76fb3a908f45230b956cb659c754e47603e80aa72a2aad50d479437a9c013f61

15 months agoAdd the "VALUES-as-coroutine" optimization. Large VALUES clauses on an
drh [Mon, 18 Mar 2024 18:00:17 +0000 (18:00 +0000)] 
Add the "VALUES-as-coroutine" optimization.  Large VALUES clauses on an
INSERT, for example, prepare and run in about half the time and with half
the memory.  This check-in also includes enhancements to the internal
sqlite3ExprIsConstant() routine to recognize pure SQL functions as constant
if they have constant arguments.

FossilOrigin-Name: a120c9235f125e05be494038c16a9dd326fd79837698bef17e7879cd0cd75831

15 months agoFix harmless compiler (scan-build) warnings. exp-values-clause2
drh [Mon, 18 Mar 2024 17:13:52 +0000 (17:13 +0000)] 
Fix harmless compiler (scan-build) warnings.

FossilOrigin-Name: c86f9f2a15ffc726b7f0d9bba5a8c4dfdaeea6a297e0b591c554fff3d1fe6e1c

15 months agoAllow the VALUES-as-coroutine optimization to be applied to later rows of
drh [Mon, 18 Mar 2024 16:30:00 +0000 (16:30 +0000)] 
Allow the VALUES-as-coroutine optimization to be applied to later rows of
a VALUES clause even if earlier rows do not qualify.

FossilOrigin-Name: 9a47ea7f0f675f7bf4710901487ce34c7689e618cd1d8b9f94f0ff7ebc3f2841

15 months agoChange a test case to use a window function rather than random() to disable
drh [Mon, 18 Mar 2024 15:10:00 +0000 (15:10 +0000)] 
Change a test case to use a window function rather than random() to disable
the VALUES clause optimization.

FossilOrigin-Name: c589149a138fa0a6be3153986fc0f315e052e13ebc0e7006b6529ca02bae413b

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 agoNew options for testrunner.tcl: --stop-on-error and --stop-on-coredump.
drh [Fri, 15 Mar 2024 17:57:58 +0000 (17:57 +0000)] 
New options for testrunner.tcl:  --stop-on-error and --stop-on-coredump.

FossilOrigin-Name: 82035b9cfd28ef6b0ecc6f469f03d2b001189aa4925147cdb784b6b1964eb3b2

15 months agoFix (totally harmless) memory leaks in Lemon to avoid warnings during ASAN
drh [Fri, 15 Mar 2024 17:04:55 +0000 (17:04 +0000)] 
Fix (totally harmless) memory leaks in Lemon to avoid warnings during ASAN
builds.

FossilOrigin-Name: ce009205a8edc02b7d45ac01bd0e692c3d2c3ffeadb68e4f1bad20c39075e692

15 months agoTweaks to the func4.test test module (which tests the rarely used totype.c
drh [Fri, 15 Mar 2024 13:16:13 +0000 (13:16 +0000)] 
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

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 agoJS: remove an unused function argument and some debug-related comments. No functional...
stephan [Thu, 14 Mar 2024 13:18:19 +0000 (13:18 +0000)] 
JS: remove an unused function argument and some debug-related comments. No functional changes.

FossilOrigin-Name: f15709430d4ba2fcf5729bc30a45dacb77102927b82cda12de0b67935b526cc0

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 agoMinor change to the "mdevtest" and "sdevtest" in testrunner.tcl, to make it
drh [Wed, 13 Mar 2024 16:32:05 +0000 (16:32 +0000)] 
Minor change to the "mdevtest" and "sdevtest" in testrunner.tcl, to make it
easier to add configurations in branches.

FossilOrigin-Name: 9349d94e05dcf266b02afcd89f1e433cdc45f23e8536b2f3f9aa242d5d89c307

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

15 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

15 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

15 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

15 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

15 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

15 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

15 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