diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_float.result | 15 | ||||
-rw-r--r-- | mysql-test/t/type_float.test | 13 |
2 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 6b124caac14..c10cb7d71f7 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -225,6 +225,21 @@ select * from t1 where reckey=1.09E2; reckey recdesc 109 Has 109 as key drop table t1; +create table t1 (d double(10,1)); +create table t2 (d double(10,9)); +insert into t1 values ("100000000.0"); +insert into t2 values ("1.23456780"); +create table t3 select * from t2 union select * from t1; +select * from t3; +d +1.234567800 +100000000.000000000 +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `d` double(22,9) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1, t2, t3; create table t1 (s1 float(0,2)); ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1'). create table t1 (s1 float(1,2)); diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test index cf2a2676ab0..6a0814ef113 100644 --- a/mysql-test/t/type_float.test +++ b/mysql-test/t/type_float.test @@ -146,6 +146,19 @@ select * from t1 where reckey=109; select * from t1 where reckey=1.09E2; drop table t1; +# +# Bug #13372 (decimal union) +# +create table t1 (d double(10,1)); +create table t2 (d double(10,9)); +insert into t1 values ("100000000.0"); +insert into t2 values ("1.23456780"); +create table t3 select * from t2 union select * from t1; +select * from t3; +show create table t3; +drop table t1, t2, t3; + + # End of 4.1 tests # |