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. mysql-test/r/func_time.result: A test case for BUG#11766720. mysql-test/t/func_time.test: A test case for BUG#11766720. sql/item_timefunc.cc: MONTHNAME(0) must report NULL, as opposed to base class MONTH(0) which is NOT NULL. Fixed Item_func_monthname to inherit from Item_str_func instead of Item_func_month. sql/item_timefunc.h: MONTHNAME(0) must report NULL, as opposed to base class MONTH(0) which is NOT NULL. Fixed Item_func_monthname to inherit from Item_str_func instead of Item_func_month.
Showing
Please register or sign in to comment