diff options
author | unknown <igor@olga.mysql.com> | 2007-03-10 02:47:47 -0800 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-03-10 02:47:47 -0800 |
commit | fe8951d66f9c7475fd113b9961d96e159d39945e (patch) | |
tree | e27071ed704feb214dd2361601b8d647d15ca546 /sql | |
parent | 50ff3c62b6ce772fe5e2d9505a73f993c325311c (diff) | |
download | mariadb-git-fe8951d66f9c7475fd113b9961d96e159d39945e.tar.gz |
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.
mysql-test/r/olap.result:
Added a test case for bug #26830.
mysql-test/t/olap.test:
Added a test case for bug #26830.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/opt_range.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index dfb3af87c29..0e284850cbe 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -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); |