List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:May 18 2011 7:09am
Subject:bzr push into mysql-trunk branch (sergey.glukhov:3097 to 3098)
View as plain text  
 3098 Sergey Glukhov	2011-05-18 [merge]
      5.5 -> trunk merge
     @ mysql-test/r/func_time.result
        5.5 -> trunk merge
     @ mysql-test/t/func_time.test
        5.5 -> trunk merge
     @ sql/item_timefunc.cc
        5.5 -> trunk merge

    modified:
      mysql-test/r/func_time.result
      mysql-test/t/func_time.test
      sql/item_timefunc.cc
 3097 Luis Soares	2011-05-17 [merge]
      BUG#12370830
      
      Automerge cset with latest mysql-trunk.

    modified:
      mysql-test/suite/rpl/r/rpl_checksum.result
      mysql-test/suite/rpl/t/rpl_checksum.test
=== modified file 'mysql-test/r/func_time.result'
--- a/mysql-test/r/func_time.result	2011-04-27 07:55:04 +0000
+++ b/mysql-test/r/func_time.result	2011-05-18 07:07:52 +0000
@@ -1389,6 +1389,15 @@ NULL
 SELECT DATE_FORMAT('0000-00-11', '%w');
 DATE_FORMAT('0000-00-11', '%w')
 NULL
+#
+# Bug#12403504  AFTER FIX FOR #11889186 : ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0
+#
+SELECT MAKEDATE(11111111,1);
+MAKEDATE(11111111,1)
+NULL
+SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
+WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 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-04-27 07:55:04 +0000
+++ b/mysql-test/t/func_time.test	2011-05-18 07:07:52 +0000
@@ -902,6 +902,13 @@ SELECT DATE_FORMAT('0000-00-11', '%W');
 SELECT DATE_FORMAT('0000-00-11', '%a');
 SELECT DATE_FORMAT('0000-00-11', '%w');
 
+--echo #
+--echo # Bug#12403504  AFTER FIX FOR #11889186 : ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0
+--echo #
+
+SELECT MAKEDATE(11111111,1);
+SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
+
 --echo End of 5.1 tests
 
 --echo #

=== modified file 'sql/item_timefunc.cc'
--- a/sql/item_timefunc.cc	2011-05-10 13:41:34 +0000
+++ b/sql/item_timefunc.cc	2011-05-18 07:07:52 +0000
@@ -1588,6 +1588,11 @@ bool Item_func_from_days::get_date(MYSQL
     return 1;
   bzero(ltime, sizeof(MYSQL_TIME));
   get_date_from_daynr((long) value, &ltime->year, &ltime->month, &ltime->day);
+
+  if ((null_value= (fuzzy_date & TIME_NO_ZERO_DATE) &&
+       (ltime->year == 0 || ltime->month == 0 || ltime->day == 0)))
+    return TRUE;
+
   ltime->time_type= MYSQL_TIMESTAMP_DATE;
   return 0;
 }
@@ -2776,7 +2781,7 @@ String *Item_func_makedate::val_str(Stri
   long days;
 
   if (args[0]->null_value || args[1]->null_value ||
-      year < 0 || daynr <= 0)
+      year < 0 || year > 9999 || daynr <= 0)
     goto err;
 
   if (year < 100)
@@ -2819,7 +2824,7 @@ longlong Item_func_makedate::val_int()
   long days;
 
   if (args[0]->null_value || args[1]->null_value ||
-      year < 0 || daynr <= 0)
+      year < 0 || year > 9999 || daynr <= 0)
     goto err;
 
   if (year < 100)

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (sergey.glukhov:3097 to 3098) Sergey Glukhov18 May