summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_time.test
diff options
context:
space:
mode:
authorSergey Vojtovich <sergey.vojtovich@oracle.com>2011-02-18 11:10:30 +0300
committerSergey Vojtovich <sergey.vojtovich@oracle.com>2011-02-18 11:10:30 +0300
commit4daaa0288002cce90c1a3655e3740b100a3f761b (patch)
tree74c965907b21ae126768c1c28085c46dd10f426c /mysql-test/t/func_time.test
parentb2089dc80a4ded4b22148419dbd0fa39f43b28fb (diff)
downloadmariadb-git-4daaa0288002cce90c1a3655e3740b100a3f761b.tar.gz
BUG#11766720 - setting storage engine to null segfaults mysqld
MONTHNAME(0) claims that it is about to return NOT NULL value, whereas it actually returns NULL. As a result storage_engine variable (which cannot be NULL) protection was bypassed and NULL value was accepted, causing server crash. Fixed MONTHNAME(0) to report valid NULL flag.
Diffstat (limited to 'mysql-test/t/func_time.test')
-rw-r--r--mysql-test/t/func_time.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index eaa592c2ad5..f53d90cef96 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -881,4 +881,11 @@ SELECT WEEK(STR_TO_DATE(NULL,0));
SELECT SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR);
--echo #
+--echo # BUG#59895 - setting storage engine to null segfaults mysqld
+--echo #
+SELECT MONTHNAME(0), MONTHNAME(0) IS NULL, MONTHNAME(0) + 1;
+--error ER_WRONG_VALUE_FOR_VAR
+SET storage_engine=NULL;
+
+--echo #