List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:June 20 2011 8:41am
Subject:bzr commit into mysql-5.1 branch (sergey.glukhov:3648) Bug#12584302
View as plain text  
#At file:///home/gluh/MySQL/mysql-5.1/ based on revid:marko.makela@stripped

 3648 Sergey Glukhov	2011-06-20
      Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
      The problem is that TIME_FUZZY_DATE is explicitly used for get_arg0_date()
      function in Item_date_typecast::get_date method. The fix is to use real
      fuzzy_date value.
     @ mysql-test/r/func_time.result
        test case
     @ mysql-test/t/func_time.test
        test case
     @ sql/item_timefunc.cc
        use real fuzzy_date value

    modified:
      mysql-test/r/func_time.result
      mysql-test/t/func_time.test
      sql/item_timefunc.cc
=== modified file 'mysql-test/r/func_time.result'
--- a/mysql-test/r/func_time.result	2011-05-18 06:47:43 +0000
+++ b/mysql-test/r/func_time.result	2011-06-20 08:41:19 +0000
@@ -1426,4 +1426,10 @@ NULL
 SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
 WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1)
 NULL
+#
+# Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
+#
+DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
+Warnings:
+Warning	1292	Incorrect datetime value: '0'
 End of 5.1 tests

=== modified file 'mysql-test/t/func_time.test'
--- a/mysql-test/t/func_time.test	2011-05-18 06:47:43 +0000
+++ b/mysql-test/t/func_time.test	2011-06-20 08:41:19 +0000
@@ -928,4 +928,10 @@ SELECT DATE_FORMAT('0000-00-11', '%w');
 SELECT MAKEDATE(11111111,1);
 SELECT WEEK(DATE_ADD(FROM_DAYS(1),INTERVAL 1 MONTH), 1);
 
+--echo #
+--echo # Bug#12584302 AFTER FIX FOR #12403504: ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP > 0,
+--echo #
+
+DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
+
 --echo End of 5.1 tests

=== modified file 'sql/item_timefunc.cc'
--- a/sql/item_timefunc.cc	2011-05-18 06:47:43 +0000
+++ b/sql/item_timefunc.cc	2011-06-20 08:41:19 +0000
@@ -2644,7 +2644,7 @@ String *Item_time_typecast::val_str(Stri
 
 bool Item_date_typecast::get_date(MYSQL_TIME *ltime, uint fuzzy_date)
 {
-  bool res= get_arg0_date(ltime, TIME_FUZZY_DATE);
+  bool res= get_arg0_date(ltime, fuzzy_date);
   ltime->hour= ltime->minute= ltime->second= ltime->second_part= 0;
   ltime->time_type= MYSQL_TIMESTAMP_DATE;
   return res;


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@oracle.com-20110620084119-ervaj1qz1nrzbar0.bundle
Thread
bzr commit into mysql-5.1 branch (sergey.glukhov:3648) Bug#12584302Sergey Glukhov20 Jun