From 7ea9d1e692c69c8715d98a9dbc44289d47a65447 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 27 Jan 2014 13:15:40 +0400 Subject: MDEV-5458 RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(...): Assertion `mon > 0 && mon < 13' failed.' --- mysql-test/r/func_time.result | 24 ++++++++++++++++++++++++ mysql-test/r/type_date.result | 2 +- mysql-test/r/type_time.result | 2 +- mysql-test/t/func_time.test | 11 +++++++++++ 4 files changed, 37 insertions(+), 2 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index ddbf42c8060..ac336418823 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -2348,6 +2348,30 @@ SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00')); EXTRACT(DAY FROM TIME('1 02:00:00')) EXTRACT(DAY FROM TIME('26:00:00')) 1 1 # +# MDEV-5458 RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(int, int, int, int, int, int): Assertion `mon > 0 && mon < 13' failed.' +# +SET TIMESTAMP=UNIX_TIMESTAMP('2014-01-22 18:19:20'); +CREATE TABLE t1 (t TIME); +INSERT INTO t1 VALUES ('03:22:30'),('18:30:05'); +SELECT CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') FROM t1; +CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') +NULL +NULL +Warnings: +Warning 1292 Truncated incorrect time value: '1296:00:00' +Warning 1292 Incorrect datetime value: '838:59:59' +Warning 1292 Truncated incorrect time value: '1296:00:00' +Warning 1292 Incorrect datetime value: '838:59:59' +SELECT GREATEST(t, CURRENT_DATE()) FROM t1; +GREATEST(t, CURRENT_DATE()) +838:59:59 +838:59:59 +Warnings: +Warning 1292 Truncated incorrect time value: '1296:00:00' +Warning 1292 Truncated incorrect time value: '1296:00:00' +DROP TABLE t1; +SET TIMESTAMP=DEFAULT; +# # MDEV-5504 Server crashes in String::length on SELECT with MONTHNAME, GROUP BY, ROLLUP # CREATE TABLE t1 (i INT); diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index e452b3255ae..b7776d67651 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -305,7 +305,7 @@ 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' +Warning 1292 Incorrect datetime value: '2022-00-00' # # MDEV-4804 Date comparing false result # diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 84cd6ca4d9e..26e42d3b3b2 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -180,7 +180,7 @@ 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' +Warning 1292 Incorrect datetime value: '00:00:00' # # MDEV-4652 Wrong result for CONCAT(GREATEST(TIME('00:00:01'),TIME('00:00:00'))) # diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 2e8716f3297..4205a70ee56 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1418,6 +1418,17 @@ SELECT EXTRACT(HOUR FROM TIME'1 02:00:00'), EXTRACT(HOUR FROM TIME'26:00:00'); SELECT EXTRACT(HOUR FROM TIME('1 02:00:00')), EXTRACT(HOUR FROM TIME('26:00:00')); SELECT EXTRACT(DAY FROM TIME('1 02:00:00')), EXTRACT(DAY FROM TIME('26:00:00')); +--echo # +--echo # MDEV-5458 RQG hits 'sql/tztime.cc:799: my_time_t sec_since_epoch(int, int, int, int, int, int): Assertion `mon > 0 && mon < 13' failed.' +--echo # +SET TIMESTAMP=UNIX_TIMESTAMP('2014-01-22 18:19:20'); +CREATE TABLE t1 (t TIME); +INSERT INTO t1 VALUES ('03:22:30'),('18:30:05'); +SELECT CONVERT_TZ(GREATEST(t, CURRENT_DATE()), '+02:00', '+10:00') FROM t1; +SELECT GREATEST(t, CURRENT_DATE()) FROM t1; +DROP TABLE t1; +SET TIMESTAMP=DEFAULT; + --echo # --echo # MDEV-5504 Server crashes in String::length on SELECT with MONTHNAME, GROUP BY, ROLLUP -- cgit v1.2.1