List:Commits« Previous MessageNext Message »
From:holyfoot Date:June 14 2007 1:35pm
Subject:bk commit into 5.1 tree (holyfoot:1.2564)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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, 2007-06-14 16:35:20+05:00, holyfoot@hfmain.(none) +2 -0
  Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
  into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
  MERGE: 1.1810.2943.56

  mysql-test/r/type_decimal.result@stripped, 2007-06-14 16:35:16+05:00, holyfoot@hfmain.(none)
+0 -0
    Auto merged
    MERGE: 1.38.1.5

  sql/item_func.cc@stripped, 2007-06-14 16:35:17+05:00, holyfoot@hfmain.(none) +0 -0
    Auto merged
    MERGE: 1.270.1.79

# 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:	holyfoot
# Host:	hfmain.(none)
# Root:	/d2/hf/mrg/mysql-5.1-opt/RESYNC

--- 1.404/sql/item_func.cc	2007-06-14 16:35:25 +05:00
+++ 1.405/sql/item_func.cc	2007-06-14 16:35:25 +05:00
@@ -1954,7 +1954,13 @@ void Item_func_round::fix_length_and_dec
   {
     max_length= args[0]->max_length;
     decimals= args[0]->decimals;
-    hybrid_type= REAL_RESULT;
+    if (args[0]->result_type() == DECIMAL_RESULT)
+    {
+      max_length++;
+      hybrid_type= DECIMAL_RESULT;
+    }
+    else
+      hybrid_type= REAL_RESULT;
     return;
   }
 

--- 1.45/mysql-test/r/type_decimal.result	2007-06-14 16:35:25 +05:00
+++ 1.46/mysql-test/r/type_decimal.result	2007-06-14 16:35:25 +05:00
@@ -790,3 +790,12 @@ Warning	1292	Incorrect datetime value: '
 Warning	1292	Incorrect datetime value: '0000-00-00'
 Warning	1292	Incorrect datetime value: '0000-00-00'
 drop table t1;
+CREATE TABLE t1 (
+qty decimal(16,6) default NULL, 
+dps tinyint(3) unsigned default NULL 
+);
+INSERT INTO t1 VALUES (1.1325,3);
+SELECT ROUND(qty,3), dps, ROUND(qty,dps) FROM t1;
+ROUND(qty,3)	dps	ROUND(qty,dps)
+1.133	3	1.133
+DROP TABLE t1;
Thread
bk commit into 5.1 tree (holyfoot:1.2564)holyfoot14 Jun