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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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].
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.
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].
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.
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.
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.
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.
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
drh [Wed, 4 May 2022 17:43:59 +0000 (17:43 +0000)]
New test cases for RIGHT and FULL JOIN, focusing on cases that make use
of Bloom filters, and a bug fix related to when ON-clause constraints are
applied.
drh [Tue, 3 May 2022 14:01:48 +0000 (14:01 +0000)]
Fix the Bloom filter pull-down optimization so that it jumps to the correct
place if it encounters a NULL key. Fix for the bug described by
[forum:/forumpost/2482b32700384a0f|forum thread 2482b32700384a0f].
drh [Tue, 3 May 2022 12:11:16 +0000 (12:11 +0000)]
Add assert()s to show that jumps always land an an instruction that is between
1 and Vdbe.nOp-1. Had these assert()s been in place before, they would have
caused an assertion fault for the byte-code error reported by
[forum:/forumpost/2482b32700|forum post 2482b32700].
drh [Mon, 2 May 2022 20:49:30 +0000 (20:49 +0000)]
Organize the various flag bits of the ExprList_item object into a substructure
so that the whole lot can be copied all at once. Faster and smaller code.
drh [Mon, 2 May 2022 19:59:03 +0000 (19:59 +0000)]
Name resolution and "*" wildcard expansion for parenthesized FROM clauses
seems to work the same as PG. The code is chaos, however, and needs some
cleanup.