From: Date: November 8 2006 5:07pm Subject: bk commit into 4.1 tree (kaa:1.2611) BUG#22129 List-Archive: http://lists.mysql.com/commits/15028 X-Bug: 22129 Message-Id: <20061108160725.CA69D1377D4@polly.local> Below is the list of changes that have just been committed into a local 4.1 repository of kaa. When kaa does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-11-08 19:07:21+03:00, kaa@stripped +2 -0 Removed the underflow check (bug #22129) mysql-test/r/type_float.result@stripped, 2006-11-08 19:07:19+03:00, kaa@stripped +1 -1 Fixed the testcase strings/strtod.c@stripped, 2006-11-08 19:07:19+03:00, kaa@stripped +4 -16 Removed the underflow check # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: kaa # Host: polly.local # Root: /tmp/maint/bug22129/my41-bug22129 --- 1.19/strings/strtod.c 2006-11-08 19:07:25 +03:00 +++ 1.20/strings/strtod.c 2006-11-08 19:07:25 +03:00 @@ -31,7 +31,6 @@ #define MAX_DBL_EXP 308 #define MAX_RESULT_FOR_MAX_EXP 1.7976931348623157 -#define MIN_RESULT_FOR_MIN_EXP 2.225073858507202 static double scaler10[] = { 1.0, 1e10, 1e20, 1e30, 1e40, 1e50, 1e60, 1e70, 1e80, 1e90 }; @@ -161,26 +160,15 @@ double my_strtod(const char *str, char * order= exp + (neg_exp ? -1 : 1) * (ndigits - 1); if (order < 0) order= -order; - if (order >= MAX_DBL_EXP && result) + if (order >= MAX_DBL_EXP && !neg_exp && result) { double c; /* Compute modulus of C (see comment above) */ c= result / scaler * 10.0; - if (neg_exp) + if (order > MAX_DBL_EXP || c > MAX_RESULT_FOR_MAX_EXP) { - if (order > MAX_DBL_EXP || c < MIN_RESULT_FOR_MIN_EXP) - { - result= 0.0; - goto done; - } - } - else - { - if (order > MAX_DBL_EXP || c > MAX_RESULT_FOR_MAX_EXP) - { - overflow= 1; - goto done; - } + overflow= 1; + goto done; } } --- 1.36/mysql-test/r/type_float.result 2006-11-08 19:07:25 +03:00 +++ 1.37/mysql-test/r/type_float.result 2006-11-08 19:07:25 +03:00 @@ -274,7 +274,7 @@ a double 0 drop table t1,t2,t3; select 1e-308, 1.00000001e-300, 100000000e-300; 1e-308 1.00000001e-300 100000000e-300 -0 1.00000001e-300 1e-292 +1e-308 1.00000001e-300 1e-292 select 10e307; 10e307 1e+308