diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2004-03-04 21:08:14 +0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2004-03-04 21:08:14 +0400 |
commit | 9988eecd45c1b6237ed352a7c95f37d19fa25aa1 (patch) | |
tree | f8d4d3bb4447a1e08ce9a2e62100aee706410a62 /mysql-test/t/insert.test | |
parent | b0fbdfd0bffb13827cdd014064289efffbac4c1b (diff) | |
download | mariadb-git-9988eecd45c1b6237ed352a7c95f37d19fa25aa1.tar.gz |
Fixed bug #2082 'mysqldump converts "inf" to NULL' and
added commands vertical_results and horisontal_results to client/mysqltest.c
client/mysqltest.c:
added commands vertical_results and horisontal_results
mysql-test/r/insert.result:
added test for bug #2082 'mysqldump converts "inf" to NULL'
mysql-test/t/insert.test:
Fixed bug #2082 'mysqldump converts "inf" to NULL'
sql/field.cc:
added test for Fixed bug #2082 'mysqldump converts "inf" to NULL'
Diffstat (limited to 'mysql-test/t/insert.test')
-rw-r--r-- | mysql-test/t/insert.test | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test index 73b5f453bb4..b2fafe10192 100644 --- a/mysql-test/t/insert.test +++ b/mysql-test/t/insert.test @@ -87,3 +87,88 @@ use mysqltest; create table t1 (c int); insert into mysqltest.t1 set mysqltest.t1.c = '1'; drop database mysqltest; + +# +# Test of wrong values for float data (bug #2082) +# +use test; +create table t1( + `number ` int auto_increment primary key, + `original_value ` varchar(50), + `f_double ` double, + `f_float ` float, + `f_double_7_2 ` double(7,2), + `f_float_4_3 ` float (4,3), + `f_double_u ` double unsigned, + `f_float_u ` float unsigned, + `f_double_15_1_u ` double(15,1) unsigned, + `f_float_3_1_u ` float (3,1) unsigned +); + +set @value= "aa"; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= "1aa"; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= "aa1"; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= "1e+1111111111a"; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= "-1e+1111111111a"; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= 1e+1111111111; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= -1e+1111111111; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= 1e+111; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= -1e+111; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= 1; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +set @value= -1; +insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); +vertical_results; +select * from t1 where `number `=last_insert_id(); +horisontal_results; + +drop table t1; |