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

JSON_TABLE: Some data types cause parsing error: ENUM, SET, geometry, INET6

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: N/A
    • Fix Version/s: 10.6
    • Component/s: Data types, JSON
    • Labels:
      None

      Description

      bb-10.6-mdev17399-psergey2 8b533cc1d5

      MariaDB [test]> select * from json_table('["foo"]', '$[*]' columns(a enum('foo','bar') path '$')) a;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'enum('foo','bar') path '$')) a' at line 1
      

      Works in MySQL:

      MySQL 8.0.23

      MySQL [test]> select * from json_table('["foo"]', '$[*]' columns(a enum('foo','bar') path '$')) a;
      +------+
      | a    |
      +------+
      | foo  |
      +------+
      1 row in set (0.001 sec)
      

      Other types which cause a syntax error are SET, geometry of different sorts, INET6. The list may be incomplete.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: