From 22657f672c8d4c005f85cd3efc714d98b635f3f0 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 14 Mar 2004 17:25:20 +0100 Subject: my_strtod fixes: sigsegv protection (exp overflow) don't return inf! use errno=EOVERFLOW to signal an overflow (as my_strntod uses errno anyway) if errno will be too slow, my_strtod can be changed to return overflow status in a parameter (like my_strntod does) include/m_string.h: EOVERFLOW mysql-test/r/insert.result: updated mysql-test/r/mysqldump.result: updated strings/strtod.c: sigsegv protection (exp overflow) don't return inf! use errno=EOVERFLOW to signal an overflow (as my_strntod uses errno anyway) if errno will be too slow, it my_strtod can be changed to return overflow status in a parameter (like my_strntod does) --- mysql-test/r/insert.result | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'mysql-test/r/insert.result') diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 6602704ccec..9c066d67af1 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -169,7 +169,6 @@ set @value= "1e+1111111111a"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1265 Data truncated for column 'f_double ' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double ' at row 1 Warning 1265 Data truncated for column 'f_float ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float ' at row 1 Warning 1265 Data truncated for column 'f_double_7_2 ' at row 1 @@ -177,7 +176,6 @@ Warning 1264 Data truncated, out of range for column 'f_double_7_2 ' at row 1 Warning 1265 Data truncated for column 'f_float_4_3 ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float_4_3 ' at row 1 Warning 1265 Data truncated for column 'f_double_u ' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_u ' at row 1 Warning 1265 Data truncated for column 'f_float_u ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float_u ' at row 1 Warning 1265 Data truncated for column 'f_double_15_1_u ' at row 1 @@ -199,7 +197,6 @@ set @value= "-1e+1111111111a"; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: Warning 1265 Data truncated for column 'f_double ' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double ' at row 1 Warning 1265 Data truncated for column 'f_float ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float ' at row 1 Warning 1265 Data truncated for column 'f_double_7_2 ' at row 1 @@ -228,17 +225,15 @@ f_float_3_1_u 0.0 set @value= 1e+1111111111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated, out of range for column 'f_double ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float ' at row 1 Warning 1264 Data truncated, out of range for column 'f_double_7_2 ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float_4_3 ' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_u ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float_u ' at row 1 Warning 1264 Data truncated, out of range for column 'f_double_15_1_u ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float_3_1_u ' at row 1 select * from t1 where `number `=last_insert_id(); number 6 -original_value inf +original_value 1.7976931348623e+308 f_double 1.79769313486232e+308 f_float 3.40282e+38 f_double_7_2 99999.99 @@ -250,7 +245,6 @@ f_float_3_1_u 99.9 set @value= -1e+1111111111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated, out of range for column 'f_double ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float ' at row 1 Warning 1264 Data truncated, out of range for column 'f_double_7_2 ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float_4_3 ' at row 1 @@ -260,7 +254,7 @@ Warning 1264 Data truncated, out of range for column 'f_double_15_1_u ' at row 1 Warning 1264 Data truncated, out of range for column 'f_float_3_1_u ' at row 1 select * from t1 where `number `=last_insert_id(); number 7 -original_value -inf +original_value -1.7976931348623e+308 f_double -1.79769313486232e+308 f_float -3.40282e+38 f_double_7_2 -99999.99 -- cgit v1.2.1