mirror of
https://github.com/MariaDB/server.git
synced 2025-11-18 07:48:43 +03:00
Merge mysql.com:/home/psergey/mysql-5.0-bug30324
into mysql.com:/home/psergey/mysql-5.1-bug27927 mysql-test/r/type_bit.result: Auto merged mysql-test/t/type_bit.test: Auto merged sql/item_sum.cc: Auto merged
This commit is contained in:
@@ -657,6 +657,21 @@ b
|
||||
#
|
||||
#
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int, b bit(2));
|
||||
INSERT INTO t1 VALUES (3, 2), (2, 3), (2, 0), (3, 2), (3, 1);
|
||||
SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a;
|
||||
COUNT(DISTINCT b)
|
||||
2
|
||||
2
|
||||
DROP TABLE t1;
|
||||
create table t2 (a int, b bit(2), c char(10));
|
||||
INSERT INTO t2 VALUES (3, 2, 'two'), (2, 3, 'three'), (2, 0, 'zero'),
|
||||
(3, 2, 'two'), (3, 1, 'one');
|
||||
SELECT COUNT(DISTINCT b,c) FROM t2 GROUP BY a;
|
||||
COUNT(DISTINCT b,c)
|
||||
2
|
||||
2
|
||||
DROP TABLE t2;
|
||||
End of 5.0 tests
|
||||
create table t1(a bit(7));
|
||||
insert into t1 values(0x40);
|
||||
|
||||
@@ -304,6 +304,20 @@ SELECT b FROM t1 GROUP BY b;
|
||||
--disable_metadata
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# BUG#30324 Wrong query result for COUNT(DISTINCT(bit_column))
|
||||
#
|
||||
CREATE TABLE t1 (a int, b bit(2));
|
||||
INSERT INTO t1 VALUES (3, 2), (2, 3), (2, 0), (3, 2), (3, 1);
|
||||
SELECT COUNT(DISTINCT b) FROM t1 GROUP BY a;
|
||||
DROP TABLE t1;
|
||||
|
||||
create table t2 (a int, b bit(2), c char(10));
|
||||
INSERT INTO t2 VALUES (3, 2, 'two'), (2, 3, 'three'), (2, 0, 'zero'),
|
||||
(3, 2, 'two'), (3, 1, 'one');
|
||||
SELECT COUNT(DISTINCT b,c) FROM t2 GROUP BY a;
|
||||
DROP TABLE t2;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user