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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user