mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB
- When analying multiple equalities, take into account that they may not have a single table field that belongs to one of the tables that we're trying to eliminate (and they are not useful for table elimination in that case) mysql-test/r/table_elim.result: LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB - Testcase mysql-test/t/table_elim.test: LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB - Testcase
This commit is contained in:
parent
6e7241caa5
commit
69028d5127
3 changed files with 107 additions and 2 deletions
|
|
@ -1220,8 +1220,16 @@ void build_eq_mods_for_cond(Dep_analysis_context *ctx,
|
|||
bound_item= item;
|
||||
}
|
||||
}
|
||||
exchange_sort<Dep_value_field>(fvl, compare_field_values, NULL);
|
||||
add_module_expr(ctx, eq_mod, *and_level, NULL, bound_item, fvl);
|
||||
/*
|
||||
Multiple equality is only useful if it includes at least one field from
|
||||
the table that we could potentially eliminate:
|
||||
*/
|
||||
if (fvl->elements)
|
||||
{
|
||||
|
||||
exchange_sort<Dep_value_field>(fvl, compare_field_values, NULL);
|
||||
add_module_expr(ctx, eq_mod, *and_level, NULL, bound_item, fvl);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue