summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-08-24 22:11:23 +0000
committerunknown <evgen@moonbone.local>2007-08-24 22:11:23 +0000
commite19f49ae5e91fb74f9f54779f0df1ad8577e5109 (patch)
tree36db396ce71ba2796fdec7a32f347f4f33925b31 /mysql-test
parent294a43ec5e8644e197620a18371ca3c920f6bb5b (diff)
parentd280a06e36b04d245ad26126c5f0466d21726146 (diff)
downloadmariadb-git-e19f49ae5e91fb74f9f54779f0df1ad8577e5109.tar.gz
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into moonbone.local:/mnt/gentoo64/work/30245-bug-5.0-opt-mysql sql/sql_select.cc: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/type_bit.result15
-rw-r--r--mysql-test/t/type_bit.test13
2 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index 7c765d6d50b..5356f7e0712 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -642,4 +642,19 @@ b+0 COUNT(DISTINCT a)
1 1
3 2
DROP TABLE t1;
+CREATE TABLE t1 (b BIT);
+INSERT INTO t1 (b) VALUES (1), (0);
+SELECT DISTINCT b FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 b b 16 1 1 Y 32 0 63
+b
+#
+#
+SELECT b FROM t1 GROUP BY b;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 b b 16 1 1 Y 32 0 63
+b
+#
+#
+DROP TABLE t1;
End of 5.0 tests
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index 6423d017afb..66538f59c6f 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -291,4 +291,17 @@ 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;
+#
+# Bug#30245: A wrong type of a BIT field is reported when grouped by it.
+#
+CREATE TABLE t1 (b BIT);
+INSERT INTO t1 (b) VALUES (1), (0);
+--enable_metadata
+--replace_column 1 #
+SELECT DISTINCT b FROM t1;
+--replace_column 1 #
+SELECT b FROM t1 GROUP BY b;
+--disable_metadata
+DROP TABLE t1;
+
--echo End of 5.0 tests