mariadb/mysql-test/suite/sysschema
Sergei Petrunia 5bcc115d77 MDEV-36055 Allow left join reordering
(Based on a patch by Yuchen Pei)
When computing table dependencies in simplify_joins(), do not make
LEFT JOIN-ed table (or join nest) to be dependent on all preceding tables.

For queries in form

  t1
  LEFT JOIN t2 ON t2.col=t1.col
  LEFT JOIN t3 ON t3.col=t1.col

this allows the optimizer to construct join order of t1-t3-t2. Before
this patch, t1-t2-t3 was the only possible order.

Note that queries that use Oracle's Outer Join syntax (col1(+)=col2) are
converted into chained independent LEFT JOINs like the above.

The optimization is controlled by optimizer_switch='reorder_outer_joins=ON'

It is NOT enabled by default as it is known to expose problems with
join pruning. It is advised to set optimizer_prune_level=0 when setting
reorder_outer_joins=on.

Co-authored-by: Yuchen Pei <ycp@mariadb.com>
2026-01-28 14:11:44 +02:00
..
include MDEV-9077 - sysschema test suite. 2021-03-18 08:02:48 +01:00
r MDEV-36055 Allow left join reordering 2026-01-28 14:11:44 +02:00
t Merge branch '11.8' into bb-12.1-release 2025-10-08 09:05:38 +02:00
disabled.def Merge 10.5 into 10.6 2023-12-19 18:41:42 +02:00
suite.opt MDEV-9077 - sysschema test suite. 2021-03-18 08:02:48 +01:00
suite.pm MDEV-9077 - sysschema test suite. 2021-03-18 08:02:48 +01:00