summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_group.result
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2004-10-05 17:02:09 +0400
committerunknown <gluh@gluh.mysql.r18.ru>2004-10-05 17:02:09 +0400
commit08e56fae9887d3adc4a3c3c1c351f7a3c388573f (patch)
tree25ad61fcdcd34b83a4c13a89711f10475e0922f7 /mysql-test/r/func_group.result
parentab5c7a9e0e57fdfd75be02959165eb4555841d6a (diff)
downloadmariadb-git-08e56fae9887d3adc4a3c3c1c351f7a3c388573f.tar.gz
Fix for bug #5555: "GROUP BY enum_field" returns incorrect results
Diffstat (limited to 'mysql-test/r/func_group.result')
-rw-r--r--mysql-test/r/func_group.result26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 011a47874c2..c25f89d4df3 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -693,3 +693,29 @@ SELECT MIN(a) FROM t1 WHERE a < 0;
MIN(a)
NULL
DROP TABLE t1;
+CREATE TABLE t1 (
+id int(10) unsigned NOT NULL auto_increment,
+val enum('one','two','three') NOT NULL default 'one',
+PRIMARY KEY (id)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+INSERT INTO t1 VALUES
+(1,'one'),(2,'two'),(3,'three'),(4,'one'),(5,'two');
+select val, count(*) from t1 group by val;
+val count(*)
+one 2
+two 2
+three 1
+drop table t1;
+CREATE TABLE t1 (
+id int(10) unsigned NOT NULL auto_increment,
+val set('one','two','three') NOT NULL default 'one',
+PRIMARY KEY (id)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+INSERT INTO t1 VALUES
+(1,'one'),(2,'two'),(3,'three'),(4,'one'),(5,'two');
+select val, count(*) from t1 group by val;
+val count(*)
+one 2
+two 2
+three 1
+drop table t1;