Bug#28729: Field_enum wrongly reported an error while storing an empty string.
ENUM fields internally store their values as integers and may use integer values as indexes to their values. Invalid values are mapped to zero value. When storing an empty string the ENUM field fails to find an appropriate value and tries to convert the provided string to integer. The conversion also fails and error is returned even if the thd->count_cuted_fields is set to CHECK_FIELD_IGNORE. This makes the range optimizer wrongly decide that an impossible range is present. Now the Field_enum::store() returns error while storing an empty string only if the thd->count_cuted_fields isn't set to CHECK_FIELD_IGNORE.
Showing
Please register or sign in to comment