MDEV-22758 Assertion `!item->null_value' failed in Type_handler_inet6::make_sort_key_part
When some expression of an INET6 data type involves conversion to INET6 from other data types, e.g. in: - CAST: SELECT CAST(non_inet6_expr AS INET6) - CASE and hybrid functions: SELECT CASE WHEN expr THEN inet6_expr ELSE non_inet6_expr END - UNION: SELECT inet6_expr UNION SELECT non_inet6_expr the result column must be fixed as NULL-able even if the non-inet6 expression itself is not NULL-able, because at the execution time the conversion can fail. Details: - Forcing NULL-ability if conversion from some data type to INET6 is involved (for non-constant or for expensive expressions). - Non-expensive constant expressions are tested for NULL-ability at fix_fields() time, so things like `CAST('::' AS INET6)` are still detected as NOT NULL. - Adding "bool warn" parameter into a few methods, to avoid redundant warnings at fix_fields() time when calculating NULL-ability of constant values.
Showing
Please register or sign in to comment