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

ExtractValue function not usable for Virtual Columns

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0.15
    • Fix Version/s: 10.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux - CentOS6

      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Igor Babaev,

            Could you please elaborate on the 'Won't fix' decision which was made in https://bugs.launchpad.net/maria/+bug/608641, and somehow summarize the limitations at https://mariadb.com/kb/en/mariadb/documentation/sql-commands/data-definition/create/virtual-columns/ ?

            Show
            elenst Elena Stepanova added a comment - Igor Babaev , Could you please elaborate on the 'Won't fix' decision which was made in https://bugs.launchpad.net/maria/+bug/608641 , and somehow summarize the limitations at https://mariadb.com/kb/en/mariadb/documentation/sql-commands/data-definition/create/virtual-columns/ ?

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                CCTJNII Tom Noonan II
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: