summaryrefslogtreecommitdiff
path: root/mysql-test/t/null.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-02-22 19:55:43 +0100
committerSergei Golubchik <serg@mariadb.org>2016-02-23 10:54:36 +0100
commit20c4dfd4a9e7c5f2f570488a7ead0b7c74e61817 (patch)
tree33e73afca64b9a387bf77a7ac5d5ad57b146b0da /mysql-test/t/null.test
parent216b5cc9b6434d501f9aaee9716f5b2983ba38c8 (diff)
downloadmariadb-git-20c4dfd4a9e7c5f2f570488a7ead0b7c74e61817.tar.gz
MDEV-9576 syntax error on view with nullif and count
don't transform Item_func_nullif if it's context_analysis_only
Diffstat (limited to 'mysql-test/t/null.test')
-rw-r--r--mysql-test/t/null.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test
index b60f11ab534..8857195d0e1 100644
--- a/mysql-test/t/null.test
+++ b/mysql-test/t/null.test
@@ -949,6 +949,15 @@ EXPLAIN EXTENDED SELECT NULLIF(AVG(a),0) FROM t1;
DROP TABLE t1;
+#
+# MDEV-9576 syntax error on view with nullif and count
+#
+create table t1 (col1 varchar(50));
+create view v1 AS select nullif(count(distinct col1),0) from t1;
+show create view v1;
+drop view v1;
+drop table t1;
+
--echo #
--echo # End of 10.1 tests
--echo #