mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-15478: Lost name of a explicitly named CTE column used in
the non-recursive CTE defined with UNION The problem appears as the columns of the non-recursive CTE weren't renamed. The renaming procedure was called for recursive CTEs only. To fix it in the procedure st_select_lex_unit::prepare With_element::rename_columns_of_derived_unit is called now for both CTEs: recursive and non-recursive.
This commit is contained in:
@ -598,7 +598,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
types= first_sl->item_list;
|
||||
else if (sl == first_sl)
|
||||
{
|
||||
if (is_recursive)
|
||||
if (with_element)
|
||||
{
|
||||
if (derived->with->rename_columns_of_derived_unit(thd, this))
|
||||
goto err;
|
||||
|
Reference in New Issue
Block a user