-
Georgi Kodinov authored
When substituting system constant functions with a constant result the server was not expecting that the function may return NULL. Fixed by checking for NULL and returning Item_null (in the relevant collation) if the result of the system constant function was NULL. mysql-test/r/mysql.result: Bug #41437: test case mysql-test/t/mysql.test: Bug #41437: test case. Relies on database() returning NULL if no database is selected. sql/item_strfunc.cc: Bug #41437: Check for NULL result on evaluating the system constant function and return a constant NULL item.
ac885d5d