summaryrefslogtreecommitdiff
path: root/sql/init.cc
diff options
context:
space:
mode:
authorkaa@polly.local <>2007-05-28 12:44:59 +0400
committerkaa@polly.local <>2007-05-28 12:44:59 +0400
commit8ac1ffdf1df286194c265769ba72336ababd595b (patch)
treece229fe64aa84c932114a35a906ee691371bd962 /sql/init.cc
parent90468a727475073a92a7a8967654f7fb3ed2c934 (diff)
downloadmariadb-git-8ac1ffdf1df286194c265769ba72336ababd595b.tar.gz
Fix for bug #28121 "INSERT or UPDATE into DOUBLE(200,0) field being truncated to 31 digits"
When storing a large number to a FLOAT or DOUBLE field with fixed length, it could be incorrectly truncated if the field's length was greater than 31. This patch also does some code cleanups to be able to reuse code which is common between Field_float::store() and Field_double::store().
Diffstat (limited to 'sql/init.cc')
-rw-r--r--sql/init.cc13
1 files changed, 0 insertions, 13 deletions
diff --git a/sql/init.cc b/sql/init.cc
index ad55a2a8b24..b3b68926683 100644
--- a/sql/init.cc
+++ b/sql/init.cc
@@ -21,8 +21,6 @@
void unireg_init(ulong options)
{
- uint i;
- double nr;
DBUG_ENTER("unireg_init");
MYSYS_PROGRAM_DONT_USE_CURSES();
@@ -39,16 +37,5 @@ void unireg_init(ulong options)
VOID(strmov(reg_ext,".frm"));
specialflag=SPECIAL_SAME_DB_NAME | options; /* Set options from argv */
- /* Make a tab of powers of 10 */
- for (i=0,nr=1.0; i < array_elements(log_10) ; i++)
- { /* It's used by filesort... */
- log_10[i]= nr ; nr*= 10.0;
- }
- /* Make a tab of powers of 0.1 */
- for (i= 0, nr= 0.1; i < array_elements(log_01); i++)
- {
- log_01[i]= nr;
- nr*= 0.1;
- }
DBUG_VOID_RETURN;
}