diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_date.result | 11 | ||||
-rw-r--r-- | mysql-test/r/type_datetime.result | 8 | ||||
-rw-r--r-- | mysql-test/r/type_time.result | 11 | ||||
-rw-r--r-- | mysql-test/t/type_date.test | 9 | ||||
-rw-r--r-- | mysql-test/t/type_datetime.test | 5 | ||||
-rw-r--r-- | mysql-test/t/type_time.test | 9 |
6 files changed, 53 insertions, 0 deletions
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index 2d4a290751f..e5e28be8f71 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -303,6 +303,17 @@ Warnings: Warning 1265 Data truncated for column 'f1' at row 1 drop table t1; # +# MDEV-4634 Crash in CONVERT_TZ +# +SELECT CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5'); +CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5') +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00' +# +# End of 5.3 tests +# +# # Bug #33629: last_day function can return null, but has 'not null' # flag set for result # diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index d6676bbf16b..e20164dde57 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -681,6 +681,14 @@ c a b 1 1 0000-00-00 3 NULL NULL drop table t1,t2; +# +# MDEV-4634 Crash in CONVERT_TZ +# +SELECT CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+7:5'); +CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+7:5') +NULL +Warnings: +Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00' End of 5.3 tests # # Start of 5.5 tests diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 7bc0327178b..4167cbbe252 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -174,6 +174,17 @@ select f1, f1 = '2010-10-11 23:38:57' from t1; f1 f1 = '2010-10-11 23:38:57' 23:38:57 0 drop table t1; +# +# MDEV-4634 Crash in CONVERT_TZ +# +SELECT CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5'); +CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5') +NULL +Warnings: +Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00' +# +# End of 5.3 tests +# CREATE TABLE t1 (f1 TIME); INSERT INTO t1 VALUES ('24:00:00'); SELECT '24:00:00' = (SELECT f1 FROM t1); diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 3129863ab9b..af8681abff3 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -295,6 +295,15 @@ insert t1 values ('2010-10-10 15:foobar'); drop table t1; --echo # +--echo # MDEV-4634 Crash in CONVERT_TZ +--echo # +SELECT CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5'); + +--echo # +--echo # End of 5.3 tests +--echo # + +--echo # --echo # Bug #33629: last_day function can return null, but has 'not null' --echo # flag set for result --echo # diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test index 05bc72291cd..a1c0509666a 100644 --- a/mysql-test/t/type_datetime.test +++ b/mysql-test/t/type_datetime.test @@ -486,6 +486,11 @@ select * from t2 left join t1 on t1.a=t2.c where t1.b is null; drop table t1,t2; +--echo # +--echo # MDEV-4634 Crash in CONVERT_TZ +--echo # +SELECT CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+7:5'); + --echo End of 5.3 tests --echo # diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test index 2ddb6f9dffc..19e0c45fbc0 100644 --- a/mysql-test/t/type_time.test +++ b/mysql-test/t/type_time.test @@ -123,6 +123,15 @@ insert into t1 values ('23:38:57'); select f1, f1 = '2010-10-11 23:38:57' from t1; drop table t1; +--echo # +--echo # MDEV-4634 Crash in CONVERT_TZ +--echo # +SELECT CONVERT_TZ(GREATEST(TIME('00:00:00'),TIME('00:00:00')),'+00:00','+7:5'); + +--echo # +--echo # End of 5.3 tests +--echo # + # # Bug#42664 - Sign ignored for TIME types when not comparing as longlong # |