Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20674

Reuse val_native() in ExtractValue() and UpdateXML()

    XMLWordPrintable

Details

    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.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.