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

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • N/A
    • 10.6
    • Data types, JSON
    • 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

              rucha174 Rucha Deodhar
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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