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

ExtractValue function not usable for Virtual Columns

    XMLWordPrintable

Details

    Description

      When creating a table I am unable to use the ExctractValue function to create a column, despite it being deterministic:

      mysql> create table xml_test (xml TEXT, virt CHAR(16) AS (ExtractValue(xml, '//some/@xpath')) PERSISTENT;
      ERROR 1901 (HY000): Function or expression is not allowed for column 'virt'

      This was discussed several years ago on the dev list at https://www.mail-archive.com/maria-developers@lists.launchpad.net/msg03488.html where it was added to Launchpad bug 608641 (https://bugs.launchpad.net/maria/+bug/608641). Bug 608641 contains other functions as well and was quietly closed as "won't fix" in 2012 with no explanation.

      I have a use where being able to create and index columns off stored XML would be very useful. I need to use xpath searches, I cannot use simple string manipulation. I would appreciate if this could be reevaluated. If it is still "won't-fix" please document why. Thank you.

      Attachments

        Activity

          People

            monty Michael Widenius
            CCTJNII Tom Noonan II
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.