summaryrefslogtreecommitdiff
path: root/mysql-test/t/group_by.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/group_by.test')
-rw-r--r--mysql-test/t/group_by.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index e3cf3ca856d..5b96213034a 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1139,4 +1139,22 @@ DROP TABLE t1;
SET @@sql_mode = @old_sql_mode;
+#
+# Bug#42567 Invalid GROUP BY error
+#
+
+# Setup of the subtest
+SET @old_sql_mode = @@sql_mode;
+SET @@sql_mode='ONLY_FULL_GROUP_BY';
+
+CREATE TABLE t1(i INT);
+INSERT INTO t1 VALUES (1), (10);
+
+# The actual test
+SELECT COUNT(i) FROM t1;
+SELECT COUNT(i) FROM t1 WHERE i > 1;
+
+# Cleanup of subtest
+DROP TABLE t1;
+SET @@sql_mode = @old_sql_mode;