mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +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:
@@ -136,7 +136,7 @@ dayname("1962-03-03") dayname("1962-03-03")+0
|
||||
Saturday 5
|
||||
select monthname("1972-03-04"),monthname("1972-03-04")+0;
|
||||
monthname("1972-03-04") monthname("1972-03-04")+0
|
||||
March 3
|
||||
March 0
|
||||
select time_format(19980131000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T');
|
||||
time_format(19980131000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T')
|
||||
00|12|0|12|00|AM|12:00:00 AM|00|00:00:00
|
||||
@@ -1368,3 +1368,11 @@ SELECT SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR);
|
||||
SUBDATE(STR_TO_DATE(NULL,0), INTERVAL 1 HOUR)
|
||||
NULL
|
||||
#
|
||||
# BUG#59895 - setting storage engine to null segfaults mysqld
|
||||
#
|
||||
SELECT MONTHNAME(0), MONTHNAME(0) IS NULL, MONTHNAME(0) + 1;
|
||||
MONTHNAME(0) MONTHNAME(0) IS NULL MONTHNAME(0) + 1
|
||||
NULL 1 NULL
|
||||
SET storage_engine=NULL;
|
||||
ERROR 42000: Variable 'storage_engine' can't be set to the value of 'NULL'
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user