1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixed bug mdev-11161.

The flag TABLE_LIST::fill_me must be reset to false at the prepare
phase for any materialized derived table used in the executed query.
Otherwise if the optimizer decides to generate a key for such a table
it is generated only for the first execution of the query.
This commit is contained in:
Igor Babaev
2016-11-11 20:55:03 -08:00
parent 10aee66896
commit 96b62b5514
3 changed files with 139 additions and 0 deletions

View File

@ -651,6 +651,8 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
unit->derived= derived;
derived->fill_me= FALSE;
if (!(derived->derived_result= new select_union))
DBUG_RETURN(TRUE); // out of memory