mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug #27937: crash for the the second execution of a prepared
statement from a UNION query with ORDER BY an expression containing RAND(). The crash happened because the global order by list in the union query was not re-initialized for execution. (Local order by lists were re-initialized though).
This commit is contained in:
@ -135,6 +135,11 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd)
|
||||
fake_select_lex->table_list.link_in_list((byte *)&result_table_list,
|
||||
(byte **)
|
||||
&result_table_list.next);
|
||||
for (ORDER *order= (ORDER *) global_parameters->order_list.first;
|
||||
order;
|
||||
order= order->next)
|
||||
order->item= &order->item_ptr;
|
||||
|
||||
return options_tmp;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user