Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
Item_func_like is erroneously inherited from Item_bool_func2.
Unlike the other Item_bool_func2, Item_func_like:
- does not need Arg_comparator
- does not need abort_on_null, as we don't support LIKE for rows: (x1,y1,z1) LIKE (x2,y2,z2)
Wrong inheritance needs excessive casts and functype() calls and potentially more buggy.
See MDEV-8222 as an example of a bug introduced because of this wrong inheritance.
Derive Item_func_like directly from Item_bool_func.
Another option would be to move Arg_comparator from Item_bool_func2 to Item_bool_rowready_func2.