diff options
author | Michael Widenius <monty@mariadb.org> | 2014-12-15 17:13:47 +0200 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2014-12-15 17:13:47 +0200 |
commit | 5257d71e0e495216162b790efc6866027aa2b718 (patch) | |
tree | 81ea5bb5e6f457debf1d97f26e3ac45732b7bc1d /mysql-test/r/group_by.result | |
parent | 10ab3e68876bc7a16a6a2108a445f38778fa3df4 (diff) | |
download | mariadb-git-5257d71e0e495216162b790efc6866027aa2b718.tar.gz |
MDEV-6855 Assertion `cond_type == Item::FUNC_ITEM' failed in check_group_min_max_predicates with GROUP BY, aggregate in WHERE SQ, multi-part key
mysql-test/r/group_by.result:
Test for MDEV-6855
mysql-test/t/group_by.test:
Test for MDEV-6855
sql/item.h:
Fixed spelling error
sql/opt_range.cc:
Added handling of cond_type == Item::CACHE_ITEM in WHERE clauses for MIN/MAX optimization.
Fixed indentation
Diffstat (limited to 'mysql-test/r/group_by.result')
-rw-r--r-- | mysql-test/r/group_by.result | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 57f21a5e0eb..32f7d61319b 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -2493,3 +2493,17 @@ SELECT i2 FROM t1 AS t1a STRAIGHT_JOIN ( t2 INNER JOIN t1 AS t1b ON (t1b.c1 = c2 WHERE t1a.c1 = c2 GROUP BY i2; i2 DROP TABLE t1,t2; +# +# MDEV-6855 +# MIN(*) with subqueries with IS NOT NULL in WHERE clause crashed. +# +CREATE TABLE t1 (i INT, c VARCHAR(3), KEY(c,i)) ENGINE=MyISAM; +INSERT INTO t1 VALUES (7,'foo'),(0,'bar'); +CREATE TABLE t2 (j INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (0),(8),(1),(8),(9); +SELECT MAX(i), c FROM t1 +WHERE c != 'qux' AND ( SELECT SUM(j) FROM t1, t2 ) IS NOT NULL GROUP BY c; +MAX(i) c +0 bar +7 foo +drop table t1,t2; |