summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2007-08-05 14:21:36 -0700
committerunknown <igor@olga.mysql.com>2007-08-05 14:21:36 -0700
commite106b09ad3509991e8e4cd286c14135486363400 (patch)
tree3e83b7c9d79d4eaee09153ef3705aec38290d416 /mysql-test/t
parent983cda8d36be587827a3ddfdd86ddcf91630fb29 (diff)
parent4e6e122061b71f9378a161793367ae5120310ed4 (diff)
downloadmariadb-git-e106b09ad3509991e8e4cd286c14135486363400.tar.gz
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug30219
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/type_bit.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index 48ad24ff6b7..2c7f87f342d 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -272,4 +272,28 @@ handler t1 read a=(1);
handler t1 close;
drop table t1;
+#
+# Bug #30219: GROUP BY a column of the BIT type
+#
+
+CREATE TABLE t1 (b BIT(2));
+INSERT INTO t1 (b) VALUES (1), (3), (0), (3);
+SELECT b+0, COUNT(DISTINCT b) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
+CREATE TABLE t1 (b BIT(2), a VARCHAR(5));
+INSERT INTO t1 (b, a) VALUES (1, "x"), (3, "zz"), (0, "y"), (3, "z");
+SELECT b+0, COUNT(DISTINCT a) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a CHAR(5), b BIT(2));
+INSERT INTO t1 (b, a) VALUES (1, "x"), (3, "zz"), (0, "y"), (3, "z");
+SELECT b+0, COUNT(DISTINCT a) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a INT, b BIT(2));
+INSERT INTO t1 (b, a) VALUES (1, 1), (3, 2), (0, 3), (3, 4);
+SELECT b+0, COUNT(DISTINCT a) FROM t1 GROUP BY b;
+DROP TABLE t1;
+
--echo End of 5.0 tests