diff options
| author | Alexander Barkov <bar@mariadb.org> | 2017-10-10 10:35:12 +0400 |
|---|---|---|
| committer | Alexander Barkov <bar@mariadb.org> | 2017-10-10 10:35:12 +0400 |
| commit | c2509a1588ee1dc7351b67b2f9149003540015c4 (patch) | |
| tree | 23609156a993241b6254719e41b58de91aa1ca38 /mysql-test/t | |
| parent | e30b6a983fe135dd1af0c79c81dbdb5b14b881c8 (diff) | |
| download | mariadb-git-c2509a1588ee1dc7351b67b2f9149003540015c4.tar.gz | |
MDEV-13972 crash in Item_func_sec_to_time::get_date
Diffstat (limited to 'mysql-test/t')
| -rw-r--r-- | mysql-test/t/ctype_ucs.test | 7 | ||||
| -rw-r--r-- | mysql-test/t/func_time.test | 15 |
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index d94c9ae62ac..62890d0cd1b 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -863,5 +863,12 @@ SET sql_mode=DEFAULT; SET NAMES utf8; --echo # +--echo # MDEV-13972 crash in Item_func_sec_to_time::get_date +--echo # + +SELECT SEC_TO_TIME(CONVERT(900*24*60*60 USING ucs2)); + + +--echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 7544f9e7761..8323bd30d2c 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -1615,6 +1615,21 @@ SELECT * FROM t1; DROP TABLE t1; SET sql_mode=DEFAULT; + +--echo # +--echo # MDEV-13972 crash in Item_func_sec_to_time::get_date +--echo # + +# The below query can return warning sporadically +--disable_warnings +DO TO_DAYS(SEC_TO_TIME(TIME(CEILING(UUID())))); +--enable_warnings + +DO TO_DAYS(SEC_TO_TIME(MAKEDATE('',RAND(~(''))))); +SELECT TO_DAYS(SEC_TO_TIME(MAKEDATE(0,RAND(~0)))); +SELECT SEC_TO_TIME(MAKEDATE(0,RAND(~0))); + + --echo # --echo # End of 5.5 tests --echo # |
