]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 years agoBe careful to maintain the value of 'txn' as long as there are active does-not-work
drh [Wed, 8 Feb 2023 19:45:11 +0000 (19:45 +0000)] 
Be careful to maintain the value of 'txn' as long as there are active
statements.

FossilOrigin-Name: 98d10cb52add1439f67d353e499fcc8ffddf8c5c7be51b765042e7d75a29c310

2 years agoAlways use 64-bit integers for stats associated with STAT1 and STAT4.
drh [Wed, 8 Feb 2023 17:28:42 +0000 (17:28 +0000)] 
Always use 64-bit integers for stats associated with STAT1 and STAT4.

FossilOrigin-Name: 6647d1cb8b53102c8114b1f3e34173d907504d78aa3140eab53f88027a36660b

2 years agoBetter fix the problem where optimizing an fts5 table too often causes it to become...
dan [Wed, 8 Feb 2023 17:28:08 +0000 (17:28 +0000)] 
Better fix the problem where optimizing an fts5 table too often causes it to become unreadable (first attempt was [35bed981]).

FossilOrigin-Name: 459d986d38fc0ccbfd66801e0f22900cfed831268cf59ac8d1cd1e556f0d1441

2 years agoCause gcc warning suppression in shell.c to be nice in other project(s).
larrybr [Wed, 8 Feb 2023 14:49:52 +0000 (14:49 +0000)] 
Cause gcc warning suppression in shell.c to be nice in other project(s).

FossilOrigin-Name: 6b41ba2e996ab7b9c3943ab93a19748db5cf37792f5d59d20eec301085282355

2 years agoUpdate an assert() in the stat4 code that is only true for a well-formed database.
dan [Wed, 8 Feb 2023 14:25:00 +0000 (14:25 +0000)] 
Update an assert() in the stat4 code that is only true for a well-formed database.

FossilOrigin-Name: 04439f3b23b22a3c187637f286764568ee922227e3e34b2e63075876b4d1f2ac

2 years agoFix an incorrect assert() in STAT4 logic added just a few days ago on
drh [Wed, 8 Feb 2023 14:17:34 +0000 (14:17 +0000)] 
Fix an incorrect assert() in STAT4 logic added just a few days ago on
[2023-02-01|/info/55a26c67ed4a3a93].

FossilOrigin-Name: 168fa2fb22b8c1ad80c7001a429d3a80b48acfbfebb5414a0caa76964ea647c3

2 years agoAdd the 'txn' date/time format. Change CURRENT_TIMESTAMP and similar to use
drh [Wed, 8 Feb 2023 12:47:37 +0000 (12:47 +0000)] 
Add the 'txn' date/time format.  Change CURRENT_TIMESTAMP and similar to use
'tnx'-style semantics instead of 'now'-style.

FossilOrigin-Name: 61cc8ed8d3541eddf23a9d542179c3f0223c5b8519b54d3be79988a376e25a89

2 years agoTest cases to show that CURRENT_TIMESTAMP and similar hold the same value txn-date
drh [Wed, 8 Feb 2023 12:31:47 +0000 (12:31 +0000)] 
Test cases to show that CURRENT_TIMESTAMP and similar hold the same value
across a transaction.

FossilOrigin-Name: 7b2fa20e31b8a0314b9ccb97bb556898d552505dbc5943f248df3f86c0f4e008

2 years agoRevert the behavior of date/time functions with no arguments so that they
drh [Wed, 8 Feb 2023 12:01:48 +0000 (12:01 +0000)] 
Revert the behavior of date/time functions with no arguments so that they
once again work like 'now', even while CURRENT_TIMESTAMP and similar work
like 'txn'.

FossilOrigin-Name: 06180caff0f5d8aba83b9f7be682ccdd6cb2ffc228b557ee6c1fd00fe5c23e92

2 years agoChange the behavior of date-time functions without any arguments (and thus
drh [Wed, 8 Feb 2023 11:34:05 +0000 (11:34 +0000)] 
Change the behavior of date-time functions without any arguments (and thus
the CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP variables) so that they
work like 'txn' instead of like 'now'.  This is an incompatibility with legacy,
but brings SQLite into conformance with all other SQL systems.

FossilOrigin-Name: 1ac78be54502779236645eac35b962797f2fb98307d059d2aa19658c4fa74cb7

2 years agoMerge wasi-patches branch into trunk.
stephan [Wed, 8 Feb 2023 08:49:52 +0000 (08:49 +0000)] 
Merge wasi-patches branch into trunk.

FossilOrigin-Name: 9902e66a37d59c1909593bbc296091df3fa3bfa12ec7062bd84e458030f77c8d

2 years agoSimplify the code and add test cases.
drh [Tue, 7 Feb 2023 23:55:59 +0000 (23:55 +0000)] 
Simplify the code and add test cases.

FossilOrigin-Name: d3bed4caff561e71c396cc869c5b4d9bf216ba203485e738c12ec62741f1aba5

2 years agoAdd support for the 'txn' argument to date/time functions that works like
drh [Tue, 7 Feb 2023 21:55:14 +0000 (21:55 +0000)] 
Add support for the 'txn' argument to date/time functions that works like
'now' but keeps the same time for the entire transaction.

FossilOrigin-Name: 5e4f45af96247e29910403a63ac148cb313b005f9c014b37a9a49d98f5fef9a6

2 years agoFix a test script problem causing "make test" to fail for non-RBU builds.
dan [Tue, 7 Feb 2023 18:41:23 +0000 (18:41 +0000)] 
Fix a test script problem causing "make test" to fail for non-RBU builds.

FossilOrigin-Name: 2abc3f9de0d2b66342598ab9015e62568ed20c7da4744a0f0a76b1db72c7e941

2 years agoFix a typo in example documentation code for sqlite3_vtab_in_next().
drh [Tue, 7 Feb 2023 16:58:58 +0000 (16:58 +0000)] 
Fix a typo in example documentation code for sqlite3_vtab_in_next().

FossilOrigin-Name: a95dbfae6133cc7aac950c3e7ba55a29d80b1625c39479a7d1d10b0868ee2be4

2 years agoMerge trunk into wasi-patches branch. wasi-patches
stephan [Mon, 6 Feb 2023 22:25:18 +0000 (22:25 +0000)] 
Merge trunk into wasi-patches branch.

FossilOrigin-Name: 656d36f50f630da68262469087bad1ac71b10325e233a7963103c8cbc232f61a

2 years agoRoll back part of [c54f29d8] which attempted to use symbols which that worker does...
stephan [Mon, 6 Feb 2023 21:20:59 +0000 (21:20 +0000)] 
Roll back part of [c54f29d8] which attempted to use symbols which that worker does not have access to.

FossilOrigin-Name: 90b12211376eb445df7221b3d3593394ff651ef93f4218492c6208bc74b8fc63

2 years agoFix RBU test scripts to avoid attempting to copy or delete a locked file.
dan [Mon, 6 Feb 2023 19:00:54 +0000 (19:00 +0000)] 
Fix RBU test scripts to avoid attempting to copy or delete a locked file.

FossilOrigin-Name: f25eb898fce44120136f8ee5557305f43541e8a75323cfc3becf103f3fa795aa

2 years agoOmit the obsolete client/server test cases.
drh [Mon, 6 Feb 2023 16:23:52 +0000 (16:23 +0000)] 
Omit the obsolete client/server test cases.

FossilOrigin-Name: 5dde07a91dcf99b9c9a418b4e2178f66eef4cffd4799538a419674314a7530f9

2 years agoFix the build after the previous change test-cleanup
drh [Mon, 6 Feb 2023 15:49:54 +0000 (15:49 +0000)] 
Fix the build after the previous change

FossilOrigin-Name: aea3b6f6515bc3b7e7205b7d17d99cb1fc68030eb929d8adbe25f065668c9c95

2 years agoRemove the long obsolete "client/server" mode tests.
drh [Mon, 6 Feb 2023 15:46:34 +0000 (15:46 +0000)] 
Remove the long obsolete "client/server" mode tests.

FossilOrigin-Name: 08e3114caec0633fc54f8febb7f4732b46a1f47508bbca0a6a2bff02591254d5

2 years agoUpdate test scripts speed1.test and speed1p.test so they may be run by testrunner...
dan [Mon, 6 Feb 2023 15:46:01 +0000 (15:46 +0000)] 
Update test scripts speed1.test and speed1p.test so they may be run by testrunner.tcl.

FossilOrigin-Name: e761d4b9c8dcacccc927d23f20fdf779a0ae5304281b5bd6aa998bade56f0a37

2 years agoShorten the status line for testrunner.tcl so that it fits on an 80-character
drh [Mon, 6 Feb 2023 14:48:02 +0000 (14:48 +0000)] 
Shorten the status line for testrunner.tcl so that it fits on an 80-character
terminal.

FossilOrigin-Name: b760a7307c453d95cf3b302c9867c84a9c899956c16c2ce1ea6cce8f025db425

2 years agoFix error in the releasetest makefile target from the previous check-in.
drh [Mon, 6 Feb 2023 14:16:15 +0000 (14:16 +0000)] 
Fix error in the releasetest makefile target from the previous check-in.

FossilOrigin-Name: e7fe287d7904166c05d31b96ec8fd6f09318869c57437d1c661db7b79e6d8bf2

2 years agoUpdate "releasetest" makefile targets to use testrunner.tcl.
drh [Mon, 6 Feb 2023 14:11:18 +0000 (14:11 +0000)] 
Update "releasetest" makefile targets to use testrunner.tcl.

FossilOrigin-Name: 1b95676b05701952cab7087f528028c48302f611fe63799551dc45098354d27f

2 years agoAdd capability to override the JS's use of console.log/debug/warn/error() with client...
stephan [Mon, 6 Feb 2023 14:01:19 +0000 (14:01 +0000)] 
Add capability to override the JS's use of console.log/debug/warn/error() with client-provided versions via the bootstrap-time config object.

FossilOrigin-Name: c54f29d8e55419eaa9168e799dab5030e89063b13d8390a50616606422d164dc

2 years agoFix a formatting problem in scanstatus2.test introduced by [81c118d9].
dan [Mon, 6 Feb 2023 13:36:34 +0000 (13:36 +0000)] 
Fix a formatting problem in scanstatus2.test introduced by [81c118d9].

FossilOrigin-Name: 928ab40edbf11c02b3f03e660051d9587243002b9220adc77f972c3758c12b19

2 years agoAdd the --fuzztest option to testrunner.tcl. Also, have it print whitespace over...
dan [Mon, 6 Feb 2023 11:43:22 +0000 (11:43 +0000)] 
Add the --fuzztest option to testrunner.tcl. Also, have it print whitespace over the top of the old report line before writing the new.

FossilOrigin-Name: d83ce01fe1f21edcc93ad4c6308026156f235bab75e16e15389e27ad388fb274

2 years agoFix problems with test scripts preventing them from running with SQLITE_DEFAULT_MEMST...
dan [Mon, 6 Feb 2023 11:02:31 +0000 (11:02 +0000)] 
Fix problems with test scripts preventing them from running with SQLITE_DEFAULT_MEMSTATUS=0 builds. Or builds without SQLITE_ENABLE_STAT4.

FossilOrigin-Name: c0fbc89ed26b6eb361c1a05e2fb0d78d101fe2daf2947bbe5e0e58e0c2a779a2

2 years agoFix some test scripts that were failing with SQLITE_OMIT_VIRTUALTABLE builds.
dan [Mon, 6 Feb 2023 10:47:57 +0000 (10:47 +0000)] 
Fix some test scripts that were failing with SQLITE_OMIT_VIRTUALTABLE builds.

FossilOrigin-Name: 81c118d90b281b30f40b3eeefaeb2c8350aa40080b4fe7de8f21d263986c6acb

2 years agoDo not use a Bloom filter if any outer loop lacks STAT1 data, since without
drh [Sun, 5 Feb 2023 20:29:10 +0000 (20:29 +0000)] 
Do not use a Bloom filter if any outer loop lacks STAT1 data, since without
STAT1 data, the query planner cannot make an accurate determination of
whether or not a Bloom filter will be useful.  This fixes the problem
reported by [forum:/forumpost/56de336385|forum post 56de336385].

FossilOrigin-Name: e6ab96bd0b9efc51fd703bf7e92b079943ad9a3b92183d434adc11fb7d238afb

2 years agoAdd the "devtest" makefile target that runs both fuzztest and testrunner.
drh [Sun, 5 Feb 2023 17:40:03 +0000 (17:40 +0000)] 
Add the "devtest" makefile target that runs both fuzztest and testrunner.

FossilOrigin-Name: c81398c6215d6d1bc7a15b6be9bb1f81effd430ff0a7c86158372accfa77814c

2 years agoIn fuzzcheck, only show the description of each database if the -v option
drh [Sun, 5 Feb 2023 17:09:18 +0000 (17:09 +0000)] 
In fuzzcheck, only show the description of each database if the -v option
is specified.

FossilOrigin-Name: 6a58179aaffa77a5542ab620ffce6f68135e399de957b1a97113fd2f1dc0c098

2 years agoRestore a test for pBt NULL that was removed by [12a14711afa6cddb] but turned
drh [Sun, 5 Feb 2023 00:47:27 +0000 (00:47 +0000)] 
Restore a test for pBt NULL that was removed by [12a14711afa6cddb] but turned
out to be necessary, as dbsqlfuzz quickly showed us.  Test case added to TH3.

FossilOrigin-Name: 647c89dd2f90da1605e6fc01ecc8c1367c12c06b3a972ed682a69e85bf1d77e9

2 years agoModify the status line output from testrunner so that each line overwrites
drh [Sun, 5 Feb 2023 00:32:32 +0000 (00:32 +0000)] 
Modify the status line output from testrunner so that each line overwrites
the previous rather than scrolling.

FossilOrigin-Name: ad4d28cd68589a9259069c77c8d375ae49cfd0bcdf3b03d3e84418569e12ebfc

2 years agoChanges to the sqlite_dbpage virtual table to tag or remove unreachable
drh [Sun, 5 Feb 2023 00:24:42 +0000 (00:24 +0000)] 
Changes to the sqlite_dbpage virtual table to tag or remove unreachable
branches.

FossilOrigin-Name: 12a14711afa6cddbf64d5307fd239fc597027d4356a431ad75836025f4bad83c

2 years agoAvoid running rbu tests under permutation "journaltest", which does not support wal...
dan [Sat, 4 Feb 2023 21:25:17 +0000 (21:25 +0000)] 
Avoid running rbu tests under permutation "journaltest", which does not support wal. Fix some other test script problems.

FossilOrigin-Name: 92f018698a87ed32acc31d83f7246dbb7295867bd6a801b7984a16f97a5c7786

2 years agoAdd ALWAYS() and NEVER() macros to unreachable branchs in sqlite_dbpage.
drh [Sat, 4 Feb 2023 20:53:31 +0000 (20:53 +0000)] 
Add ALWAYS() and NEVER() macros to unreachable branchs in sqlite_dbpage.

FossilOrigin-Name: db875cd6be3b6e0032325cf42e6846eb41a7f099eb4561baf402d914446b052d

2 years agoRemove an ALWAYS() that can be false in some very rare cases.
drh [Sat, 4 Feb 2023 20:07:52 +0000 (20:07 +0000)] 
Remove an ALWAYS() that can be false in some very rare cases.
dbsqlfuzz 2274a23c85a93b870f7eb12fe686073da01abc33

FossilOrigin-Name: a4eb0b0d837291590958a5f292f41e80e0f722668a060aebfed5ea36ea176332

2 years agoUpdates to the testrunner.tcl script so that uses a separate sub-process for each...
dan [Sat, 4 Feb 2023 19:01:17 +0000 (19:01 +0000)] 
Updates to the testrunner.tcl script so that uses a separate sub-process for each test. And so that it runs the release test procedure currently handled by wapptest.tcl.

FossilOrigin-Name: 4c3c587500ac5a3758008f0acb9432bd3bc6f0f31bacd5615f46280e55842982

2 years agoChanges so that wapptest.tcl still works.
dan [Sat, 4 Feb 2023 18:58:51 +0000 (18:58 +0000)] 
Changes so that wapptest.tcl still works.

FossilOrigin-Name: 7624de3a93e03e9e825b1a283ccde8ad3aa41f93dd5c7f63692620a5177cbda9

2 years agoUpdate testrunner.tcl usage message.
dan [Sat, 4 Feb 2023 18:50:16 +0000 (18:50 +0000)] 
Update testrunner.tcl usage message.

FossilOrigin-Name: b7c246bc3f462098f6281ee2cd2e4e870b6d6481263d277f04956596a4764558

2 years agoAdd testrunner.tcl "njob" and "status" commands.
dan [Sat, 4 Feb 2023 18:47:59 +0000 (18:47 +0000)] 
Add testrunner.tcl "njob" and "status" commands.

FossilOrigin-Name: 3869cd3d306ed68ec6e118aa10b4e835f2bab1294039888d88a30b3cfcf1d7be

2 years agoBetter error message when trying to do an INSERT on an sqlite_dbpage virtual
drh [Sat, 4 Feb 2023 14:23:26 +0000 (14:23 +0000)] 
Better error message when trying to do an INSERT on an sqlite_dbpage virtual
table.

FossilOrigin-Name: a98e4908dabc8f45f7859a26bd1d0c04de34ec68c1367c2cdd9b0242e08b938f

2 years agoFixes for testrunner.tcl on windows.
dan [Fri, 3 Feb 2023 21:18:58 +0000 (21:18 +0000)] 
Fixes for testrunner.tcl on windows.

FossilOrigin-Name: b98e19fc41cb7f89ae9e063b8af414bc01d14833a14de5d646069483ef0127b2

2 years agoFix a problem where optimizing an fts5 table too often might cause it to become unrea...
dan [Fri, 3 Feb 2023 19:28:50 +0000 (19:28 +0000)] 
Fix a problem where optimizing an fts5 table too often might cause it to become unreadable.

FossilOrigin-Name: 35bed981416269018a0d52171d9997c43d3b097f5db1910d10d882eabe2e137f

2 years agoHave testrunner.tcl run various builds as part of the 'release' command.
dan [Fri, 3 Feb 2023 18:47:00 +0000 (18:47 +0000)] 
Have testrunner.tcl run various builds as part of the 'release' command.

FossilOrigin-Name: ba2fae30a81e2574f13a7351c9f843b8c2c7d2c93fcd71fb2de98f5b34f3e109

2 years agoAttempt to fix harmless compiler warnings that reportedly appear in clang 15.
drh [Fri, 3 Feb 2023 14:57:40 +0000 (14:57 +0000)] 
Attempt to fix harmless compiler warnings that reportedly appear in clang 15.

FossilOrigin-Name: c045d76b908a8c90d22511df7884e78d452b250db9ba70d4cb0935048a3c3ac4

2 years agoImproved detection of invalid command-line arguments to the showdb and
drh [Fri, 3 Feb 2023 12:03:56 +0000 (12:03 +0000)] 
Improved detection of invalid command-line arguments to the showdb and
showwal debugging utility programs.

FossilOrigin-Name: 75cdaafc77b8a1efc84e71e90470994227f376e7d7de34c813e75dcadbb9f268

2 years agoAvoid using Tcl command [clock] in testrunner.tcl.
dan [Fri, 3 Feb 2023 11:32:51 +0000 (11:32 +0000)] 
Avoid using Tcl command [clock] in testrunner.tcl.

FossilOrigin-Name: b2faf9289f6fbbcd4491e1b063da731b35aeed9ff1fc97f64798e99cac847b4a

2 years agoDo not run test script pendingrace.test as part of the inmemory_journal permutation.
dan [Thu, 2 Feb 2023 20:15:42 +0000 (20:15 +0000)] 
Do not run test script pendingrace.test as part of the inmemory_journal permutation.

FossilOrigin-Name: 69d934a1bfad86f3f60dab146db539645f5735f1bdb07dfe3a3d88828a03390b

2 years agoAdd configuration data for osx and windows to testrunner_data.tcl
dan [Thu, 2 Feb 2023 19:41:43 +0000 (19:41 +0000)] 
Add configuration data for osx and windows to testrunner_data.tcl

FossilOrigin-Name: e45d34656a110f85671d8b5d33f0d6d807fd64dfef5777fefba22ac6836f0e86

2 years agoImproved and simplified logic for resolving the various aliases of the schema
drh [Thu, 2 Feb 2023 16:30:32 +0000 (16:30 +0000)] 
Improved and simplified logic for resolving the various aliases of the schema
table.

FossilOrigin-Name: 5c19491c36b9e2128430e4f153bdef48c3f7b6541d44f36044e8fc2921ecc830

2 years agoResolve all possible aliases and variations of the schema table names.
drh [Thu, 2 Feb 2023 15:28:40 +0000 (15:28 +0000)] 
Resolve all possible aliases and variations of the schema table names.

FossilOrigin-Name: e7a0112b235d97cb68c92b967bf2218b90258c243ec2b638aaac142392873126

2 years agoRemove automatic installation of JS-global S object for the sake of client libraries...
stephan [Thu, 2 Feb 2023 06:17:22 +0000 (06:17 +0000)] 
Remove automatic installation of JS-global S object for the sake of client libraries which embed this library, per [forum:9d4f722c6912799d|request in the forum].

FossilOrigin-Name: 9504f68af8360ea6d61574fd4b9811af34b721c12d9653eb50adcf0f12b129fc

2 years agoAdjustments of assert() statement in STAT4 in order to give 100% MC/DC.
drh [Wed, 1 Feb 2023 23:24:34 +0000 (23:24 +0000)] 
Adjustments of assert() statement in STAT4 in order to give 100% MC/DC.

FossilOrigin-Name: 55a26c67ed4a3a937e009f60da2cd951d6f090b0bea748037db5c1680e5ff3b4

2 years agoNew assert() statements to verify that sqlite3DeleteIndexSamples() is always
drh [Wed, 1 Feb 2023 20:45:12 +0000 (20:45 +0000)] 
New assert() statements to verify that sqlite3DeleteIndexSamples() is always
called with non-NULL parameters.

FossilOrigin-Name: 92c71fdd7167a7db055ef0aec522bbba8c7b4b37658efda10dac44699921b57f

2 years agoUpdate testrunner.tcl to use a separate process for each test script. And to run...
dan [Wed, 1 Feb 2023 20:14:59 +0000 (20:14 +0000)] 
Update testrunner.tcl to use a separate process for each test script. And to run some extra tests too.

FossilOrigin-Name: d090948a69a9c4b86693bd3caedba3d7e5883e4b2ad1f2d4bf7ae14c105ddea7

2 years agoJust because a CTE is used more than once, does not mean it should be
drh [Wed, 1 Feb 2023 15:41:07 +0000 (15:41 +0000)] 
Just because a CTE is used more than once, does not mean it should be
tagged with M10d_Yes and thereby prohibited from participating in the
query flattening optimization.  See
[forum:/forumpost/1d571c02963355ed|forum thread 1d571c02963].

FossilOrigin-Name: 66f29c403d28630bfaea9124bd63ee4a047b1fe4a7e27dc5d10d67d1601b15e0

2 years agoFix a comment related to PENDING locks in os_unix.c. No code changes.
dan [Wed, 1 Feb 2023 14:17:25 +0000 (14:17 +0000)] 
Fix a comment related to PENDING locks in os_unix.c. No code changes.

FossilOrigin-Name: 6b3546c871fe78a4e550e0144b48ac98325787cc8b192a9e7f5f2a2ffa57f76d

2 years agoFix a race condition during hot-journal rollback on unix that could theoretically...
dan [Tue, 31 Jan 2023 20:43:21 +0000 (20:43 +0000)] 
Fix a race condition during hot-journal rollback on unix that could theoretically cause spurious corruption errors.

FossilOrigin-Name: e365dca4e5775b4897118c8937a1063282d7a1ecc2604529256b0a6b8a3510ba

2 years agoFix a race condition during hot-journal rollback that could theoretically cause spuri... pending-lock-race
dan [Tue, 31 Jan 2023 20:21:06 +0000 (20:21 +0000)] 
Fix a race condition during hot-journal rollback that could theoretically cause spurious corruption errors.

FossilOrigin-Name: 20ea53ddf590a9dd19501fabd2bfdb9c10b5eb265cd2995bdb335769c936c763

2 years agoAdditional tweaks to the enhancement at [609fbb94b8f01d67] to further reduce
drh [Mon, 30 Jan 2023 20:44:54 +0000 (20:44 +0000)] 
Additional tweaks to the enhancement at [609fbb94b8f01d67] to further reduce
the cost estimate for constructing an automatic index on an ephemeral table,
in order to resolve the performance problem described by
[forum:/forumpost/1d571c0296|forum post 1d571c0296].

FossilOrigin-Name: bf1aae7a8c7f2c74681aa29baa35259d10ce6a1737d2607def6bf27fed592131

2 years agoTwo JS file renames which got inadvertently undone while setting up [9062b31174618c0e...
stephan [Sun, 29 Jan 2023 06:01:32 +0000 (06:01 +0000)] 
Two JS file renames which got inadvertently undone while setting up [9062b31174618c0e]. Cosmetic cleanups in ext/wasm/dist.make.

FossilOrigin-Name: 0c2fde767f77d6204e95737edd573f42d72e956a3c20ea7e4daeff906657bbe5

2 years agoCorrect the handling of the worker1 and promiser JS files in the face of the bundler...
stephan [Sun, 29 Jan 2023 05:09:39 +0000 (05:09 +0000)] 
Correct the handling of the worker1 and promiser JS files in the face of the bundler-friendly changes. Those files require separate, bundler-friendly copies.

FossilOrigin-Name: 9062b31174618c0e67e86441e14eac420c734a0cc321f7eebc7d89ff8a449c10

2 years agoDo not assume that sub-queries that contain window functions are uncorrelated.
dan [Sat, 28 Jan 2023 21:06:15 +0000 (21:06 +0000)] 
Do not assume that sub-queries that contain window functions are uncorrelated.

FossilOrigin-Name: f27804484df57de76be9dbd1a9e5869916617684ee407101c978df7da30b34ac

2 years agoShow more details about the SrcItem.fg field in tree-trace output.
drh [Sat, 28 Jan 2023 21:01:33 +0000 (21:01 +0000)] 
Show more details about the SrcItem.fg field in tree-trace output.

FossilOrigin-Name: 3d05dddd0bc826a73a8cecd6b116168082fb46b6e4868d03438c0a5a546d2f97

2 years agoFix a problem causing "PRAGMA quick_check" to return spurious corruption errors for...
dan [Sat, 28 Jan 2023 17:37:37 +0000 (17:37 +0000)] 
Fix a problem causing "PRAGMA quick_check" to return spurious corruption errors for a WITHOUT ROWID for which all columns are either virtual or part of the primary key, and for which the order of the columns in the primary key definition is different from the order in the table.

FossilOrigin-Name: a7530f897127f35a212db6557edbcbbb286cc0e094754c1c1b74ce8dbf724470

2 years agoUpdate sqllimits1.test to account for the fact that if an odd value is specified...
dan [Sat, 28 Jan 2023 16:37:30 +0000 (16:37 +0000)] 
Update sqllimits1.test to account for the fact that if an odd value is specified as the length in bytes of a utf-16 string, it is truncated to the largest smaller even number.

FossilOrigin-Name: 74508470c4caff04638e750cd84073f3137b8a9f72c6fe390a279da7b1c13398

2 years agoMakefile doc touchups - no code/build changes.
stephan [Sat, 28 Jan 2023 09:51:41 +0000 (09:51 +0000)] 
Makefile doc touchups - no code/build changes.

FossilOrigin-Name: 3458a481b9ee391122dba531358d664d5219ce4a58cbce93d07df57cc64dc2c7

2 years agoOverhaul ext/wasm/GNUmakefile to consolidate what amounts to much copy/paste/slightly...
stephan [Sat, 28 Jan 2023 09:11:08 +0000 (09:11 +0000)] 
Overhaul ext/wasm/GNUmakefile to consolidate what amounts to much copy/paste/slightly-edit duplication into a single function, called once per distinctive build mode (vanilla, ESM, bundler-friendly).

FossilOrigin-Name: 168e5a93013d8650c180e19788e5f301b5d5ae8501d0ce728004fd750ca9e682

2 years agoEnhance oo1.DB.exec() to simplify returning whole result sets.
stephan [Sat, 28 Jan 2023 05:09:26 +0000 (05:09 +0000)] 
Enhance oo1.DB.exec() to simplify returning whole result sets.

FossilOrigin-Name: 7b168ee2af09f04b41a6ef4c14ccaddc0c9b0bfe9dc1e6a86d8f5317606bd78d

2 years agoAdd JS bundler-friendly JS build. Minor test code cleanups.
stephan [Sat, 28 Jan 2023 04:20:46 +0000 (04:20 +0000)] 
Add JS bundler-friendly JS build. Minor test code cleanups.

FossilOrigin-Name: 24d3a53dea5e596230558e233cbbd9d0288b4c394cd5ea7b650fd99bff4cde2e

2 years agoFix compiler warning in base85.c.
drh [Fri, 27 Jan 2023 23:10:10 +0000 (23:10 +0000)] 
Fix compiler warning in base85.c.

FossilOrigin-Name: bd9613fd63193bd6b33798d83f0ef21987ba468b53d13a25a31cb9e9e5f20562

2 years agoUpdate ext/wasm/README-dist.txt for the bundler-friendly build. js-bundler-friendly
stephan [Fri, 27 Jan 2023 20:25:39 +0000 (20:25 +0000)] 
Update ext/wasm/README-dist.txt for the bundler-friendly build.

FossilOrigin-Name: 6a5c4f6b19aa0704efe7f789102f757a1ed05d6542f37c7aa37a4439783944a3

2 years agoAdd an assert() to help static analyzers.
drh [Fri, 27 Jan 2023 20:15:48 +0000 (20:15 +0000)] 
Add an assert() to help static analyzers.

FossilOrigin-Name: e446c8b4aa2ffe075f9c289c771d62a414661c3ffe6abae5649c50af8e32fab6

2 years agoDo not try to run rbu tests with builds that do not support rbu.
dan [Fri, 27 Jan 2023 19:59:46 +0000 (19:59 +0000)] 
Do not try to run rbu tests with builds that do not support rbu.

FossilOrigin-Name: c74ad902e3bbfc28d6b30a37f3791176d64cdd8fd5950f1d1749541e244a0494

2 years agoAdd a feature idea note to DB.exec(), derived from a forum discussion.
stephan [Fri, 27 Jan 2023 19:56:40 +0000 (19:56 +0000)] 
Add a feature idea note to DB.exec(), derived from a forum discussion.

FossilOrigin-Name: 792f43209c4b6e85386b6b3906814b7f2ad310d50ba563b3fd1cb37e55adf8db

2 years agoCherrypick [3773934e91c20ca243] into trunk.
stephan [Fri, 27 Jan 2023 17:19:30 +0000 (17:19 +0000)] 
Cherrypick [3773934e91c20ca243] into trunk.

FossilOrigin-Name: 50cf4300a6a92302010fa4a7662db82bf55180a4930771f0d3c07e558bc87e7d

2 years agoExtract emcc version in JS build and use it to conditionally set build flags. Initial...
stephan [Fri, 27 Jan 2023 17:14:55 +0000 (17:14 +0000)] 
Extract emcc version in JS build and use it to conditionally set build flags. Initially a workaround for [https://github.com/emscripten-core/emscripten/issues/18610|Emscripten ticket #18610] but may have other uses.

FossilOrigin-Name: 3773934e91c20ca2433cc414aaba75de9a4a4318fd1126fb781dba510ddefd94

2 years agoWork around a JS null pointer deref which could be triggered from the dev console...
stephan [Fri, 27 Jan 2023 07:53:49 +0000 (07:53 +0000)] 
Work around a JS null pointer deref which could be triggered from the dev console, but not (it seems) from client-side code.

FossilOrigin-Name: eabb551b8b3d33fc3a327ecf7225436a3a3f616901e22c868fd76a5e3adc7b3f

2 years agoMerge trunk into wasi-patches branch.
stephan [Fri, 27 Jan 2023 05:37:24 +0000 (05:37 +0000)] 
Merge trunk into wasi-patches branch.

FossilOrigin-Name: 2ce89f5efcdb8b4c58eb2d30833a76d79ae0134c31d5ab8564be9e1cf5a1f4f0

2 years agoCherrypick [fa784101775b7|emscripten ticket #18609 workaround] into trunk.
stephan [Fri, 27 Jan 2023 05:17:10 +0000 (05:17 +0000)] 
Cherrypick [fa784101775b7|emscripten ticket #18609 workaround] into trunk.

FossilOrigin-Name: 9a26fae545b9c97129893b83ff97e62b1c477eccd1379af1dce4a3cc4fa9f932

2 years agoWork around upstream emscripten 3.1.31 bug [https://github.com/emscripten-core/emscri...
stephan [Fri, 27 Jan 2023 05:14:34 +0000 (05:14 +0000)] 
Work around upstream emscripten 3.1.31 bug [https://github.com/emscripten-core/emscripten/issues/18609].

FossilOrigin-Name: fa784101775b795077a23c211b5b16f51ad5a13967c284511f310dfcbfa9f77a

2 years agoMore work on creating a separate sqlite3.js build which is hopefully friendly to...
stephan [Fri, 27 Jan 2023 03:18:16 +0000 (03:18 +0000)] 
More work on creating a separate sqlite3.js build which is hopefully friendly to JS bundlers.

FossilOrigin-Name: b7b896fb448a7f46eb88eadadb1359255aec637a384cabcdd526276a02f4f0b4

2 years agoResolve a nested if-block bug in ext/wasm/c-pp.c which caused output after a nested...
stephan [Fri, 27 Jan 2023 02:21:16 +0000 (02:21 +0000)] 
Resolve a nested if-block bug in ext/wasm/c-pp.c which caused output after a nested block to be unduly elided. Remove a kludge, added in the previous check-in, which worked around that bug.

FossilOrigin-Name: 7a026a4b24d57c1b0970923b972dd42c3f1bb5b282f908079075468b2e1bf601

2 years agoBeginnings of a bundler-friendly build of sqlite3.mjs. Not yet ready for downstream...
stephan [Fri, 27 Jan 2023 01:33:12 +0000 (01:33 +0000)] 
Beginnings of a bundler-friendly build of sqlite3.mjs. Not yet ready for downstream testing.

FossilOrigin-Name: 4271bf5f41df091696f1dcfc4ffe7a60d24066fc75c896941e0b56de95fe5f89

2 years agoEnd-of-line whitespace cleanups and doc typo fixes. No code changes.
stephan [Thu, 26 Jan 2023 20:08:59 +0000 (20:08 +0000)] 
End-of-line whitespace cleanups and doc typo fixes. No code changes.

FossilOrigin-Name: bdfd72a083fadd724030c4c89adae71426e1ddd402c6bc5abf40801ecf3253cf

2 years agoHave some RBU tests run as part of veryquick.test/testrunner.tcl.
dan [Thu, 26 Jan 2023 18:16:51 +0000 (18:16 +0000)] 
Have some RBU tests run as part of veryquick.test/testrunner.tcl.

FossilOrigin-Name: f51406e3bf92f2b46f13d08fb7c7fe7683feba68b5a8fa18f6f6b8845662deac

2 years agoImproved fix to allow sqlite3_vtab_in_first() to reliably return SQLITE_ERROR.
drh [Thu, 26 Jan 2023 02:18:53 +0000 (02:18 +0000)] 
Improved fix to allow sqlite3_vtab_in_first() to reliably return SQLITE_ERROR.

FossilOrigin-Name: b25eec1c13f6a8c7ba993e5a55e26798f3b67a8b9571998459671cb570cbdfb4

2 years agoFix a harmless compiler warning in FTS3.
drh [Wed, 25 Jan 2023 21:28:30 +0000 (21:28 +0000)] 
Fix a harmless compiler warning in FTS3.

FossilOrigin-Name: 68d02d3c2ab1b4afff2d3a71516ceee404fad0d2b717369ad732832c4f9b19a8

2 years agoDefer calling the destructor for the user data on a module until after the
drh [Wed, 25 Jan 2023 19:05:04 +0000 (19:05 +0000)] 
Defer calling the destructor for the user data on a module until after the
module has disconnected.
[forum:/forumpost/b68391eb71fdff73|Forum post b68391eb71fdff73].

FossilOrigin-Name: 1ab122289fe6ac4cb3b0c47d17ac22627fcdfed80c941a57e6e6cc4d9dbd9273

2 years agoEnhance the sqlite3_vtab_in_first() and sqlite3_vtab_in_next() interfaces so
drh [Wed, 25 Jan 2023 16:56:24 +0000 (16:56 +0000)] 
Enhance the sqlite3_vtab_in_first() and sqlite3_vtab_in_next() interfaces so
that they reliably return SQLITE_ERROR (and not SQLITE_MISUSE) if they are
invoked on a parameter that did not have multi-value IN processing enabled
via a prior call to sqlite3_vtab_in().  See
[forum:/forumpost/a823d4a3d5f73def|forum thread a823d4a3d5f73def].

FossilOrigin-Name: 144326dc171025dc8b5a77bebd8de3c19d5244ab807f5aa41f95313a25b880bc

2 years agoFix a problem with fts3 auxiliary functions and one or more NEAR expressions ORed...
dan [Wed, 25 Jan 2023 15:45:45 +0000 (15:45 +0000)] 
Fix a problem with fts3 auxiliary functions and one or more NEAR expressions ORed together.

FossilOrigin-Name: de4690a10ad4631e7452ccbb05b177a821d9dda387a854d216a6c54c7a189ead

2 years agoFix another problem with fts3/4 auxiliary functions and NEAR expressions that consist...
dan [Wed, 25 Jan 2023 13:42:55 +0000 (13:42 +0000)] 
Fix another problem with fts3/4 auxiliary functions and NEAR expressions that consist entirely of deferred tokens.

FossilOrigin-Name: a8c91c132f6157b7e3649f57a799984b1d7f8a18fd434515c875617d4195db29

2 years agoAdd scalar SQL function unhex().
dan [Tue, 24 Jan 2023 20:17:43 +0000 (20:17 +0000)] 
Add scalar SQL function unhex().

FossilOrigin-Name: 890e9629a7480138c9c1d3acc2d1e7b3c05e0d156e5c5fba428bc1aeb790fbfb

2 years agoUpdate unhex() to allow a second argument, specifying a set of characters that are... unhex-function
dan [Tue, 24 Jan 2023 17:19:47 +0000 (17:19 +0000)] 
Update unhex() to allow a second argument, specifying a set of characters that are permitted to appear between pairs of hexadecimal digits.

FossilOrigin-Name: 66c8562690b19f17972589611810e1dccad3a48777acb05208289c1f77076f71

2 years agoFix a problem with using fts3 auxiliary functions with expressions like "E AND ....
dan [Tue, 24 Jan 2023 11:24:28 +0000 (11:24 +0000)] 
Fix a problem with using fts3 auxiliary functions with expressions like "E AND ...", where E is a NEAR expression that consists entirely of deferred tokens.

FossilOrigin-Name: 39bfae4c4698a13e07c4a0725f2790955e03b601fe64e17a000c691def1bdcb8

2 years agoSuppress a harmless compiler warning.
drh [Mon, 23 Jan 2023 21:41:41 +0000 (21:41 +0000)] 
Suppress a harmless compiler warning.
[forum:forumpost/e3f72e9291189925|Forum post e3f72e9291189925].  The code
was legal and correct. The revised code is actually less clear in its intent.
But at least now there will (hopefully) be no warning.

FossilOrigin-Name: 48bb7c88787bf5de1d70cf3cc81ada38c6c02e476dbdff12c8676c6d5ee19aed

2 years agoDue to a coding error, check-in [8efd61e8518594e3] did not actually use
drh [Mon, 23 Jan 2023 20:45:47 +0000 (20:45 +0000)] 
Due to a coding error, check-in [8efd61e8518594e3] did not actually use
just read transactions if the operation is read-only and the
SQLITE_MAX_ATTACHED macro is set to 31 or more.  This was due to a misuse
of the writeMask field of Parse, pointed out by
[forum:/forumpost/aa173c18d5|forum post aa173c18d5].

FossilOrigin-Name: 8760566893b64325874c7ec0aff8014026ce525e7fff1489027d2ce698495e76