mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
BUG
correct bug 1085 (a problem with min/max functions) add tests of bugs 833,836,1085 mysql-test/r/func_gconcat.result: add tests of bugs 833, 836, 1085 mysql-test/t/func_gconcat.test: add tests of bugs #833, 836, 1085 sql/item_sum.cc: merge sql/item_sum.h: correct bug 1085
This commit is contained in:
@ -167,6 +167,11 @@ t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
REQ_ID URL
|
||||
1 X
|
||||
5 X,X,X
|
||||
select REQ_ID, Group_Concat(URL) as URL, Min(t1.URL_ID) urll,
|
||||
Max(t1.URL_ID)
|
||||
urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID;
|
||||
REQ_ID URL urll urlg
|
||||
1 X 4 4
|
||||
5 X,X,X 4 5
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
@ -178,3 +183,16 @@ select distinct ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') a
|
||||
select distinct ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'with distinct: cutoff at length of shortname' from t1;
|
||||
with distinct: cutoff at length of shortname
|
||||
1:longername,1:evenlongername
|
||||
drop table t1;
|
||||
create table t1(id int);
|
||||
create table t2(id int);
|
||||
insert into t1 values(0),(1);
|
||||
select group_concat(t1.id) FROM t1,t2;
|
||||
group_concat(t1.id)
|
||||
NULL
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
create table t1 (bar varchar(32));
|
||||
insert into t1 values('test'),('test2');
|
||||
select * from t1 having group_concat(bar)='';
|
||||
bar
|
||||
|
Reference in New Issue
Block a user