mirror of
https://github.com/MariaDB/server.git
synced 2026-04-27 02:35:29 +02:00
Fixed bug mdev-12099.
The function mysql_derived_merge() erroneously did not mark newly formed AND formulas in ON conditions with the flag abort_on_null. As a result not_null_tables() calculated incorrectly for these conditions. This could prevent conversion of embedded outer joins into inner joins. Changed a test case from table_elim.test to preserve the former execution plan.
This commit is contained in:
parent
199f88cb9c
commit
5a0fff50f8
5 changed files with 151 additions and 4 deletions
|
|
@ -446,6 +446,9 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived)
|
|||
{
|
||||
Item *expr= derived->on_expr;
|
||||
expr= and_conds(expr, dt_select->join ? dt_select->join->conds : 0);
|
||||
if (expr)
|
||||
expr->top_level_item();
|
||||
|
||||
if (expr && (derived->prep_on_expr || expr != derived->on_expr))
|
||||
{
|
||||
derived->on_expr= expr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue