summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorigor@rurik.mysql.com <>2005-06-16 09:49:04 -0700
committerigor@rurik.mysql.com <>2005-06-16 09:49:04 -0700
commitdeaf7f96088c14d7368e81701e6a300203e28530 (patch)
tree8ff460f603ae9b56fc2aace13d5be5ae07af9db3 /mysql-test
parent869882f321f64914d828be8f2f4f4473b75d8d4a (diff)
parent2095758a9da939a5aa5d53dcd7879df5e9bc0b96 (diff)
downloadmariadb-git-deaf7f96088c14d7368e81701e6a300203e28530.tar.gz
Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/group_by.result10
-rw-r--r--mysql-test/t/group_by.test15
2 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 3e082fa04e3..ee4b6a31f2f 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -722,3 +722,13 @@ WHERE hostname LIKE '%aol%'
GROUP BY hostname;
hostname no
cache-dtc-af05.proxy.aol.com 1
+DROP TABLE t1;
+CREATE TABLE t1 (a int, b int);
+INSERT INTO t1 VALUES (1,2), (1,3);
+SELECT a, b FROM t1 GROUP BY 'const';
+a b
+1 2
+SELECT DISTINCT a, b FROM t1 GROUP BY 'const';
+a b
+1 2
+DROP TABLE t1;
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index 21d5abcc287..f9d113a9c50 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1,3 +1,4 @@
+
# Initialise
--disable_warnings
drop table if exists t1,t2,t3;
@@ -524,7 +525,7 @@ select min(b) from t1;
drop table t1;
#
-# Test for bug #11088: GROUP BY a BLOB colimn with COUNT(DISTINCT column1)
+# Test for bug #11088: GROUP BY a BLOB column with COUNT(DISTINCT column1)
#
CREATE TABLE t1 (id int PRIMARY KEY, user_id int, hostname longtext);
@@ -539,3 +540,15 @@ SELECT hostname, COUNT(DISTINCT user_id) as no FROM t1
WHERE hostname LIKE '%aol%'
GROUP BY hostname;
+DROP TABLE t1;
+
+#
+# Test for bug #8614: GROUP BY 'const with DISTINCT
+#
+
+CREATE TABLE t1 (a int, b int);
+INSERT INTO t1 VALUES (1,2), (1,3);
+SELECT a, b FROM t1 GROUP BY 'const';
+SELECT DISTINCT a, b FROM t1 GROUP BY 'const';
+
+DROP TABLE t1;