← Back to team overview

maria-developers team mailing list archive

Re: Please review MDEV-10124 Incorrect usage of CUBE/ROLLUP and ORDER BY with GROUP_CONCAT(a ORDER BY a)

 

Hi, Alexander!

On May 26, Alexander Barkov wrote:
> Hi Sergei,
> 
> Please review MDEV-10124
> 
> Here's the story of the related code:

Thanks, that was very hepful!

> diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
> index 37a543a..78e85a3 100644
> --- a/sql/sql_yacc.yy
> +++ b/sql/sql_yacc.yy
> @@ -10743,20 +10743,7 @@ opt_gconcat_separator:
>  
>  opt_gorder_clause:
>            /* empty */
> -        | ORDER_SYM BY
> -          {
> -            LEX *lex= Lex;
> -            SELECT_LEX *sel= lex->current_select;
> -            if (sel->linkage != GLOBAL_OPTIONS_TYPE &&
> -                sel->olap != UNSPECIFIED_OLAP_TYPE &&
> -                (sel->linkage != UNION_TYPE || sel->braces))
> -            {
> -              my_error(ER_WRONG_USAGE, MYF(0),
> -                       "CUBE/ROLLUP", "ORDER BY");
> -              MYSQL_YYABORT;
> -            }
> -          }
> -         gorder_list;
> +        | ORDER_SYM BY gorder_list;
>          ;

Ok to push

Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx


References