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 | 4d6ad7ac60a0b4b0c5f38f7d415430553f74279b (patch) | |
tree | e27071ed704feb214dd2361601b8d647d15ca546 /sql/opt_range.cc | |
parent | 52fb60dadf767690227afc6b7a7ec540e5b78be9 (diff) | |
download | mariadb-git-4d6ad7ac60a0b4b0c5f38f7d415430553f74279b.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/opt_range.cc')
-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); |