[MDEV-20674] Reuse val_native() in ExtractValue() and UpdateXML() Created: 2019-09-26  Updated: 2019-09-26  Resolved: 2019-09-26

Status: Closed
Project: MariaDB Server
Component/s: Data types, XML Functions
Fix Version/s: 10.5.0

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed

 Description   

Currently the classes that implement SQL functions ExtractValue() and UpdateXML() use a special virtual Item method to transfer node sets values:

virtual String *val_raw(String*) { return 0; }

The top level Item returns 0, and the following classes override this method:

  • Item_nodeset_func_rootelement
  • Item_nodeset_func_union
  • Item_nodeset_func_selfbyname
  • Item_nodeset_func_childbyname
  • Item_nodeset_func_descendantbyname
  • Item_nodeset_func_ancestorbyname
  • Item_nodeset_func_parentbyname
  • Item_nodeset_func_attributebyname
  • Item_nodeset_func_predicate
  • Item_nodeset_func_elementbyindex

val_raw() is not used anywhere outside of the metioned XML functions implementation.

Let's remove Item::val_raw() and replace the XML functions relatec classes to use the generic method val_native().

This is needed to move XML functions into a function collection plugin later.


Generated at Thu Feb 08 09:01:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.