List:Commits« Previous MessageNext Message »
From:sergeyv Date:December 28 2005 4:41pm
Subject:bk commit into 5.0 tree (SergeyV:1.2007) BUG#15634
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of sergeyv. When sergeyv 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
  1.2007 05/12/28 19:40:37 SergeyV@selena. +1 -0
  Fixes bug #15634. Eliminates compiler warning 'all return paths are recursive in 
  Field_date::store function'. Though the Field_date::store function almost unused
  when protocol_version=10 additional check was added into it to store 4byte dates 
  properly. Effective test routine is not available so far due to protocol_version
  is not a dynamic property and can not be modified with mysql-test script.

  sql/field.cc
    1.296 05/12/28 19:40:12 SergeyV@selena. +4 -1
    Fixes bug #15634. Eliminates compiler warning 'all return paths are recursive in 
    Field_date::store function'. Though the Field_date::store function almost unused
    when protocol_version=10 additional check was added into it to store 4byte dates 
    properly.

# 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:	SergeyV
# Host:	selena.
# Root:	H:/MYSQL/src/#15634-mysql-5.0

--- 1.295/sql/field.cc	2005-12-07 17:02:38 +03:00
+++ 1.296/sql/field.cc	2005-12-28 19:40:12 +03:00
@@ -5242,7 +5242,7 @@
   else
     tmp= (longlong) rint(nr);
 
-  return Field_date::store(tmp);
+  return Field_date::store(tmp, TRUE);
 }
 
 
@@ -5263,6 +5263,9 @@
     nr= 0;
     error= 2;
   }
+
+  if (nr >= 19000000000000.0 && nr <= 99991231235959.0)
+    nr=floor(nr/1000000.0);			// Timestamp to date
 
   if (error)
     set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
Thread
bk commit into 5.0 tree (SergeyV:1.2007) BUG#15634sergeyv28 Dec