summaryrefslogtreecommitdiff
path: root/mysql-test/t/count_distinct.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/count_distinct.test')
-rw-r--r--mysql-test/t/count_distinct.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/count_distinct.test b/mysql-test/t/count_distinct.test
index d0996689aeb..10b4ac6f0e7 100644
--- a/mysql-test/t/count_distinct.test
+++ b/mysql-test/t/count_distinct.test
@@ -96,3 +96,14 @@ insert into t1 values (0,1),(1,2);
select count(distinct if(f1,3,f2)) from t1;
drop table t1;
+#
+# Bug #51980 "mysqld service crashes with a simple COUNT(DISTINCT) query
+# over a view"
+#
+
+create table t1 (i int);
+insert into t1 values (0), (1);
+create view v1 as select * from t1;
+select count(distinct i) from v1;
+drop table t1;
+drop view v1;