~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_group.result

  • Committer: Jay Pipes
  • Date: 2009-02-04 15:44:25 UTC
  • mfrom: (829 drizzle)
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090204154425-th8xfk2ujz2y8xwg
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
592
592
show create table t1;
593
593
Table   Create Table
594
594
t1      CREATE TABLE `t1` (
595
 
  `a` varchar(1) DEFAULT NULL
596
 
) ENGINE=DEFAULT
 
595
  `a` varchar(1)
 
596
) ENGINE=InnoDB
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
 
  `max(a)` varchar(1) DEFAULT NULL,
602
 
  `min(a)` varchar(1) DEFAULT NULL
603
 
) ENGINE=DEFAULT
 
601
  `max(a)` varchar(1),
 
602
  `min(a)` varchar(1)
 
603
) ENGINE=InnoDB
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
 
  `concat(a)` varchar(1) DEFAULT NULL
610
 
) ENGINE=DEFAULT
 
609
  `concat(a)` varchar(1)
 
610
) ENGINE=InnoDB
611
611
drop table t2,t1;
612
612
create table t1 (a int);
613
613
insert into t1 values (1);
678
678
show create table t2;
679
679
Table   Create Table
680
680
t2      CREATE TABLE `t2` (
681
 
  `MAX(b)` datetime DEFAULT NULL
682
 
) ENGINE=DEFAULT
 
681
  `MAX(b)` datetime
 
682
) ENGINE=InnoDB
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
847
848
0.33333 1
848
849
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 2
853
854
0.66667 1
854
 
0.66667 2
855
855
0.66667 3
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
 
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
 
865
1.50000 3
 
866
1.50000 2
865
867
1.50000 1
866
 
1.50000 2
867
 
1.50000 3
868
868
2.00000 1
 
869
2.00000 3
869
870
2.00000 2
870
 
2.00000 3
 
871
3.00000 3
 
872
3.00000 2
871
873
3.00000 1
872
 
3.00000 2
873
 
3.00000 3
874
874
SELECT b/c as v, SUM(a) FROM t1 GROUP BY v;
875
875
v       SUM(a)
 
876
0.33333 6
876
877
0.50000 6
 
878
0.66667 6
877
879
1.00000 18
878
880
1.50000 6
879
881
2.00000 6
880
882
3.00000 6
881
 
9999999999.99999        12
882
883
SELECT SUM(a) FROM t1 GROUP BY b/c;
883
884
SUM(a)
884
885
6
 
886
6
 
887
6
885
888
18
886
889
6
887
890
6
888
891
6
889
 
12
890
892
DROP TABLE t1;
891
893
set div_precision_increment= @sav_dpi;
892
894
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
904
906
show create table t1;
905
907
Table   Create Table
906
908
t1      CREATE TABLE `t1` (
907
 
  `variance(0)` double(8,4) DEFAULT NULL
908
 
) ENGINE=DEFAULT
 
909
  `variance(0)` double(8,4)
 
910
) ENGINE=InnoDB
909
911
drop table t1;
910
912
create table t1 select stddev(0);
911
913
show create table t1;
912
914
Table   Create Table
913
915
t1      CREATE TABLE `t1` (
914
 
  `stddev(0)` double(8,4) DEFAULT NULL
915
 
) ENGINE=DEFAULT
 
916
  `stddev(0)` double(8,4)
 
917
) ENGINE=InnoDB
916
918
drop table t1;
917
919
create table bug22555 (i int primary key auto_increment, s1 int, s2 int, e decimal(30,10), o double);
918
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);