List:Commits« Previous MessageNext Message »
From:msvensson Date:October 3 2006 9:20am
Subject:bk commit into 4.1 tree (msvensson:1.2557)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson 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-10-03 11:20:37+02:00, msvensson@neptunus.(none) +1 -0
  Merge bk-internal:/home/bk/mysql-4.1-rpl
  into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
  MERGE: 1.2547.3.4

  sql/item_func.cc@stripped, 2006-10-03 11:20:35+02:00, msvensson@neptunus.(none) +0 -0
    Auto merged
    MERGE: 1.262.1.1

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-4.1-maint/RESYNC

--- 1.265/sql/item_func.cc	2006-10-03 11:20:40 +02:00
+++ 1.266/sql/item_func.cc	2006-10-03 11:20:40 +02:00
@@ -508,6 +508,26 @@
   longlong value;
   int error;
 
+  if (args[0]->result_type() == REAL_RESULT)
+  {
+    double dvalue= args[0]->val();
+    if ((null_value= args[0]->null_value))
+      return 0;
+    if (dvalue <= (double) LONGLONG_MIN)
+    {
+      return LONGLONG_MIN;
+    }
+    if (dvalue >= (double) (ulonglong) ULONGLONG_MAX)
+    {
+      return (longlong) ULONGLONG_MAX;
+    }
+    if (dvalue >= (double) (ulonglong) LONGLONG_MAX)
+    {
+      return (ulonglong) (dvalue + (dvalue > 0 ? 0.5 : -0.5));
+    }
+    return (longlong)  (dvalue + (dvalue > 0 ? 0.5 : -0.5));
+  }
+
   if (args[0]->cast_to_int_type() != STRING_RESULT)
   {
     value= args[0]->val_int();
Thread
bk commit into 4.1 tree (msvensson:1.2557)msvensson3 Oct