List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:March 30 2011 7:44am
Subject:bzr push into mysql-trunk branch (sergey.glukhov:3347)
View as plain text  
 3347 Sergey Glukhov	2011-03-30 [merge]
      automerge

    removed:
      storage/innobase/include/thr0loc.h
      storage/innobase/include/thr0loc.ic
      storage/innobase/thr/
      storage/innobase/thr/thr0loc.c
    modified:
      mysql-test/suite/innodb/include/innodb_stats.inc
      mysql-test/suite/innodb/r/innodb_stats.result
      storage/innobase/CMakeLists.txt
      storage/innobase/btr/btr0cur.c
      storage/innobase/buf/buf0buddy.c
      storage/innobase/buf/buf0buf.c
      storage/innobase/buf/buf0flu.c
      storage/innobase/buf/buf0rea.c
      storage/innobase/data/data0data.c
      storage/innobase/dict/dict0boot.c
      storage/innobase/dict/dict0crea.c
      storage/innobase/dict/dict0dict.c
      storage/innobase/dict/dict0load.c
      storage/innobase/dict/dict0mem.c
      storage/innobase/dict/dict0stats.c
      storage/innobase/fil/fil0fil.c
      storage/innobase/fsp/fsp0fsp.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/i_s.cc
      storage/innobase/ibuf/ibuf0ibuf.c
      storage/innobase/include/btr0pcur.h
      storage/innobase/include/btr0pcur.ic
      storage/innobase/include/buf0buf.h
      storage/innobase/include/buf0buf.ic
      storage/innobase/include/buf0flu.ic
      storage/innobase/include/buf0rea.h
      storage/innobase/include/dict0dict.ic
      storage/innobase/include/dict0mem.h
      storage/innobase/include/ibuf0ibuf.h
      storage/innobase/include/ibuf0ibuf.ic
      storage/innobase/include/mtr0mtr.h
      storage/innobase/include/mtr0mtr.ic
      storage/innobase/include/page0page.h
      storage/innobase/include/page0types.h
      storage/innobase/include/page0zip.ic
      storage/innobase/include/rem0rec.h
      storage/innobase/include/rem0rec.ic
      storage/innobase/include/srv0srv.h
      storage/innobase/include/sync0sync.h
      storage/innobase/include/univ.i
      storage/innobase/lock/lock0lock.c
      storage/innobase/mtr/mtr0log.c
      storage/innobase/mtr/mtr0mtr.c
      storage/innobase/page/page0page.c
      storage/innobase/page/page0zip.c
      storage/innobase/pars/pars0pars.c
      storage/innobase/row/row0ext.c
      storage/innobase/row/row0merge.c
      storage/innobase/row/row0mysql.c
      storage/innobase/row/row0row.c
      storage/innobase/row/row0umod.c
      storage/innobase/row/row0undo.c
      storage/innobase/row/row0upd.c
      storage/innobase/srv/srv0srv.c
      storage/innobase/srv/srv0start.c
      storage/innobase/trx/trx0i_s.c
      storage/innobase/trx/trx0rec.c
      storage/innobase/trx/trx0sys.c
      storage/innobase/trx/trx0trx.c
=== modified file 'mysql-test/r/func_time.result'
--- a/mysql-test/r/func_time.result	2011-03-28 13:38:03 +0000
+++ b/mysql-test/r/func_time.result	2011-03-30 07:42:03 +0000
@@ -1365,6 +1365,18 @@ SET GLOBAL SQL_MODE=DEFAULT;
 SELECT FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1);
 FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1)
 NULL
+#
+# Bug#11766126  59166: ANOTHER DATETIME VALGRIND UNINITIALIZED WARNING
+#
+SELECT CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025));
+CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025))
+NULL
+#
+# Bug#11766124  59164: VALGRIND: UNINITIALIZED VALUE IN NUMBER_TO_DATETIME
+#
+SELECT ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR);
+ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR)
+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 13:38:03 +0000
+++ b/mysql-test/t/func_time.test	2011-03-30 07:42:03 +0000
@@ -882,6 +882,18 @@ SET GLOBAL SQL_MODE=DEFAULT;
 
 SELECT FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1);
 
+--echo #
+--echo # Bug#11766126  59166: ANOTHER DATETIME VALGRIND UNINITIALIZED WARNING
+--echo #
+
+SELECT CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025));
+
+--echo #
+--echo # Bug#11766124  59164: VALGRIND: UNINITIALIZED VALUE IN NUMBER_TO_DATETIME
+--echo #
+
+SELECT ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR);
+
 --echo End of 5.1 tests
 
 --echo #

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2011-03-22 11:44:40 +0000
+++ b/sql/item.cc	2011-03-30 07:42:03 +0000
@@ -1006,8 +1006,12 @@ bool Item::get_date(MYSQL_TIME *ltime,ui
   }
   else
   {
-    longlong value= val_int();
     int was_cut;
+    longlong value= val_int();
+
+    if (null_value)
+      goto err;
+
     if (number_to_datetime(value, ltime, fuzzydate, &was_cut) == LL(-1))
     {
       char buff[22], *end;

=== modified file 'sql/item_timefunc.h'
--- a/sql/item_timefunc.h	2011-03-22 11:44:40 +0000
+++ b/sql/item_timefunc.h	2011-03-30 07:42:03 +0000
@@ -140,8 +140,11 @@ public:
   { DBUG_ASSERT(fixed == 1); return (double) Item_func_month::val_int(); }
   String *val_str(String *str) 
   {
-    str->set(val_int(), collation.collation);
-    return null_value ? 0 : str;
+    longlong nr= val_int();
+    if (null_value)
+      return 0;
+    str->set(nr, collation.collation);
+    return str;
   }
   const char *func_name() const { return "month"; }
   enum Item_result result_type () const { return INT_RESULT; }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (sergey.glukhov:3347) Sergey Glukhov30 Mar