mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for bug#49570: Assertion failed: !(order->used & map)
on re-execution of prepared statement Problem: some (see eq_ref_table()) ORDER BY/GROUP BY optimization is called before each PS execution. However, we don't properly initialize its stucture every time before the call. Fix: properly initialize the sturture used.
This commit is contained in:
@ -6777,6 +6777,7 @@ static void update_depend_map(JOIN *join, ORDER *order)
|
||||
table_map depend_map;
|
||||
order->item[0]->update_used_tables();
|
||||
order->depend_map=depend_map=order->item[0]->used_tables();
|
||||
order->used= 0;
|
||||
// Not item_sum(), RAND() and no reference to table outside of sub select
|
||||
if (!(order->depend_map & (OUTER_REF_TABLE_BIT | RAND_TABLE_BIT))
|
||||
&& !order->item[0]->with_sum_func)
|
||||
|
Reference in New Issue
Block a user