List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:November 14 2011 9:59am
Subject:bzr push into mysql-trunk branch (alexander.barkov:3556 to 3557)
Bug#13385275 WL#946
View as plain text  
 3557 Alexander Barkov	2011-11-14
      WL#946: BUG#13385275 - ASSERT FAILURE IN TIME_FROM_LONGLONG_PACKED 

    modified:
      mysql-test/r/type_temporal_fractional.result
      mysql-test/t/type_temporal_fractional.test
      sql/item_func.cc
 3556 Alexander Barkov	2011-11-10
      WL#946 13367868  assert failure in mysql_time_cache::set_time , when time has quoted fsp

    modified:
      mysql-test/r/temporal_literal.result
      mysql-test/t/temporal_literal.test
      sql/item_create.cc
=== modified file 'mysql-test/r/type_temporal_fractional.result'
--- a/mysql-test/r/type_temporal_fractional.result	2011-11-10 14:58:23 +0000
+++ b/mysql-test/r/type_temporal_fractional.result	2011-11-14 09:58:55 +0000
@@ -16323,3 +16323,18 @@ GREATEST('2004-04-07', COALESCE (pk, col
 2011-11-01 12:07:41.148239
 DROP TABLE t1;
 SET timestamp=DEFAULT;
+#
+# BUG 13385275 - ASSERT FAILURE IN TIME_FROM_LONGLONG_PACKED 
+#
+CREATE TABLE t1 (
+col_date_not_null_key date NOT NULL,
+KEY col_date_not_null_key (col_date_not_null_key));
+INSERT INTO t1 VALUES ('0000-00-00'), ('2000-11-20');
+SELECT ADDTIME(GREATEST(col_date_not_null_key, '2007-03-11 08:51:19.009408'),
+'12:20:40.029940')
+FROM t1;
+ADDTIME(GREATEST(col_date_not_null_key, '2007-03-11 08:51:19.009408'),
+'12:20:40.029940')
+21:11:59.039348
+21:11:59.039348
+DROP TABLE t1;

=== modified file 'mysql-test/t/type_temporal_fractional.test'
--- a/mysql-test/t/type_temporal_fractional.test	2011-11-10 14:58:23 +0000
+++ b/mysql-test/t/type_temporal_fractional.test	2011-11-14 09:58:55 +0000
@@ -6968,6 +6968,19 @@ SELECT GREATEST('2004-04-07', COALESCE (
 DROP TABLE t1;
 SET timestamp=DEFAULT;
 
+--echo #
+--echo # BUG 13385275 - ASSERT FAILURE IN TIME_FROM_LONGLONG_PACKED 
+--echo #
+CREATE TABLE t1 (
+  col_date_not_null_key date NOT NULL,
+  KEY col_date_not_null_key (col_date_not_null_key));
+INSERT INTO t1 VALUES ('0000-00-00'), ('2000-11-20'); 
+SELECT ADDTIME(GREATEST(col_date_not_null_key, '2007-03-11 08:51:19.009408'),
+               '12:20:40.029940')
+FROM t1; 
+DROP TABLE t1;
+
+
 
 ## TS-TODO: SELECT CAST('00:00:00' AS DATETIME) -> should it use curdate?
 

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2011-11-10 14:58:23 +0000
+++ b/sql/item_func.cc	2011-11-14 09:58:55 +0000
@@ -2925,7 +2925,7 @@ bool Item_func_min_max::get_date(MYSQL_T
     cmp_datetimes(&result);
     if (null_value)
       return true;
-    TIME_from_longlong_packed(ltime, field_type(), result);
+    TIME_from_longlong_packed(ltime, datetime_item->field_type(), result);
     return false;
   }
 
@@ -2952,7 +2952,7 @@ bool Item_func_min_max::get_time(MYSQL_T
     cmp_datetimes(&result);
     if (null_value)
       return true;
-    TIME_from_longlong_packed(ltime, field_type(), result);
+    TIME_from_longlong_packed(ltime, datetime_item->field_type(), result);
     datetime_to_time(ltime);
     return false;
   }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (alexander.barkov:3556 to 3557)Bug#13385275 WL#946Alexander Barkov14 Nov