diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-09-16 12:40:57 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-09-16 12:41:48 +0400 |
commit | d93399746df8a730109c7363eaf0502923a39e02 (patch) | |
tree | 793d2a8d197ec2679ffe49a642b31666103c7203 /mysql-test/main | |
parent | 171fbbb968ed52dc7e2bbd33a6f8f72bbc6f5e88 (diff) | |
download | mariadb-git-d93399746df8a730109c7363eaf0502923a39e02.tar.gz |
MDEV-17203 Move fractional second truncation from Item_xxx_typecast::get_date() to Time and Datetime constructors
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/timezone2.result | 23 | ||||
-rw-r--r-- | mysql-test/main/timezone2.test | 19 |
2 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/main/timezone2.result b/mysql-test/main/timezone2.result index 096e996bffb..6de62d7ea30 100644 --- a/mysql-test/main/timezone2.result +++ b/mysql-test/main/timezone2.result @@ -332,3 +332,26 @@ NULL # # End of 5.3 tests # +# +# Start of 10.4 tests +# +# +# MDEV-17203 Move fractional second truncation from Item_xxx_typecast::get_date() to Time and Datetime constructors +# (an addition for the test for MDEV-4653) +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); +SET old_mode=ZERO_DATE_TIME_CAST; +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 Truncated 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 Truncated incorrect datetime value: '00:00:00' +SET old_mode=DEFAULT; +SET timestamp=DEFAULT; +# +# End of 10.4 tests +# diff --git a/mysql-test/main/timezone2.test b/mysql-test/main/timezone2.test index 7a38610ad95..773b40ec86c 100644 --- a/mysql-test/main/timezone2.test +++ b/mysql-test/main/timezone2.test @@ -308,3 +308,22 @@ SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' ); --echo # --echo # End of 5.3 tests --echo # + +--echo # +--echo # Start of 10.4 tests +--echo # + +--echo # +--echo # MDEV-17203 Move fractional second truncation from Item_xxx_typecast::get_date() to Time and Datetime constructors +--echo # (an addition for the test for MDEV-4653) + +SET timestamp=unix_timestamp('2001-02-03 10:20:30'); +SET old_mode=ZERO_DATE_TIME_CAST; +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'); +SET old_mode=DEFAULT; +SET timestamp=DEFAULT; + +--echo # +--echo # End of 10.4 tests +--echo # |