Fixed bug #32335.
Comparison of a BIGINT NOT NULL column with a constant arithmetic expression that evaluates to NULL caused error 1048: "Column '...' cannot be null". Made convert_constant_item() check if the constant expression is NULL before attempting to store it in a field. Attempts to store NULL in a NOT NULL field caused query errors. sql/item_cmpfunc.cc: Fixed bug #32335. 1. Made convert_constant_item() check if the constant expression is NULL before attempting to store it in a field. Attempts to store NULL in a NOT NULL field caused query errors. 2. Also minor bug has been fixed: the thd->count_cuted_fields value was not restored in case of successful conversion. mysql-test/t/select.test: Added test case for bug #32335. mysql-test/r/select.result: Added test case for bug #32335.
Showing
Please register or sign in to comment