Files
turso/testing
Jussi Saurio c0da38e24a Merge 'Clear WhereTerm 'from_outer_join' state when LEFT JOIN is optimized to INNER JOIN' from Jussi Saurio
Closes #3470
## Background
In a query like `SELECT * FROM t LEFT JOIN s ON t.a=s.a WHERE s.a =
'foo'` we can remove the LEFT JOIN and replace it with an `INNER JOIN`
because NULL values will never be equal to 'foo'. Rewriting as `INNER
JOIN` allows the optimizer to also reorder the table join order to come
up with a more efficient query plan. In fact, we have this optimization
already.
## Problem
However, there is a dumb bug where `WhereTerm`s involving this join
still retain their `from_outer_join` state, resulting in forcing the
evaluation of those terms at the original join index, which results in
completely wrong bytecode if the join optimizer decides to reorder the
join as `s JOIN t` instead. Effectively it will evaluate `t.a=s.a` after
table `s` is open but table `t` is not open yet.
## Fix
This PR fixes that issue by clearing `from_outer_join` properly from the
relevant `WhereTerm`s.

Closes #3475
2025-10-02 06:56:07 +03:00
..
2025-09-29 22:33:39 -03:00
2025-08-02 13:00:18 +03:00
2025-07-15 16:44:11 +03:00
2024-08-03 12:16:34 +03:00
2025-09-28 21:16:33 +05:30
2025-07-24 19:19:48 -05:00
2025-02-09 22:01:33 +04:00
2025-01-21 00:29:23 +05:30
2025-08-01 15:44:56 +03:00
2025-08-05 21:18:52 -07:00
2025-06-20 15:59:03 -03:00
2025-09-29 17:18:19 -04:00
2025-06-11 18:39:06 +02:00
2025-09-23 14:22:02 -04:00
2025-05-08 22:22:55 +08:00
2025-09-17 14:50:15 +07:00
2025-09-01 11:39:43 -04:00
2025-08-11 12:13:47 -04:00
2025-08-01 15:44:56 +03:00
2025-09-30 15:26:13 -03:00
2025-09-30 17:57:25 +04:00
2025-08-01 15:44:56 +03:00
2025-08-11 08:42:08 -03:00
2025-06-07 17:37:36 +09:00
2025-09-30 22:39:55 +04:00
2025-07-18 10:39:02 -05:00
2025-08-13 14:14:03 -05:00
2025-08-15 21:06:30 +02:00
2025-09-13 11:12:44 +02:00

Turso Testing

Testing Extensions

When adding tests for extensions, please follow these guidelines:

  • Tests that verify the internal logic or behavior of a particular extension should go into cli_tests/extensions.py.
  • Tests that verify how extensions interact with the database engine, such as virtual table handling, should be written in TCL (see vtab.test as an example).

To check which extensions are available in TCL, or to add a new one, refer to the tester.tcl file and look at the extension_map.