~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_gconcat.test

  • Committer: Moriyoshi Koizumi
  • Date: 2008-11-15 18:36:31 UTC
  • mto: (584.1.5 devel)
  • mto: This revision was merged to the branch mainline in revision 588.
  • Revision ID: mozo@mozo.jp-20081115183631-81d0clowyot42mk7
Incorporating changes proposed by mtaylor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
# Test errors
71
71
 
72
 
--error ER_INVALID_GROUP_FUNC_USE
 
72
--error 1111
73
73
select group_concat(sum(c)) from t1 group by grp;
74
 
--error ER_BAD_FIELD_ERROR
 
74
--error 1054
75
75
select grp,group_concat(c order by 2) from t1 group by grp;
76
76
 
77
77
drop table t1;
104
104
create table t1(id int);
105
105
create table t2(id int);
106
106
insert into t1 values(0),(1);
107
 
select group_concat(t1.id) FROM t1,t2 where t2.id < 2;
 
107
select group_concat(t1.id) FROM t1,t2;
108
108
drop table t1;
109
109
drop table t2;
110
110
 
190
190
CREATE TABLE t2 ( a int );
191
191
INSERT INTO t1 VALUES (1), (2);
192
192
INSERT INTO t2 VALUES (1), (2);
193
 
SELECT GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a) FROM t1, t2 WHERE t1.a < 3 GROUP BY t1.a;
 
193
SELECT GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a) FROM t1, t2 GROUP BY t1.a;
194
194
DROP TABLE t1, t2;
195
195
 
196
196
#
272
272
select collation(a) from t1;
273
273
select collation(group_concat(a)) from t1;
274
274
create table t2 select group_concat(a) as a from t1;
275
 
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
276
275
show create table t2;
277
276
select collation(group_concat(a,b)) from t1;
278
277
drop table t1;
451
450
  x text not null,
452
451
  y integer not null
453
452
);
454
 
insert into t1 values (repeat('a', 1022), 0), (repeat( 0xc3b7, 4), 0);
 
453
insert into t1 values (repeat('a', 1022), 0), (repeat(_utf8 0xc3b7, 4), 0);
455
454
let $1= 10;
456
455
while ($1)
457
456
{
602
601
 FROM
603
602
  t1 AS t1,
604
603
  t1 AS t2
605
 
 WHERE t2.a IS NULL
606
604
 GROUP BY 1
607
605
) AS s1;
608
606
DROP TABLE t1;