[Commits] Rev 3685: Merge from 5.3 in file:///home/bell/maria/bzr/work-maria-10.0-base-merge-5.5/

sanja at montyprogram.com sanja at montyprogram.com
Mon Aug 19 15:23:41 EEST 2013


At file:///home/bell/maria/bzr/work-maria-10.0-base-merge-5.5/

------------------------------------------------------------
revno: 3685 [merge]
revision-id: bar at mariadb.org-20130808094121-iq04tpoi2xhsu9e2
parent: bar at mariadb.org-20130808074849-ynolzx577luuhab2
parent: bar at mariadb.org-20130808085828-dzxxk6wmnx7b0mm2
author: Alexander Barkov <bar at mariadb.org>
committer: sanja at montyprogram.com
branch nick: 5.5
timestamp: Thu 2013-08-08 13:41:21 +0400
message:
  Merge from 5.3
  
  pending merges:
    Alexander Barkov 2013-08-08 MDEV-4653 Wrong result for CONVERT_TZ(TIME('...
modified:
  mysql-test/r/timezone2.result  sp1f-timezone2.result-20040618061118-oloxsu6ifqssfckk32qvvnihwiupwfx2
  mysql-test/t/timezone2.test    sp1f-timezone2.test-20040618061121-ndnrev6yt3s7dhdkisgelqzy34gkriwz
  sql/item_timefunc.cc           sp1f-item_timefunc.cc-19700101030959-rvvlgmw5b4ewpuuxuntrkiqimyrr5sw2
-------------- next part --------------
=== modified file 'mysql-test/r/timezone2.result'
--- a/mysql-test/r/timezone2.result	2011-06-07 16:13:02 +0000
+++ b/mysql-test/r/timezone2.result	2013-08-08 08:58:28 +0000
@@ -309,3 +309,22 @@ CONVERT_TZ(1, 1, a)
 NULL
 DROP TABLE t1;
 End of 5.1 tests
+#
+# Start of 5.3 tests
+#
+#
+# MDEV-4653 Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')
+#
+SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5');
+CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')
+NULL
+Warnings:
+Warning	1292	Incorrect datetime value: '00:00:00'
+SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5');
+CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5')
+NULL
+Warnings:
+Warning	1292	Incorrect datetime value: '00:00:00'
+#
+# End of 5.3 tests
+#

=== modified file 'mysql-test/t/timezone2.test'
--- a/mysql-test/t/timezone2.test	2010-08-06 19:29:37 +0000
+++ b/mysql-test/t/timezone2.test	2013-08-08 08:58:28 +0000
@@ -284,3 +284,19 @@ SELECT CONVERT_TZ(1, 1, a) FROM t1;
 DROP TABLE t1;
 
 --echo End of 5.1 tests
+
+
+--echo #
+--echo # Start of 5.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-4653 Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')
+--echo #
+
+SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5');
+SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5');
+
+--echo #
+--echo # End of 5.3 tests
+--echo #

=== modified file 'sql/item_timefunc.cc'
--- a/sql/item_timefunc.cc	2013-07-17 19:24:29 +0000
+++ b/sql/item_timefunc.cc	2013-08-08 09:41:21 +0000
@@ -2032,7 +2032,9 @@ bool Item_date_add_interval::get_date(MY
 {
   INTERVAL interval;
 
-  if (args[0]->get_date(ltime, 0) ||
+  if (args[0]->get_date(ltime,
+                        cached_field_type == MYSQL_TYPE_TIME ?
+                        TIME_TIME_ONLY : 0) ||
       get_interval_value(args[1], int_type, &interval))
     return (null_value=1);
 
@@ -2423,7 +2425,9 @@ bool Item_time_typecast::get_date(MYSQL_
   if (ltime->time_type != MYSQL_TIMESTAMP_TIME)
     ltime->year= ltime->month= ltime->day= 0;
   ltime->time_type= MYSQL_TIMESTAMP_TIME;
-  return 0;
+  return (fuzzy_date & TIME_TIME_ONLY) ? 0 :
+         (null_value= check_date_with_warn(ltime, fuzzy_date,
+                                           MYSQL_TIMESTAMP_ERROR)); 
 }
 
 



More information about the commits mailing list