~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_group.test

Merge Joe, plus I updated the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
# The following returned NULL in 4.0.10
121
121
select min(a2) from t1;
122
122
select max(t1.a1), max(t2.a2) from t1, t2;
123
 
select max(t1.a1) from t1, t2 where t1.a1 > 0;
 
123
select max(t1.a1) from t1, t2;
124
124
select max(t2.a2), max(t1.a1) from t1, t2;
125
125
 
126
126
explain select min(a2) from t1;
128
128
 
129
129
insert into t2 values('AAA', 10, 0.5);
130
130
insert into t2 values('BBB', 20, 1.0);
131
 
--sorted_result
132
 
select t1.a1, t1.a2, t2.a1, t2.a2 from t1,t2 where t1.a1 > 0;
 
131
select t1.a1, t1.a2, t2.a1, t2.a2 from t1,t2;
133
132
 
134
133
select max(t1.a1), max(t2.a1) from t1, t2 where t2.a2=9;
135
134
select max(t2.a1), max(t1.a1) from t1, t2 where t2.a2=9;
355
354
#select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID = 1 group by MAX_REQ;
356
355
#drop table t1;
357
356
 
 
357
 
 
358
create table t1 (a char(10));
 
359
insert into t1 values ('a'),('b'),('c');
 
360
select coercibility(max(a)) from t1;
 
361
drop table t1;
 
362
 
358
363
#
359
364
# Bug #6658 MAX(column) returns incorrect coercibility
360
365
#
630
635
CREATE TABLE t2 (a INT PRIMARY KEY, b INT);
631
636
INSERT INTO t2 VALUES (1,1), (3,3);
632
637
 
633
 
--sorted_result
634
638
SELECT 
635
639
  (SELECT SUM(c.a) FROM t1 ttt, t2 ccc 
636
640
   WHERE ttt.a = ccc.b AND ttt.a = t.a GROUP BY ttt.a) AS minid