1
0
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:
igor@olga.mysql.com
2007-05-14 16:41:09 -07:00
parent 681ef616ed
commit d71043b889
3 changed files with 45 additions and 0 deletions

View File

@ -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;
}