mariadb/mysql-test/suite/compat
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
..
maxdb MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
mssql MDEV-19123 Change default charset from latin1 to utf8mb4 2024-07-11 10:21:07 +04:00
oracle MDEV-36055 Allow left join reordering 2026-01-28 14:11:44 +02:00
README.txt MDEV-20017 Implement TO_CHAR() Oracle compatible function 2021-05-19 22:54:12 +02:00

To run a test suite under this directory, you should use the format:

mysql-test-run --suite=compat/oracle

or to run one test:

mysql-test-run compat/oracle.test_name