List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:May 12 2011 12:58pm
Subject:bzr push into mysql-trunk branch (alexander.barkov:3365 to 3366) WL#946
View as plain text  
 3366 Alexander Barkov	2011-05-12
      WL#946
      Fixing warnings: converting to 'long long int' from 'double'

    modified:
      sql/field.cc
 3365 Alexander Barkov	2011-05-12
      WL#946 lldiv_t check didn't work for some reasons.
      Trying Windows-specific conditional compilation instead.

    modified:
      include/my_global.h
=== modified file 'sql/field.cc'
--- a/sql/field.cc	2011-05-12 11:57:06 +0000
+++ b/sql/field.cc	2011-05-12 12:58:20 +0000
@@ -5052,7 +5052,7 @@ int Field_datetime_common::store(double 
   int warnings= 0;
   lldiv_t lld;
   lld.quot= (longlong) trunc(nr);
-  lld.rem= round((nr - (double) lld.quot) * 1000000000);
+  lld.rem= (longlong) double2ulonglong(round((nr - (double) lld.quot) * 1000000000));
   int error= Field_temporal::store_lldiv_t(&lld, &warnings);
   if (warnings)
     set_warnings(nr, warnings);
@@ -5578,7 +5578,7 @@ int Field_time_common::store(double nr)
   int warnings= 0;
   lldiv_t lld;
   lld.quot= (longlong) trunc(nr);
-  lld.rem= round((nr - (double) lld.quot) * 1000000000);
+  lld.rem= (longlong) double2ulonglong(round((nr - (double) lld.quot) * 1000000000));
   int error= Field_temporal::store_lldiv_t(&lld, &warnings);
   if (warnings)
     set_warnings(nr, warnings);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (alexander.barkov:3365 to 3366) WL#946Alexander Barkov12 May