summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 463b3f39baa..495b6002986 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -4129,3 +4129,26 @@ DROP TABLE t1;
--echo End of 5.1 tests
+
+--echo #
+--echo # Bug#54515: Crash in opt_range.cc::get_best_group_min_max on
+--echo # SELECT from VIEW with GROUP BY
+--echo #
+
+CREATE TABLE t1 (
+ col_int_key int DEFAULT NULL,
+ KEY int_key (col_int_key)
+) ;
+
+INSERT INTO t1 VALUES (1),(2);
+
+CREATE VIEW view_t1 AS
+ SELECT t1.col_int_key AS col_int_key
+ FROM t1;
+
+SELECT col_int_key FROM view_t1 GROUP BY col_int_key;
+
+DROP VIEW view_t1;
+DROP TABLE t1;
+
+--echo # End of test BUG#54515