In item_xmlfunc.cc there is a number of tests like:
We'll modify this code in a more Type_handler-ish style, as follows:
- Remove XPATH_NODESET from the enum Item::Type.
- Add a new type handler declaration in item_xmlfunc.cc:
- Overload Item_nodeset_func::type_handler() and Item_nodeset_func::fixed_type_handler() to return &type_handler_xpath_nodeset.
- Change all tests for XPATH_NODESET to a test like this:
Additionally, we'll do the following cleanups:
- Rename the method Item::val_nodeset() to a more generic Item::val_raw(). It will be later used by other non-traditional data types.
- Remove XPATH_NODESET_CMP, as it's not used.