mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#34773: query with explain extended and derived table / other table
crashes server When creating temporary table that contains aggregate functions a non-reversible source transformation was performed to redirect aggregate function arguments towards temporary table columns. This caused EXPLAIN EXTENDED to fail because it was trying to resolve references to the (freed) temporary table. Fixed by preserving the original aggregate function arguments and using them (instead of the transformed ones) for EXPLAIN EXTENDED.
This commit is contained in:
@ -9157,7 +9157,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
|
||||
DBUG_RETURN(NULL);
|
||||
|
||||
/* The argument of MIN/MAX. */
|
||||
Item *expr= min_max_item->args[0]->real_item();
|
||||
Item *expr= min_max_item->get_arg(0)->real_item();
|
||||
if (expr->type() == Item::FIELD_ITEM) /* Is it an attribute? */
|
||||
{
|
||||
if (! min_max_arg_item)
|
||||
|
Reference in New Issue
Block a user