1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed the bug mdev-13734.

If the method SELECT_LEX::mark_const_derived() is called for a select
that is used in the specification of a materialized derived table / view D
then method should not set the flag fill_me for D on when
the flag JOIN::with_two_phase_optimization is set on for this select.
This commit is contained in:
Igor Babaev
2017-09-10 10:08:52 -07:00
parent 61074d0426
commit 3a9ee22ba9
3 changed files with 34 additions and 1 deletions

View File

@ -4608,7 +4608,8 @@ void SELECT_LEX::mark_const_derived(bool empty)
{
if (!empty)
increase_derived_records(1);
if (!master_unit()->is_unit_op() && !derived->is_merged_derived())
if (!master_unit()->is_unit_op() && !derived->is_merged_derived() &&
!(join && join->with_two_phase_optimization))
derived->fill_me= TRUE;
}
}