List:Commits« Previous MessageNext Message »
From:holyfoot Date:May 11 2007 1:19pm
Subject:bk commit into 5.1 tree (holyfoot:1.2511)
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-05-11 18:19:47+05:00, holyfoot@stripped +4 -0
  merging fixes

  mysql-test/t/view.test@stripped, 2007-05-11 18:19:45+05:00, holyfoot@stripped +12 -0
    merging fix

  sql/item_create.cc@stripped, 2007-05-11 18:19:46+05:00, holyfoot@stripped +2 -1
    merging fix

  sql/my_decimal.cc@stripped, 2007-05-11 18:19:46+05:00, holyfoot@stripped +11 -0
    merging fix

  sql/my_decimal.h@stripped, 2007-05-11 18:19:46+05:00, holyfoot@stripped +1 -9
    merging fix

# 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:	/home/hf/work/27921/my51-27921

--- 1.77/sql/item_create.cc	2007-05-11 18:19:52 +05:00
+++ 1.78/sql/item_create.cc	2007-05-11 18:19:52 +05:00
@@ -3947,6 +3947,7 @@ Create_func_master_pos_wait::create_nati
     my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str);
     break;
   }
+  }
 
   return func;
 }
@@ -4972,7 +4973,7 @@ find_qualified_function_builder(THD *thd
 
 
 Item *
-create_func_cast(Item *a, Cast_target cast_type,
+create_func_cast(THD *thd, Item *a, Cast_target cast_type,
                  const char *c_len, const char *c_dec,
                  CHARSET_INFO *cs)
 {

--- 1.197/mysql-test/t/view.test	2007-05-11 18:19:52 +05:00
+++ 1.198/mysql-test/t/view.test	2007-05-11 18:19:52 +05:00
@@ -3213,6 +3213,18 @@ EXPLAIN SELECT * FROM t1 UNION SELECT * 
 DROP VIEW v1;
 DROP TABLE t1;
 
+#
+# Bug #27921 View ignores precision for CAST()
+#
+CREATE VIEW v1 AS SELECT CAST( 1.23456789 AS DECIMAL( 7,5 ) ) AS col;
+SELECT * FROM v1;
+DESCRIBE v1;
+DROP VIEW v1;
+
+CREATE VIEW v1 AS SELECT CAST(1.23456789 AS DECIMAL(8,0)) AS col;
+SHOW CREATE VIEW v1;
+DROP VIEW v1;
+
 --echo End of 5.0 tests.
 
 #

--- 1.16/sql/my_decimal.cc	2007-05-11 18:19:52 +05:00
+++ 1.17/sql/my_decimal.cc	2007-05-11 18:19:52 +05:00
@@ -208,6 +208,17 @@ my_decimal *date2my_decimal(MYSQL_TIME *
 }
 
 
+void my_decimal_trim(ulong *precision, uint *scale)
+{
+  if (!(*precision) && !(*scale))
+  {
+    *precision= 10;
+    *scale= 0;
+    return;
+  }
+}
+
+
 #ifndef DBUG_OFF
 /* routines for debugging print */
 

--- 1.16/sql/my_decimal.h	2007-05-11 18:19:52 +05:00
+++ 1.17/sql/my_decimal.h	2007-05-11 18:19:52 +05:00
@@ -395,15 +395,7 @@ int my_decimal_intg(const my_decimal *a)
 }
 
 
-void my_decimal_trim(ulong *precision, uint *scale)
-{
-  if (!(*precision) && !(*scale))
-  {
-    *precision= 10;
-    *scale= 0;
-    return;
-  }
-}
+void my_decimal_trim(ulong *precision, uint *scale);
 
 
 #endif /*my_decimal_h*/
Thread
bk commit into 5.1 tree (holyfoot:1.2511)holyfoot11 May