commit 68730acd9ae7ae8b2fcd25b5ccd18d47038d00b9 Author: Catalin Besleaga Date: Mon Jan 4 14:32:05 2021 +0100 WL#14015: Follow-up: fixed unstable test Change-Id: I11f352168902c6689981131cfda3a87ba924941c diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index af82329a9c5..4d81ef111cb 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -1747,6 +1747,7 @@ CAST("2020extra" AS YEAR) 2020 Warnings: Warning 1292 Truncated incorrect YEAR value: '2020extra' +SET timestamp = UNIX_TIMESTAMP('2020-12-22 03:30:00'); SELECT CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR); CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR) 2010 @@ -1764,6 +1765,7 @@ CAST(TIME'08:09:10' AS YEAR) SELECT CAST(TIME'00:00:00' AS YEAR); CAST(TIME'00:00:00' AS YEAR) 2020 +SET timestamp = DEFAULT; SELECT CAST(ST_PointFromText('POINT(10 10)') AS YEAR); ERROR HY000: Incorrect arguments to cast_as_year CREATE TABLE t AS SELECT CAST("2010" AS YEAR); diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 1a1f512fca7..a74d79ad91f 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -799,6 +799,7 @@ SELECT CAST("extra" AS YEAR); SELECT CAST("22extra" AS YEAR); SELECT CAST("2020extra" AS YEAR); +SET timestamp = UNIX_TIMESTAMP('2020-12-22 03:30:00'); #date[time] values SELECT CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR); SET SQL_MODE = ""; @@ -807,6 +808,7 @@ SET SQL_MODE = default; SELECT CAST(TIMESTAMP'2010-01-01 08:09:10' AS YEAR); SELECT CAST(TIME'08:09:10' AS YEAR); SELECT CAST(TIME'00:00:00' AS YEAR); +SET timestamp = DEFAULT; #geometry values --error ER_WRONG_ARGUMENTS