]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
3 years agoAn attempt to get UPDATE FROM working when the FROM clause contains a update-from-right-join
drh [Wed, 25 May 2022 02:32:11 +0000 (02:32 +0000)] 
An attempt to get UPDATE FROM working when the FROM clause contains a
RIGHT or FULL JOIN.

FossilOrigin-Name: a124e4f96f883d8682ba7a253d33a9565ed0fc3580525225b95733bd3782a806

3 years agoWhen an ON clause on an INNER JOIN references a table to the right of
drh [Tue, 24 May 2022 16:05:41 +0000 (16:05 +0000)] 
When an ON clause on an INNER JOIN references a table to the right of
of the join, just convert the ON clause to an ordinary WHERE clause term,
in order to be compatible with older versions of SQLite.  See
[forum:/forumpost/687b0bf563a1d4f1|forum thread 687b0bf563a1d4f1] for details.

FossilOrigin-Name: 2b6ebba26d936ae7b9acf7d4bd15e82cbfabda22e1044b3dd838c7b07095100e

3 years agoMoUse re descriptive var names in ext/fiddle/Makefile.
stephan [Tue, 24 May 2022 14:45:16 +0000 (14:45 +0000)] 
MoUse re descriptive var names in ext/fiddle/Makefile.

FossilOrigin-Name: 2f9a42fb141d386f6edd03a37da3b0cef63dcc9fbfd076076b5330a8aa7d45a8

3 years agofiddle: lots of generic refactoring, restructuring, and cleanup in the higher-level...
stephan [Tue, 24 May 2022 14:36:45 +0000 (14:36 +0000)] 
fiddle: lots of generic refactoring, restructuring, and cleanup in the higher-level code. Added push-fiddle ext/fiddle/Makefile target to push the fiddle app to a remote server via rsync.

FossilOrigin-Name: ed19fef3459499abb0a4a010f368b4576d6e068d930c8480446ea677ac87c1c1

3 years agowasm/JS: minor doc updates, corrected bind()ing of the undefined value to behave...
stephan [Tue, 24 May 2022 01:15:21 +0000 (01:15 +0000)] 
wasm/JS: minor doc updates, corrected bind()ing of the undefined value to behave as documented, removed some superfluous code.

FossilOrigin-Name: 526c8c728019b317624a93f6f07840ca524bca84e7c03ce5e86e38953146236f

3 years agowasm/JS: documented DB.selectValue() and corrected the fetching of NULL columns via...
stephan [Tue, 24 May 2022 00:35:18 +0000 (00:35 +0000)] 
wasm/JS: documented DB.selectValue() and corrected the fetching of NULL columns via Stmt.get().

FossilOrigin-Name: 70f91fab825d365f505750acdb8d3ae532880c4cdb64d1e61bb21b24a115958b

3 years agowasm/JS: added support for scalar UDFs. Fixed a deallocation problem with bind()ed...
stephan [Tue, 24 May 2022 00:22:10 +0000 (00:22 +0000)] 
wasm/JS: added support for scalar UDFs. Fixed a deallocation problem with bind()ed strings/blobs.

FossilOrigin-Name: 325a9ee31ad7abae563c4da5cd8228e151b00aa9afcac7e9bca5efaa9d48e107

3 years agowasm: minor refactoring and doc updates.
stephan [Mon, 23 May 2022 19:38:57 +0000 (19:38 +0000)] 
wasm: minor refactoring and doc updates.

FossilOrigin-Name: 6044605b2a712da73600cabb967797a03ed1915dc0ab0b10edbd52525e548196

3 years agofiddle: cleaned up and documented the status-loading progress mechanism in prep for...
stephan [Mon, 23 May 2022 16:54:18 +0000 (16:54 +0000)] 
fiddle: cleaned up and documented the status-loading progress mechanism in prep for reusing it in the sqlite3-api worker.

FossilOrigin-Name: 107e3497869d757265f2a4235082bf324ba1220075d1096c2a82021a5d348a6c

3 years agowasm: added missing 'use strict' and fixed an undeclared var use caught by that.
stephan [Mon, 23 May 2022 13:55:39 +0000 (13:55 +0000)] 
wasm: added missing 'use strict' and fixed an undeclared var use caught by that.

FossilOrigin-Name: c16a7f4950d47c2f5177db7dc5d83f0f11eb0cafdce1ec688d6f1bd740d92733

3 years agowasm: corrected isSupportedBindType() to behave as documented.
stephan [Mon, 23 May 2022 13:52:36 +0000 (13:52 +0000)] 
wasm: corrected isSupportedBindType() to behave as documented.

FossilOrigin-Name: 7e2d2e807272e98e9a3c9c9ba492b796a603f36b7cc12b16923cd8a9e6579851

3 years agoNew test cases to further demonstrate the difference in name matching rules
drh [Mon, 23 May 2022 12:37:54 +0000 (12:37 +0000)] 
New test cases to further demonstrate the difference in name matching rules
for LEFT JOIN versus RIGHT JOIN that protect legacy behavior.
[forum:/forumpost/e90a8e6e6fa652ac|Forum thread e90a8e6e6fa652ac].

FossilOrigin-Name: 2c586060a016f5481bad29bfb8f4ac4e1204075afdd0fa1851fbbcf2abda4893

3 years agoAdd an assert() to clear a harmless static-analyzer warning.
drh [Mon, 23 May 2022 11:51:10 +0000 (11:51 +0000)] 
Add an assert() to clear a harmless static-analyzer warning.

FossilOrigin-Name: 919ba2f0472e12c2d1e82364c1481e778b24ea406615b08992964a4eb80abee7

3 years agoDo not run the subroutine that materializes a view or subquery until just
drh [Mon, 23 May 2022 10:57:20 +0000 (10:57 +0000)] 
Do not run the subroutine that materializes a view or subquery until just
before the materialization is actually needed, so that if the materialization
turns out to never been needed, unnecessary work can be avoided.

FossilOrigin-Name: d64ae49a1f2513171d678259928c67741d79b2ae595078299525641a676cc46b

3 years agoWASM: removed the in64-related bindings, as MDN says that calling a wasm function...
stephan [Mon, 23 May 2022 01:11:49 +0000 (01:11 +0000)] 
WASM: removed the in64-related bindings, as MDN says that calling a wasm function which has an int64 type in its signature will currently throw because JS has no 64-bit integer support. Those bindings now use doubles and simply hope that the user doesn't exceed their integer precision (2^53-1, approx 9 quadrillion).

FossilOrigin-Name: 392e84828275ec203bc713d3a5d4790852add57539add6b29b5f6de1da2dc97a

3 years agoWASM: an arg handling fix for DB.exec({multi:true...}).
stephan [Sun, 22 May 2022 22:10:38 +0000 (22:10 +0000)] 
WASM: an arg handling fix for DB.exec({multi:true...}).

FossilOrigin-Name: 0d6332f706ec5c34cc6a9ff79878f4e10a9ad81b24cc7d743b52168586285811

3 years agoWASM: added exec(), execMulti(), and several getters. Various touchups and fixes.
stephan [Sun, 22 May 2022 22:00:39 +0000 (22:00 +0000)] 
WASM: added exec(), execMulti(), and several getters. Various touchups and fixes.

FossilOrigin-Name: b790c91b85e9cf8eecce86ac1717e8ccd2c3b6b98a1ad6a5d64eefc94ee86f9d

3 years agoImplemented Stmt.get() and friends for WASM OO #1 wrapper. Added basic tests for...
stephan [Sun, 22 May 2022 19:09:59 +0000 (19:09 +0000)] 
Implemented Stmt.get() and friends for WASM OO #1 wrapper. Added basic tests for prepare/step/get. Restructured module init output to introduce only 1 global-scope symbol instead of 2.

FossilOrigin-Name: 601dc3fa29c2ce2ede5a8320c79050305f3774b6d7bc759247c5021f3b74aaec

3 years agoWASM: added bindings for sqlite3_compileoption_get/used(), moved OO #1 into sqlite3...
stephan [Sun, 22 May 2022 16:25:43 +0000 (16:25 +0000)] 
WASM: added bindings for sqlite3_compileoption_get/used(), moved OO #1 into sqlite3-api.js since it can only be used from the same thread as that API and separating them complicates client-side use. Started adding test utilities and tests for the OO1 API.

FossilOrigin-Name: f3bc0328c87cac7d50513b0f13576d8fe7b411396f19c08fbe7e7c657b33cfbf

3 years agoWASM OO wrapper #1: prepare() and bind() APIs are in place but are untested, pending...
stephan [Sun, 22 May 2022 14:07:44 +0000 (14:07 +0000)] 
WASM OO wrapper #1: prepare() and bind() APIs are in place but are untested, pending fetch/get APIs.

FossilOrigin-Name: 84c8f63a1c446331a3afe52b0c8bdfa6980f24aa4cf600f576877fef5e650c39

3 years agoBuild refactoring for the fiddle/wasm bits. Set up wasm binding of a chunk of the...
stephan [Sun, 22 May 2022 00:27:19 +0000 (00:27 +0000)] 
Build refactoring for the fiddle/wasm bits. Set up wasm binding of a chunk of the core C API and added some infastructure for creating test pages for it.

FossilOrigin-Name: dea098b64eb95c395b346ebcae687afe42b7d21df48833527808c02226300a66

3 years agoMinor fiddle-related build restructuring to support upcoming development of the C...
stephan [Sat, 21 May 2022 21:13:44 +0000 (21:13 +0000)] 
Minor fiddle-related build restructuring to support upcoming development of the C-style wasm sqlite3 interface, plus some commentary about the plans and goals for that.

FossilOrigin-Name: c7cfdd4c3682659352642461d3307bf8180703b121ec1802ba5881f8e1ef9809

3 years agoDefer materializing a view or subquery until the materialization is actually deferred-materialize
drh [Sat, 21 May 2022 18:03:33 +0000 (18:03 +0000)] 
Defer materializing a view or subquery until the materialization is actually
needed, so that if it is not needed, not useless work is performed.

FossilOrigin-Name: 16bf350683fd6ac906dbd02b21fb8bf1b1014ed05594cacf108645acd383ae65

3 years agoFix a typo in a comment.
drh [Sat, 21 May 2022 15:54:45 +0000 (15:54 +0000)] 
Fix a typo in a comment.

FossilOrigin-Name: 34d7045b2cc8ef16fd4115499888703a376d2c3a289e7fdd117f8341ffa586c3

3 years agoUse the newer OP_BeginSubrtn opcode instead of OP_Integer to start the
drh [Sat, 21 May 2022 15:12:41 +0000 (15:12 +0000)] 
Use the newer OP_BeginSubrtn opcode instead of OP_Integer to start the
subroutine used to matrialize a view.  This does not change execution but
does make the byte code a little easier to read.

FossilOrigin-Name: cebd4fd606f967de527cff79df8e80e16d06eec257939322f16d21303868fb4d

3 years agofiddle: refactor into main thread (UI) and worker thread (wasm module). Added bits...
stephan [Sat, 21 May 2022 14:19:05 +0000 (14:19 +0000)] 
fiddle: refactor into main thread (UI) and worker thread (wasm module). Added bits needed to support triggering sqlite3_interrupt() but do not yet have a second SharedWorker to test it with.

FossilOrigin-Name: 5ff3326856bc190cee15a5fca5ded89aacc4bf931a8df98726a872b310e2a4fc

3 years agofiddle: add a selection list of example queries.
stephan [Sat, 21 May 2022 00:45:46 +0000 (00:45 +0000)] 
fiddle: add a selection list of example queries.

FossilOrigin-Name: 74abf03977e1ff8c6043defa38211cdfcfbba1979771b90ed9d3dbc99750fe9f

3 years agoIn the shell WASM build, call open_db() early so that we can get access to the global...
stephan [Sat, 21 May 2022 00:01:45 +0000 (00:01 +0000)] 
In the shell WASM build, call open_db() early so that we can get access to the global db handle from certain experimentation-only function without having to first run some SQL code.

FossilOrigin-Name: 31706ef851f7d55e2fe865933ec03f42dfa8b49e6d1f12b6c016b5c1d3460504

3 years agoAdded the standard sqlite license header to the the fiddle JS files. Minor internal...
stephan [Fri, 20 May 2022 13:50:04 +0000 (13:50 +0000)] 
Added the standard sqlite license header to the the fiddle JS files. Minor internal renamings in those same files.

FossilOrigin-Name: 67e40d99ff84a6cb23c68bf0722a4f9dee29b8ad18d9e7aac7d1665e99901ba1

3 years ago#if'd out the '.nonce' and '.check' commends in WASM builds.
stephan [Thu, 19 May 2022 22:04:23 +0000 (22:04 +0000)] 
#if'd out the '.nonce' and '.check' commends in WASM builds.

FossilOrigin-Name: 326f79ea54566a9302be99d920856f13b48f2c2ed265fa87d78ced367d4b1946

3 years ago#if'd out the the '.cd' and '.clone' commands for WASM builds.
stephan [Thu, 19 May 2022 21:56:50 +0000 (21:56 +0000)] 
#if'd out the the '.cd' and '.clone' commands for WASM builds.

FossilOrigin-Name: fa391868dd626ffdb220bed6834d0a10c7336f0fc4ca56055147784de1a4f99d

3 years agofiddle: consolidated two duplicate CSS rules. Internal doc typo fix.
stephan [Thu, 19 May 2022 18:14:34 +0000 (18:14 +0000)] 
fiddle: consolidated two duplicate CSS rules. Internal doc typo fix.

FossilOrigin-Name: d3175a793fb2d1ac9ecfd7a7c3b1627fe583effcd37740206a11b115f099d521

3 years agoAdded a disclaimer about fiddle's experimental and subject-to-change/removal nature.
stephan [Thu, 19 May 2022 17:47:17 +0000 (17:47 +0000)] 
Added a disclaimer about fiddle's experimental and subject-to-change/removal nature.

FossilOrigin-Name: 75b4f574089c4969d2f2c3615a52029e98515e36390c530cdf63f15f4f687a1d

3 years agoMerge the changes to support the "fiddle" extension.
drh [Thu, 19 May 2022 16:59:46 +0000 (16:59 +0000)] 
Merge the changes to support the "fiddle" extension.

FossilOrigin-Name: 58585f01aa4747d3a09771fb462066bd037914f435ff04fa16ed9b0571e7912a

3 years agoWhen building fiddle from its own directory (e.g. from emacs instead of the normal... fiddle
stephan [Thu, 19 May 2022 16:49:15 +0000 (16:49 +0000)] 
When building fiddle from its own directory (e.g. from emacs instead of the normal build process), force -O0 the sake of compilation speed. The top-level build now defaults to -Oz, which is more appropriate for that case.

FossilOrigin-Name: 56b82ae806c61b95e62042ca70ed952ce01832b02da55c2b315f9201989514ab

3 years agoTweaks to the fiddle make target so that it builds with all of the same
drh [Thu, 19 May 2022 16:42:41 +0000 (16:42 +0000)] 
Tweaks to the fiddle make target so that it builds with all of the same
extensions as the standard CLI.

FossilOrigin-Name: d46a6cb97406d90b9ad1da66369454e9b8f387ffbebcdf1c386c3c21f790c16f

3 years agoAdded a toggle to swap input/output field positions and simplified setup of checkboxe...
stephan [Thu, 19 May 2022 16:30:03 +0000 (16:30 +0000)] 
Added a toggle to swap input/output field positions and simplified setup of checkboxes which toggle a CSS class on a given element.

FossilOrigin-Name: eae3ab10c813d6f051d497271be2df05f54005ec54b19a2a27d04d632bccbeac

3 years agoDefault to top/bottom layout with input on the bottom. Offer a toggle to swap input...
stephan [Thu, 19 May 2022 16:11:35 +0000 (16:11 +0000)] 
Default to top/bottom layout with input on the bottom. Offer a toggle to swap input/output positions.

FossilOrigin-Name: 362d236aca31ca2004d1e81d8e306f7a12a6cb4eeb2bab432a9c2aae5206ddd7

3 years agoNumerous layout tweaks, the most significant being that the layout now adapts to...
stephan [Thu, 19 May 2022 15:58:13 +0000 (15:58 +0000)] 
Numerous layout tweaks, the most significant being that the layout now adapts to the window size. Swapped positions of the input/output areas. This version supports, by uncommenting a few bits, a jquery.terminal-based view but alternatives to that 300kb dependency are still under investigation.

FossilOrigin-Name: 1aad3642c9fc14c25223628a309d84decc8d73a123e42d6efdc36d855b5b0666

3 years agofiddle make target now accepts fiddle_cflags=... from the CLI to overrid -Ox and...
stephan [Thu, 19 May 2022 10:58:59 +0000 (10:58 +0000)] 
fiddle make target now accepts fiddle_cflags=... from the CLI to overrid -Ox and such for one-off builds.

FossilOrigin-Name: 4609a4f8626ae3d8179cae27e391bd06ffda18e9ef9e1b78745b36c7e8dd25db

3 years agoEnsure that the output area is cleared of any init-time messages which the emscripten...
stephan [Thu, 19 May 2022 10:38:54 +0000 (10:38 +0000)] 
Ensure that the output area is cleared of any init-time messages which the emscripten bootstrapping process emits when downloading of the wasm module is slow.

FossilOrigin-Name: 1d8d0593573f9fc8e0990a292a4b3317d8a4c323d60514d0768543dd65c24d1e

3 years ago#if'd out the '.log' command in WASM builds. Cleaned up the user-visible parts of...
stephan [Thu, 19 May 2022 10:24:50 +0000 (10:24 +0000)] 
#if'd out the '.log' command in WASM builds. Cleaned up the user-visible parts of the WASM module initialization.

FossilOrigin-Name: b5fa12f824690c1022e4d69b0f5c3949324b311557a7412810741731db7e2cce

3 years agoSplit the fiddle JS code into separate pre-/post-init files to simplify editing....
stephan [Thu, 19 May 2022 09:55:14 +0000 (09:55 +0000)] 
Split the fiddle JS code into separate pre-/post-init files to simplify editing. emcc will combine these into the final fiddle.js, so the number of output deliverables does not change.

FossilOrigin-Name: d3d8ea011868bcfa11bb3fe2db78eea6e77ac1005534d9c091f9a81e03f0a7e6

3 years agoAdded an option to auto-clear the output area before submitting the input. Experiment...
stephan [Thu, 19 May 2022 09:22:16 +0000 (09:22 +0000)] 
Added an option to auto-clear the output area before submitting the input. Experimentally inverted the colors in the input/output areas.

FossilOrigin-Name: 1a1e4e7fdbd0ec61218c3a311164086316d825181f3fc1c1ec235b63488746ef

3 years agoReplaced the toggle for the notes/caveats section of the fiddle UI with a button...
stephan [Thu, 19 May 2022 01:12:23 +0000 (01:12 +0000)] 
Replaced the toggle for the notes/caveats section of the fiddle UI with a button to remove that section.

FossilOrigin-Name: 6661d60527820417bbfd01c782d242c5190252ea703fc6f56376537d5c8f6a1e

3 years ago#if'd out the '.import' command in WASM builds. Several minor cosmetic UI tweaks.
stephan [Thu, 19 May 2022 00:38:34 +0000 (00:38 +0000)] 
#if'd out the '.import' command in WASM builds. Several minor cosmetic UI tweaks.

FossilOrigin-Name: e4f87eb7c3ed16b7e431f86b7d337bb4097246d20780207b43e28fffda3d8a61

3 years ago#if out the '.load' command in WASM builds. Several UI layout tweaks.
stephan [Wed, 18 May 2022 23:40:27 +0000 (23:40 +0000)] 
#if out the '.load' command in WASM builds. Several UI layout tweaks.

FossilOrigin-Name: 67d98297f01d4274c510f5c5cb2a219aeb36fcbb7ce78b8b9ed65639a4561c73

3 years agoIn wasm builds, ifdef out shell commands which require file I/O, pipes, or which...
stephan [Wed, 18 May 2022 22:58:34 +0000 (22:58 +0000)] 
In wasm builds, ifdef out shell commands which require file I/O, pipes, or which trigger an exit() (.quit and .exit). Documented some of the quirks and limitations of the C/WASM crossover. Keep the JS code from calling into the C code after an exit() has been triggered.

FossilOrigin-Name: bee436e62a956e49b0df4a92abff2c89f2b44e21d8f593716df0331f8fc49814

3 years agoImproved handling/reporting of conditions which trigger an exit() from native code...
stephan [Wed, 18 May 2022 21:18:21 +0000 (21:18 +0000)] 
Improved handling/reporting of conditions which trigger an exit() from native code, e.g. calling the '.read' command. Added a Help button which simply submits the '.help' command. Added commented-out variants of various -Ox flags to simplify experimenting with them.

FossilOrigin-Name: bf06ddf4125d2726019fa16d312726c8551094be991509499b5688f6a68a7747

3 years agoCode style fixes: s/char const/const char/.
stephan [Wed, 18 May 2022 18:10:17 +0000 (18:10 +0000)] 
Code style fixes: s/char const/const char/.

FossilOrigin-Name: 9bf042b2eb2137239a59e421e89eb463e719b264eac3db2adae44e321b9a4ad3

3 years agoThe fiddle input/output areas now stretch and shrink as needed to account for their...
stephan [Wed, 18 May 2022 17:40:19 +0000 (17:40 +0000)] 
The fiddle input/output areas now stretch and shrink as needed to account for their available space.

FossilOrigin-Name: 4eec05457fabe8248b8fd48d6187e772b69429ed64e99f02d0ad6b1230b5835e

3 years agoIncreased default size of the fiddle output area, changed the .nullvalue default...
stephan [Wed, 18 May 2022 17:22:02 +0000 (17:22 +0000)] 
Increased default size of the fiddle output area, changed the .nullvalue default in the input area, and minor CSS tweaks.

FossilOrigin-Name: 281aaae73167828bdf0bb2c07f83622475ab29b5755ac7fb8584c8e919c0a09b

3 years agoInitial version of an sqlfiddle-style application using a WASM build of the sqlite3...
stephan [Wed, 18 May 2022 17:14:24 +0000 (17:14 +0000)] 
Initial version of an sqlfiddle-style application using a WASM build of the sqlite3 shell.

FossilOrigin-Name: af9c21c9e0caf05adac7a9fcde39a9164c89f1c78b767b6fdd74a1405a3d373f

3 years agoFix harmless compiler warnings in the new unixFullPathname implementation.
drh [Tue, 17 May 2022 15:11:57 +0000 (15:11 +0000)] 
Fix harmless compiler warnings in the new unixFullPathname implementation.

FossilOrigin-Name: f7e1ceb5b59a876cfd04a8aac0ee2b322c970555b9c361b4953d711ef6596e37

3 years agoAvoid treating constant expressions like "? IN ()" or "? NOT IN ()" as integers if...
dan [Tue, 17 May 2022 15:01:01 +0000 (15:01 +0000)] 
Avoid treating constant expressions like "? IN ()" or "? NOT IN ()" as integers if they appear in a GROUP BY or ORDER BY clause.

FossilOrigin-Name: d8b249e8cdf0babe1427d0587dbdc27a52ec06a5ef3a20dfb05a0ea4adb85858

3 years agoAdd the sqlite3_db_name() interface.
drh [Tue, 17 May 2022 14:59:05 +0000 (14:59 +0000)] 
Add the sqlite3_db_name() interface.

FossilOrigin-Name: 2ad152236c408cbb1f942b221de4bf3cbaa9c35313d7eb07a63f46b6040fc981

3 years agoAdd memory barriers to multi-threaded code in test4.c.
dan [Mon, 16 May 2022 16:55:22 +0000 (16:55 +0000)] 
Add memory barriers to multi-threaded code in test4.c.

FossilOrigin-Name: 9260f4e0fdc8066b4772999bacb5f4130ef714d4ac1967029ceacff618bc48ff

3 years agoFix a problem in test file swarmvtab3.test causing occasional failures.
dan [Mon, 16 May 2022 16:10:04 +0000 (16:10 +0000)] 
Fix a problem in test file swarmvtab3.test causing occasional failures.

FossilOrigin-Name: f935c155ef205802c16b4ebea4a3fb01bf5689662b7b4f2af56f0f9021d6d4b1

3 years agoDo not allow an index scan on an index-on-expression for a RIGHT JOIN because
drh [Sat, 14 May 2022 19:05:13 +0000 (19:05 +0000)] 
Do not allow an index scan on an index-on-expression for a RIGHT JOIN because
the index might not be positioned on the correct row when running the
the right-join no-match loop.
dbsqlfuzz 39ee60004ff027a9e2846cf76e02cd5ac0953739

FossilOrigin-Name: 2277f9ba7087dd993ac0f4007c523aa9cf74dba187f53af03d8c164886726fee

3 years agoImproved debugging comment generation for the OP_Column opcode.
drh [Sat, 14 May 2022 17:40:47 +0000 (17:40 +0000)] 
Improved debugging comment generation for the OP_Column opcode.

FossilOrigin-Name: 3e073bfddfcd652dfae8656d8978a4de427d21847fdaccfce53b6b895ad33f01

3 years agoImprovements to the decision of when to check ON constraints for an inner
drh [Sat, 14 May 2022 15:59:42 +0000 (15:59 +0000)] 
Improvements to the decision of when to check ON constraints for an inner
join that is an operand to a RIGHT JOIN.  Fix for issue identify by
[forum:/forumpost/c06b10ad7e|forum post c06b10ad7e].

FossilOrigin-Name: 9d17233c7d98bf25c1a518d067e778708b3db6d6302edd8d7e376ba0ba4f1c30

3 years agoChange an unreachable branch into an assert().
drh [Fri, 13 May 2022 23:01:28 +0000 (23:01 +0000)] 
Change an unreachable branch into an assert().

FossilOrigin-Name: 778e57a558dc3f819ca57623bcb85f58c8fbeb28bc12a1e2edbdd1244e9107c5

3 years agoTransitive equality constriants do not work on a RIGHT JOIN, since the
drh [Fri, 13 May 2022 20:11:32 +0000 (20:11 +0000)] 
Transitive equality constriants do not work on a RIGHT JOIN, since the
right-hand side might be a non-matched row.

FossilOrigin-Name: 0f96810b840dd6f209562635b21f55a7ed6210c01336fcfeb3b79e08a615a28d

3 years agoWalk back the optimization from check-in [cc458317bd77046c] that tries to
drh [Fri, 13 May 2022 19:50:29 +0000 (19:50 +0000)] 
Walk back the optimization from check-in [cc458317bd77046c] that tries to
reuse the same ephemeral cursor of a list subquery when that subquery is
reused, as it does not work in cases where the list subquery is used both
for lookups and for scans.

FossilOrigin-Name: 12ee29d632ae4b585ef6bc07d3289d00c121268945dffd5673b251d95874e3f8

3 years agoDefer generating WHERE clause constraints for a RIGHT JOIN until after the
drh [Fri, 13 May 2022 17:45:52 +0000 (17:45 +0000)] 
Defer generating WHERE clause constraints for a RIGHT JOIN until after the
ON-clause processing for the RIGHT JOIN has done its own row elimination.
This fixes and incorrect output from some RIGHT JOINs that was identified
by [forum:/forumpost/41cc3851d864c5e6|forum post 41cc3851d864c5e6].

FossilOrigin-Name: 238d9c247cf69cc77fdb1af9d42ebe258610a533ac4204e2ddf8af17f24d18c4

3 years agoRedefine the acccess rules for the Expr.w union so that the Expr.w.iJoin
drh [Fri, 13 May 2022 16:38:40 +0000 (16:38 +0000)] 
Redefine the acccess rules for the Expr.w union so that the Expr.w.iJoin
member is accessible on either EP_OuterON or EP_InnerON.

FossilOrigin-Name: 6f741d6cfb8831a3ac966257ac4519bcc8156293447bf50323c2d9b170125974

3 years agoCorrections to the header comment to the new joinE.test script. Add the
drh [Fri, 13 May 2022 15:36:47 +0000 (15:36 +0000)] 
Corrections to the header comment to the new joinE.test script.  Add the
generator TCL as a comment at the bottom of the script.

FossilOrigin-Name: 2f4456f67f64f131fc852ad9a7420eb43b57b879a9bec7e4b295f1dc0d7bfa56

3 years agoNew test cases for outer joins. Case joinE-32 currently gets an incorrect
drh [Fri, 13 May 2022 15:31:30 +0000 (15:31 +0000)] 
New test cases for outer joins.  Case joinE-32 currently gets an incorrect
answer.  See [forum:/forumpost/41cc3851d8|forum post 41cc3851d8] for the bug
report.

FossilOrigin-Name: 02b24863e6dc617c9260f79292a96b7c861d088268e77fd17204570515eb792c

3 years agoImproved names for flags on the Expr object: EP_FromJoin becames
drh [Fri, 13 May 2022 14:52:04 +0000 (14:52 +0000)] 
Improved names for flags on the Expr object:  EP_FromJoin becames
EP_OuterON and EP_InnerJoin becomes EP_InnerON.

FossilOrigin-Name: 1ffea07ff98b894729c698b681cc7433df3bbfccd8a0529a706908602a636937

3 years agoFix a harmless compiler warning in the CLI.
drh [Thu, 12 May 2022 17:09:33 +0000 (17:09 +0000)] 
Fix a harmless compiler warning in the CLI.

FossilOrigin-Name: 7a2ac303d1436a423a635db63d195097c88160ff46855194f6e630f9d3b3fa82

3 years agoEnsure that ON clauses are applied to the correct outer join.
drh [Thu, 12 May 2022 11:56:44 +0000 (11:56 +0000)] 
Ensure that ON clauses are applied to the correct outer join.

FossilOrigin-Name: c7e3a13a3288c577209be99c630fbe924e19880e8af1aa8a83b517acaa8b43d7

3 years agoAdd IS NOT DISTINCT FROM and IS DISTINCT FROM binary operators which are
drh [Thu, 12 May 2022 11:45:20 +0000 (11:45 +0000)] 
Add IS NOT DISTINCT FROM and IS DISTINCT FROM binary operators which are
equivalent to IS and IS NOT, respectively, for compatability with PostgreSQL
and hence standard SQL.

FossilOrigin-Name: db27611e172102483eaede3981d473e3d5bf93d98bc68f480398b1573876349d

3 years agoFix the ".echo" command of the CLI so that it shows the results of input
drh [Thu, 12 May 2022 11:01:41 +0000 (11:01 +0000)] 
Fix the ".echo" command of the CLI so that it shows the results of input
lines immediately, before invoking sqlite3_prepare().

FossilOrigin-Name: cf7fdabdba3a7600ea730263ca80ba80154645dfa15c31c037b780d6cb70e530

3 years agoZap stray --help output from intermediate version. echo-sql
larrybr [Wed, 11 May 2022 20:29:32 +0000 (20:29 +0000)] 
Zap stray --help output from intermediate version.

FossilOrigin-Name: deb7372b18cc8fb9d305085498fd24b3c2c17bd920ae2d03fa885af02ad47008

3 years agoChange .echo on effect so that SQL is echoed before prepare. This slightly alters...
larrybr [Wed, 11 May 2022 19:59:31 +0000 (19:59 +0000)] 
Change .echo on effect so that SQL is echoed before prepare. This slightly alters echoed output when multiple SQL statements are submitted at once. Also sync with trunk.

FossilOrigin-Name: c1eff632c41809214edea2850a93852fff66da3ca0dc393e8fe55e0976d422fd

3 years agoThe unix interface now resolves all symbolic links in filenames before
drh [Wed, 11 May 2022 17:57:43 +0000 (17:57 +0000)] 
The unix interface now resolves all symbolic links in filenames before
actually using those filenames.

FossilOrigin-Name: d55273e36e312336b8fc77dc771657d3b2c3437fbbd79f3be37701982560d634

3 years agoUse osReadlink() in os_unix.c, not readlink() directly. resolve-symlinks
drh [Wed, 11 May 2022 17:45:50 +0000 (17:45 +0000)] 
Use osReadlink() in os_unix.c, not readlink() directly.

FossilOrigin-Name: c3da4c1611cebd9f9d695892a3ffddc47d5f0db1a1ea8bd2b4f83ef7673b68de

3 years agoFor the unix VFS, rewrite the xFullPathname method so that it automatically
drh [Wed, 11 May 2022 16:46:27 +0000 (16:46 +0000)] 
For the unix VFS, rewrite the xFullPathname method so that it automatically
resolves all symbolic links, rendering a canonical pathname that contains
no symlinks.

FossilOrigin-Name: 40c9273d0e0e74e1df22e996a5d486e838f4320defd2121e2d95eeed8aea6235

3 years agoFix .import leak in CLI and add shell leak testing to debug builds and the Tcl test...
larrybr [Wed, 11 May 2022 03:42:38 +0000 (03:42 +0000)] 
Fix .import leak in CLI and add shell leak testing to debug builds and the Tcl test suite.

FossilOrigin-Name: df842ebc796a2b0c913d19d873e88d048808dc5283465271369e302a680317e4

3 years agoSync w/ trunk import-leak-plug
larrybr [Wed, 11 May 2022 03:29:52 +0000 (03:29 +0000)] 
Sync w/ trunk

FossilOrigin-Name: 1284225b0a8c7b630416be5348e99f7280f6443548ec97ffb1c85be23352b2bc

3 years agoFix a bug in the sqlite3WhereMalloc() routines that were added by
drh [Tue, 10 May 2022 23:28:12 +0000 (23:28 +0000)] 
Fix a bug in the sqlite3WhereMalloc() routines that were added by
chekc-in [f237e1d8cc41b937].  The bug was detected by dbsqlfuzz
test case 4c5e3e89bc251d28378be88233f531b84ec66901.

FossilOrigin-Name: 764b71267e0b31ff7eaf2a0def7526a1a02dce4d5b456dea060d97ed342efdd1

3 years agoMake tester.tcl work on more Windows Tcl installations. And sync w/ trunk.
larrybr [Tue, 10 May 2022 22:32:27 +0000 (22:32 +0000)] 
Make tester.tcl work on more Windows Tcl installations. And sync w/ trunk.

FossilOrigin-Name: d25fbdf8772f1c8283828424b208fc1758c82e9e28e0e52122c87db4af1c672d

3 years agoNew requirement marks.
drh [Tue, 10 May 2022 18:43:54 +0000 (18:43 +0000)] 
New requirement marks.

FossilOrigin-Name: e8479e56c615a6eb38b58e6d360bea8528ec14a9d7b0798b95d3eb513bd08f0f

3 years agoFix a stale requirement mark.
drh [Tue, 10 May 2022 18:18:45 +0000 (18:18 +0000)] 
Fix a stale requirement mark.

FossilOrigin-Name: fcda7fb1f184a31a67572aae15f3cdcd60f8aac199106a7b0f90aca251ca7017

3 years agoFix a stale requirement mark.
drh [Tue, 10 May 2022 17:42:55 +0000 (17:42 +0000)] 
Fix a stale requirement mark.

FossilOrigin-Name: 3eda4030f73384abf18b97cd8a4606e10b23e382d1b72dff7526aebfde23e0af

3 years agoFix a harmless UBSAN warning.
drh [Tue, 10 May 2022 15:55:10 +0000 (15:55 +0000)] 
Fix a harmless UBSAN warning.

FossilOrigin-Name: 8f9355028bc7baeeb10ee9a5e29f093adac6c2f149596dec0be827be4ce491cb

3 years agoSync w/ trunk
larrybr [Tue, 10 May 2022 14:57:38 +0000 (14:57 +0000)] 
Sync w/ trunk

FossilOrigin-Name: b7285f92bb9bfd8471e51ee5b6dbd7030b1f731683876e8ecca4a8c033688736

3 years agoFor CLI, add ".echo sql" dot-command.
larrybr [Tue, 10 May 2022 14:55:45 +0000 (14:55 +0000)] 
For CLI, add ".echo sql" dot-command.

FossilOrigin-Name: 35cef458ca114649ee16e00714d817d57673b96c007454946cc411ae90fd06ce

3 years agoSync w/trunk
larrybr [Tue, 10 May 2022 06:04:48 +0000 (06:04 +0000)] 
Sync w/trunk

FossilOrigin-Name: 536691ed0f76ac37f3d86e4f5b1cff15ce4c011f84cd3452b5b45bafb6bf2522

3 years agoCause most shell tests to be run under Tcl suite valgrind config.
larrybr [Tue, 10 May 2022 01:11:51 +0000 (01:11 +0000)] 
Cause most shell tests to be run under Tcl suite valgrind config.

FossilOrigin-Name: cd085b36ff777396ac2705c030c1518f8094a70a0b0ba4a628776429524d20f0

3 years agoSimplified "hidden" and "no-expand" handling in the *-expander.
drh [Tue, 10 May 2022 00:24:01 +0000 (00:24 +0000)] 
Simplified "hidden" and "no-expand" handling in the *-expander.

FossilOrigin-Name: c6c3115f3a008cf9b0d7c5c812f17e38c8a75a904032c5f05f0bea03a7340527

3 years agoCreate new branch named "echo-sql"
larrybr [Mon, 9 May 2022 18:33:14 +0000 (18:33 +0000)] 
Create new branch named "echo-sql"

FossilOrigin-Name: 042f2935c9d07668eff6ad8a071c82aa12ccbf9a783dff7b74ddd6b4c82cf573

3 years agoMinor STAT4 test case change due to the ANALYZE enhancement of
drh [Mon, 9 May 2022 17:55:34 +0000 (17:55 +0000)] 
Minor STAT4 test case change due to the ANALYZE enhancement of
[eb59c46a5aed69bc|check-in eb59c46a5aed69bc].

FossilOrigin-Name: 8ce2fecb580da53fc01c53d8de10e2cc99499094215429ba925e777717e369b2

3 years agoAdd ALWAYS() on two unreachable branches in the * expander.
drh [Mon, 9 May 2022 16:29:53 +0000 (16:29 +0000)] 
Add ALWAYS() on two unreachable branches in the * expander.

FossilOrigin-Name: 387c852375bba62df040330944c9e979a6993f95ece3443597c5fc66e34263ca

3 years agoSimplify a branch in the "*" expansion logic. New test case for an
drh [Mon, 9 May 2022 12:59:16 +0000 (12:59 +0000)] 
Simplify a branch in the "*" expansion logic.  New test case for an
INSTEAD OF trigger on a RIGHT and FULL outer join.

FossilOrigin-Name: d2717348f43b571c7bb58498e0c723331abf85de174189e66aca2c438ca26d5f

3 years agoSimplify .import leak plug and arrange for CLI to be run under valgrind.
larrybr [Mon, 9 May 2022 12:29:47 +0000 (12:29 +0000)] 
Simplify .import leak plug and arrange for CLI to be run under valgrind.

FossilOrigin-Name: 0d3e2380197aa3e725591266acaeb0d43a7e794ca9153e6c56253cdcf60720b1

3 years agoStop a memory leak in .import, and add leak complaint to CLI debug builds.
larrybr [Sat, 7 May 2022 03:53:14 +0000 (03:53 +0000)] 
Stop a memory leak in .import, and add leak complaint to CLI debug builds.

FossilOrigin-Name: f5f09368b33b6af00f96e5b8f763e7ee2d00ba6af2aee0f2ca86bb58c03d0b71

3 years agoCreate new branch named "import-leak-plug"
larrybr [Sat, 7 May 2022 02:21:17 +0000 (02:21 +0000)] 
Create new branch named "import-leak-plug"

FossilOrigin-Name: 4a4cecab23ef2aab20b1db466d045d56921590eb67563ab5a31f7b0a0f75c533

3 years agoPerserve the requested reserved-bytes size for the database file when
drh [Fri, 6 May 2022 22:29:45 +0000 (22:29 +0000)] 
Perserve the requested reserved-bytes size for the database file when
doing a VACUUM.

FossilOrigin-Name: dac6d87c71606f3ec7ce601be6d17357d323476ecb60dbb167030146783b62b2

3 years agoPrevent an infinite loop on SQLITE_ERROR_RETRY when trying to modify a
drh [Fri, 6 May 2022 00:43:06 +0000 (00:43 +0000)] 
Prevent an infinite loop on SQLITE_ERROR_RETRY when trying to modify a
corrupt schema while PRAGMA writeable_schema=ON is active.
dbsqlfuzz ded83609f475cc989c7339d45efb5151c1495501

FossilOrigin-Name: 217b33234dc3dc36b5b6add50c170869421057a56a7576d1a61767956248d5c9