diff options
author | ramil/ram@ramil.myoffice.izhnet.ru <> | 2007-10-15 10:28:58 +0500 |
---|---|---|
committer | ramil/ram@ramil.myoffice.izhnet.ru <> | 2007-10-15 10:28:58 +0500 |
commit | 71775c2432b71e8213c109c7f936cfbc16e388b2 (patch) | |
tree | 3ae4168763b293b1cd562cac653a5a212773cfab /mysql-test | |
parent | 4d44d8b316717d46a744e7d09ad37443d10ed65c (diff) | |
parent | 84d1e3f8f045639f1d501dc62092f1a2a162ed67 (diff) | |
download | mariadb-git-71775c2432b71e8213c109c7f936cfbc16e388b2.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/home/ram/work/b31154/b31154.5.0
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_gconcat.result | 42 | ||||
-rw-r--r-- | mysql-test/t/func_gconcat.test | 28 |
2 files changed, 70 insertions, 0 deletions
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 35487c25ae3..73f756bc1d2 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -819,4 +819,46 @@ id group_concat(b.name) 1 óra,óra 2 óra,óra drop table t1; +create table t1(a bit not null); +insert into t1 values (), (), (); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +select group_concat(distinct a) from t1; +group_concat(distinct a) +0 +select group_concat(distinct a order by a) from t1; +group_concat(distinct a order by a) +0 +drop table t1; +create table t1(a bit(2) not null); +insert into t1 values (1), (0), (0), (3), (1); +select group_concat(distinct a) from t1; +group_concat(distinct a) +1,0,3 +select group_concat(distinct a order by a) from t1; +group_concat(distinct a order by a) +0,1,3 +select group_concat(distinct a order by a desc) from t1; +group_concat(distinct a order by a desc) +3,1,0 +drop table t1; +create table t1(a bit(2), b varchar(10), c bit); +insert into t1 values (1, 'a', 0), (0, 'b', 1), (0, 'c', 0), (3, 'd', 1), +(1, 'e', 1), (3, 'f', 1), (0, 'g', 1); +select group_concat(distinct a, c) from t1; +group_concat(distinct a, c) +10,01,00,31,11 +select group_concat(distinct a, c order by a) from t1; +group_concat(distinct a, c order by a) +00,01,11,10,31 +select group_concat(distinct a, c) from t1; +group_concat(distinct a, c) +10,01,00,31,11 +select group_concat(distinct a, c order by a, c) from t1; +group_concat(distinct a, c order by a, c) +00,01,10,11,31 +select group_concat(distinct a, c order by a desc, c desc) from t1; +group_concat(distinct a, c order by a desc, c desc) +31,11,10,01,00 +drop table t1; End of 5.0 tests diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index ff3ba951870..c415ca6c6eb 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -562,4 +562,32 @@ insert into t1 (id, name) values (2, "óra"); select b.id, group_concat(b.name) from t1 a, t1 b group by b.id; drop table t1; +# +# Bug #31154: group_concat() and bit fields; +# +create table t1(a bit not null); +insert into t1 values (), (), (); +select group_concat(distinct a) from t1; +select group_concat(distinct a order by a) from t1; +drop table t1; + +create table t1(a bit(2) not null); +insert into t1 values (1), (0), (0), (3), (1); +select group_concat(distinct a) from t1; +select group_concat(distinct a order by a) from t1; +select group_concat(distinct a order by a desc) from t1; +drop table t1; + +create table t1(a bit(2), b varchar(10), c bit); +insert into t1 values (1, 'a', 0), (0, 'b', 1), (0, 'c', 0), (3, 'd', 1), +(1, 'e', 1), (3, 'f', 1), (0, 'g', 1); +select group_concat(distinct a, c) from t1; +select group_concat(distinct a, c order by a) from t1; +select group_concat(distinct a, c) from t1; +select group_concat(distinct a, c order by a, c) from t1; +select group_concat(distinct a, c order by a desc, c desc) from t1; + +drop table t1; + + --echo End of 5.0 tests |