~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_group.result

  • Committer: Vladimir Kolesnikov
  • Date: 2009-03-25 09:18:25 UTC
  • mto: (968.2.17 mordred)
  • mto: This revision was merged to the branch mainline in revision 971.
  • Revision ID: vladimir@primebase.org-20090325091825-gnw5opo5xtprd6k0
test generalizations

Show diffs side-by-side

added added

removed removed

Lines of Context:
593
593
Table   Create Table
594
594
t1      CREATE TABLE `t1` (
595
595
  `a` varchar(1) DEFAULT NULL
596
 
) ENGINE=InnoDB
 
596
) ENGINE=DEFAULT
597
597
create table t2 select max(a),min(a) from t1;
598
598
show create table t2;
599
599
Table   Create Table
600
600
t2      CREATE TABLE `t2` (
601
601
  `max(a)` varchar(1) DEFAULT NULL,
602
602
  `min(a)` varchar(1) DEFAULT NULL
603
 
) ENGINE=InnoDB
 
603
) ENGINE=DEFAULT
604
604
drop table t2;
605
605
create table t2 select concat(a) from t1;
606
606
show create table t2;
607
607
Table   Create Table
608
608
t2      CREATE TABLE `t2` (
609
609
  `concat(a)` varchar(1) DEFAULT NULL
610
 
) ENGINE=InnoDB
 
610
) ENGINE=DEFAULT
611
611
drop table t2,t1;
612
612
create table t1 (a int);
613
613
insert into t1 values (1);
679
679
Table   Create Table
680
680
t2      CREATE TABLE `t2` (
681
681
  `MAX(b)` datetime DEFAULT NULL
682
 
) ENGINE=InnoDB
 
682
) ENGINE=DEFAULT
683
683
drop table t1, t2;
684
684
create table t1(f1 datetime);
685
685
insert into t1 values (now());
844
844
(3,3,1), (3,3,2), (3,3,3);
845
845
SELECT b/c as v, a FROM t1 ORDER BY v;
846
846
v       a
847
 
0.33333 3
848
847
0.33333 1
849
848
0.33333 2
 
849
0.33333 3
850
850
0.50000 1
851
851
0.50000 2
852
852
0.50000 3
 
853
0.66667 1
853
854
0.66667 2
854
 
0.66667 1
855
855
0.66667 3
856
 
1.00000 3
857
 
1.00000 2
858
 
1.00000 3
859
 
1.00000 1
860
 
1.00000 2
861
 
1.00000 3
862
 
1.00000 2
863
 
1.00000 1
864
 
1.00000 1
 
856
1.00000 1
 
857
1.00000 1
 
858
1.00000 1
 
859
1.00000 2
 
860
1.00000 2
 
861
1.00000 2
 
862
1.00000 3
 
863
1.00000 3
 
864
1.00000 3
 
865
1.50000 1
 
866
1.50000 2
865
867
1.50000 3
866
 
1.50000 2
867
 
1.50000 1
868
868
2.00000 1
 
869
2.00000 2
869
870
2.00000 3
870
 
2.00000 2
 
871
3.00000 1
 
872
3.00000 2
871
873
3.00000 3
872
 
3.00000 2
873
 
3.00000 1
874
874
SELECT b/c as v, SUM(a) FROM t1 GROUP BY v;
875
875
v       SUM(a)
876
876
0.33333 6
907
907
Table   Create Table
908
908
t1      CREATE TABLE `t1` (
909
909
  `variance(0)` double(8,4) DEFAULT NULL
910
 
) ENGINE=InnoDB
 
910
) ENGINE=DEFAULT
911
911
drop table t1;
912
912
create table t1 select stddev(0);
913
913
show create table t1;
914
914
Table   Create Table
915
915
t1      CREATE TABLE `t1` (
916
916
  `stddev(0)` double(8,4) DEFAULT NULL
917
 
) ENGINE=InnoDB
 
917
) ENGINE=DEFAULT
918
918
drop table t1;
919
919
create table bug22555 (i int primary key auto_increment, s1 int, s2 int, e decimal(30,10), o double);
920
920
insert into bug22555 (s1, s2, e, o) values (53, 78, 11.4276528, 6.828112), (17, 78, 5.916793, 1.8502951), (18, 76, 2.679231, 9.17975591), (31, 62, 6.07831, 0.1), (19, 41, 5.37463, 15.1), (83, 73, 14.567426, 7.959222), (92, 53, 6.10151, 13.1856852), (7, 12, 13.92272, 3.442007), (92, 35, 11.95358909, 6.01376678), (38, 84, 2.572, 7.904571);