From 89e171535563dcdf1eeb309e54abc4da2f5dd539 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 7 Mar 2014 00:21:25 +0400 Subject: MDEV-5372 Make "CAST(time_expr AS DATETIME)" compatible with MySQL-5.6 (and the SQL Standard) --- mysql-test/r/type_timestamp_hires.result | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'mysql-test/r/type_timestamp_hires.result') diff --git a/mysql-test/r/type_timestamp_hires.result b/mysql-test/r/type_timestamp_hires.result index cc2cb6a403d..dc1cbb377f9 100644 --- a/mysql-test/r/type_timestamp_hires.result +++ b/mysql-test/r/type_timestamp_hires.result @@ -1,3 +1,4 @@ +SET timestamp=UNIX_TIMESTAMP('2001-02-03 10:20:30'); drop table if exists t1, t2, t3; create table t1 (a timestamp(7)); ERROR 42000: Too big precision 7 specified for 'a'. Maximum is 6. @@ -196,12 +197,8 @@ decimal5_f4_timestamp 20101112111417.76540 bigint_f5_timestamp 20101112111417 varchar_f6_timestamp 2010-11-12 11:14:17.765432 alter table t1 modify time4_f0_timestamp timestamp(0), modify datetime3_f1_timestamp timestamp(1), modify date_f2_timestamp timestamp(2), modify double_f3_timestamp timestamp(3), modify decimal5_f4_timestamp timestamp(4), modify bigint_f5_timestamp timestamp(5), modify varchar_f6_timestamp timestamp(6); -Warnings: -Level Warning -Code 1265 -Message Data truncated for column 'time4_f0_timestamp' at row 1 select * from t1; -time4_f0_timestamp 0000-00-00 00:00:00 +time4_f0_timestamp 2001-02-03 11:14:17 datetime3_f1_timestamp 2010-11-12 11:14:17.7 date_f2_timestamp 2010-11-12 00:00:00.00 double_f3_timestamp 2010-11-12 11:14:17.766 @@ -210,12 +207,8 @@ bigint_f5_timestamp 2010-11-12 11:14:17.00000 varchar_f6_timestamp 2010-11-12 11:14:17.765432 delete from t1; insert t1 select * from t2; -Warnings: -Level Warning -Code 1265 -Message Data truncated for column 'time4_f0_timestamp' at row 1 select * from t1; -time4_f0_timestamp 0000-00-00 00:00:00 +time4_f0_timestamp 2001-02-03 11:14:17 datetime3_f1_timestamp 2010-11-12 11:14:17.7 date_f2_timestamp 2010-11-12 00:00:00.00 double_f3_timestamp 2010-11-12 11:14:17.765 @@ -270,6 +263,7 @@ a b 2011-01-02 03:04:06.234500 2011-01-02 03:04:06.234561 drop view v1; drop table t1, t2; +SET timestamp=DEFAULT; set time_zone='+03:00'; set timestamp=unix_timestamp('2011-01-01 01:01:01') + 0.123456; create table t1 (a timestamp(5)); -- cgit v1.2.1