1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-24 19:42:23 +03:00

Fixed bug #26830: a crash for the query with a subselect containing ROLLUP.

Crash happened because the function get_best_group_min_max detected
joins with ROLLUP incorrectly.
This commit is contained in:
igor@olga.mysql.com
2007-03-10 02:47:47 -08:00
parent 9625f2e902
commit ec4593f59a
3 changed files with 25 additions and 1 deletions

View File

@ -7504,7 +7504,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
if ((join->tables != 1) || /* The query must reference one table. */
((!join->group_list) && /* Neither GROUP BY nor a DISTINCT query. */
(!join->select_distinct)) ||
(thd->lex->select_lex.olap == ROLLUP_TYPE)) /* Check (B3) for ROLLUP */
(join->select_lex->olap == ROLLUP_TYPE)) /* Check (B3) for ROLLUP */
DBUG_RETURN(NULL);
if (table->s->keys == 0) /* There are no indexes to use. */
DBUG_RETURN(NULL);