diff options
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/cast.result | 4 | ||||
-rw-r--r-- | mysql-test/r/range.result | 4 | ||||
-rw-r--r-- | mysql-test/r/select.result | 17 | ||||
-rw-r--r-- | mysql-test/r/type_enum.result | 25 | ||||
-rw-r--r-- | mysql-test/r/type_float.result | 71 |
5 files changed, 119 insertions, 2 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 101b9ac3f7e..23c38bb792c 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -278,3 +278,7 @@ double_val cast_val -1e+30 -9223372036854775808 1e+30 9223372036854775807 DROP TABLE t1; +select isnull(date(NULL)), isnull(cast(NULL as DATE)); +isnull(date(NULL)) isnull(cast(NULL as DATE)) +1 1 +End of 4.1 tests diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 2125f237d0e..4d6cafb61d1 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -504,8 +504,8 @@ select count(*) from t1 where x = 18446744073709551601; count(*) 1 create table t2 (x bigint not null); -insert into t2(x) values (0xfffffffffffffff0); -insert into t2(x) values (0xfffffffffffffff1); +insert into t2(x) values (-16); +insert into t2(x) values (-15); select * from t2; x -16 diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index f09143fcaa6..6dc971a953c 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2819,3 +2819,20 @@ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) 0.37619999051094 DROP TABLE t1,t2; +create table t1(a bigint unsigned, b bigint); +insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), +(0x10000000000000000, 0x10000000000000000), +(0x8fffffffffffffff, 0x8fffffffffffffff); +Warnings: +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'b' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'b' at row 2 +Warning 1264 Data truncated; out of range for column 'b' at row 3 +select hex(a), hex(b) from t1; +hex(a) hex(b) +FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +8FFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF +drop table t1; +End of 4.1 tests diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result index 0fe3f674fba..b5ec72ffe5a 100644 --- a/mysql-test/r/type_enum.result +++ b/mysql-test/r/type_enum.result @@ -1754,3 +1754,28 @@ t1 CREATE TABLE `t1` ( `f2` enum('') default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +create table t1(russian enum('E','F','EF','FE') NOT NULL DEFAULT'E'); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `russian` enum('E','F','EF','FE') NOT NULL default 'E' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1(denormal enum('E','F','E,F','F,E') NOT NULL DEFAULT'E'); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `denormal` enum('E','F','E,F','F,E') NOT NULL default 'E' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1(russian_deviant enum('E','F','EF','F,E') NOT NULL DEFAULT'E'); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `russian_deviant` enum('E','F','EF','F,E') NOT NULL default 'E' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ',' +
!"','#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~','xx\','yy\','zz')); +ERROR 42000: Field separator argument is not what is expected; check the manual +End of 4.1 tests diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index f157bbc602d..3e66fa70dc1 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -278,4 +278,75 @@ select 1e-308, 1.00000001e-300, 100000000e-300; select 10e307; 10e307 1e+308 +create table t1(a int, b double(8, 2)); +insert into t1 values +(1, 28.50), (1, 121.85), (1, 157.23), (1, 1351.00), (1, -1965.35), (1, 81.75), +(1, 217.08), (1, 7.94), (4, 96.07), (4, 6404.65), (4, -6500.72), (2, 100.00), +(5, 5.00), (5, -2104.80), (5, 2033.80), (5, 0.07), (5, 65.93), +(3, -4986.24), (3, 5.00), (3, 4857.34), (3, 123.74), (3, 0.16), +(6, -1695.31), (6, 1003.77), (6, 499.72), (6, 191.82); +explain select sum(b) s from t1 group by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 26 Using temporary; Using filesort +select sum(b) s from t1 group by a; +s +0.00 +100.00 +0.00 +-0.00 +-0.00 +0.00 +select sum(b) s from t1 group by a having s <> 0; +s +100.00 +select sum(b) s from t1 group by a having s <> 0 order by s; +s +100.00 +select sum(b) s from t1 group by a having s <=> 0; +s +0.00 +0.00 +-0.00 +-0.00 +0.00 +select sum(b) s from t1 group by a having s <=> 0 order by s; +s +-0.00 +-0.00 +0.00 +0.00 +0.00 +alter table t1 add key (a, b); +explain select sum(b) s from t1 group by a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 14 NULL 26 Using index +select sum(b) s from t1 group by a; +s +0.00 +100.00 +0.00 +-0.00 +0.00 +0.00 +select sum(b) s from t1 group by a having s <> 0; +s +100.00 +select sum(b) s from t1 group by a having s <> 0 order by s; +s +100.00 +select sum(b) s from t1 group by a having s <=> 0; +s +0.00 +0.00 +-0.00 +0.00 +0.00 +select sum(b) s from t1 group by a having s <=> 0 order by s; +s +-0.00 +0.00 +0.00 +0.00 +0.00 +drop table t1; End of 4.1 tests |