1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Sergey Vojtovich
2011-02-18 11:10:30 +03:00
parent b2089dc80a
commit 4daaa02880
4 changed files with 27 additions and 12 deletions

View File

@ -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 #