summaryrefslogtreecommitdiff
path: root/mysql-test/t/group_min_max.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/group_min_max.test')
-rw-r--r--mysql-test/t/group_min_max.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test
index 981be3efece..c09a4fbf490 100644
--- a/mysql-test/t/group_min_max.test
+++ b/mysql-test/t/group_min_max.test
@@ -1018,3 +1018,18 @@ DROP TABLE t;
--echo End of 5.0 tests
+
+--echo #
+--echo # Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in
+--echo # server crash
+--echo #
+
+CREATE TABLE t (a INT, b INT, INDEX (a,b));
+INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
+INSERT INTO t SELECT * FROM t;
+
+SELECT a, MAX(b) FROM t WHERE b GROUP BY a;
+
+DROP TABLE t;
+
+--echo End of 5.1 tests