From 9988eecd45c1b6237ed352a7c95f37d19fa25aa1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 Mar 2004 21:08:14 +0400 Subject: 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' --- mysql-test/t/insert.test | 85 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) (limited to 'mysql-test/t/insert.test') 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; -- cgit v1.2.1