Fixed bug #27932: the function LOCATE returned NULL if any
of its arguments was evaluated to NULL, while the predicate LOCATE(str,NULL) IS NULL erroneously was evaluated to FALSE. This happened because the Item_func_locate::fix_length_and_dec method by mistake set the value of the maybe_null flag for the function item to 0. In consequence of this the function was considered as the one that could not ever return NULL. mysql-test/r/func_str.result: Added a test case for bug #27932. mysql-test/t/func_str.test: Added a test case for bug #27932.
Showing
Please register or sign in to comment