List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:March 28 2011 1:43pm
Subject:bzr push into mysql-trunk branch (sergey.glukhov:3336 to 3337)
View as plain text  
 3337 Sergey Glukhov	2011-03-28 [merge]
      5.5 -> trunk merge

 3336 Sergey Glukhov	2011-03-28 [merge]
      automerge

    removed:
      win/build-vs10.bat
      win/build-vs10_x64.bat
=== modified file 'mysql-test/r/func_time.result'
--- a/mysql-test/r/func_time.result	2011-03-28 08:10:39 +0000
+++ b/mysql-test/r/func_time.result	2011-03-28 13:38:03 +0000
@@ -1353,6 +1353,18 @@ DROP TABLE t1;
 SELECT STR_TO_DATE(SPACE(2),'1');
 STR_TO_DATE(SPACE(2),'1')
 0000-00-00
+#
+# Bug#11765216  58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
+#
+SET GLOBAL SQL_MODE='';
+DO  STR_TO_DATE((''), FROM_DAYS(@@GLOBAL.SQL_MODE));
+SET GLOBAL SQL_MODE=DEFAULT;
+#
+# Bug#11766087  59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
+#
+SELECT FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1);
+FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1)
+NULL
 End of 5.1 tests
 #
 # BUG#43578 "MyISAM&Maria gives wrong rows with range access

=== modified file 'mysql-test/t/func_time.test'
--- a/mysql-test/t/func_time.test	2011-03-28 08:10:39 +0000
+++ b/mysql-test/t/func_time.test	2011-03-28 13:38:03 +0000
@@ -868,6 +868,20 @@ DROP TABLE t1;
 
 SELECT STR_TO_DATE(SPACE(2),'1');
 
+--echo #
+--echo # Bug#11765216  58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
+--echo #
+
+SET GLOBAL SQL_MODE='';
+DO  STR_TO_DATE((''), FROM_DAYS(@@GLOBAL.SQL_MODE));
+SET GLOBAL SQL_MODE=DEFAULT;
+
+--echo #
+--echo # Bug#11766087  59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
+--echo #
+
+SELECT FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1);
+
 --echo End of 5.1 tests
 
 --echo #

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2011-03-28 09:04:13 +0000
+++ b/sql/item_func.cc	2011-03-28 13:38:03 +0000
@@ -520,7 +520,10 @@ Field *Item_func::tmp_table_field(TABLE 
 my_decimal *Item_func::val_decimal(my_decimal *decimal_value)
 {
   DBUG_ASSERT(fixed);
-  int2my_decimal(E_DEC_FATAL_ERROR, val_int(), unsigned_flag, decimal_value);
+  longlong nr= val_int();
+  if (null_value)
+    return 0; /* purecov: inspected */
+  int2my_decimal(E_DEC_FATAL_ERROR, nr, unsigned_flag, decimal_value);
   return decimal_value;
 }
 

=== modified file 'sql/item_timefunc.cc'
--- a/sql/item_timefunc.cc	2011-03-28 08:10:39 +0000
+++ b/sql/item_timefunc.cc	2011-03-28 13:38:03 +0000
@@ -3415,6 +3415,7 @@ void Item_func_str_to_date::fix_length_a
 {
   maybe_null= 1;
   decimals=0;
+  cached_format_type= DATE_TIME;
   cached_field_type= MYSQL_TYPE_DATETIME;
   max_length= MAX_DATETIME_FULL_WIDTH*MY_CHARSET_BIN_MB_MAXLEN;
   cached_timestamp_type= MYSQL_TIMESTAMP_NONE;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (sergey.glukhov:3336 to 3337) Sergey Glukhov28 Mar