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

JSON_TABLE: Cannot create a view selecting from json_table

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • JSON, Views
    • None

    Description

      bb-10.5-hf 6dfb3fab2

      MariaDB [test]> create view v as select * from json_table('{"a":"b"}',"$" columns(a varchar(8) path '$.a')) x;
      ERROR 1352 (HY000): View's SELECT refers to a temporary table 'x'
      

      It works in MySQL:

      MySQL 8.0.19

      MySQL [test]> create view v as select * from json_table('{"a":"b"}',"$" columns(a varchar(8) path '$.a')) x;
      Query OK, 0 rows affected (0.098 sec)
       
      MySQL [test]> select * from v;
      +------+
      | a    |
      +------+
      | b    |
      +------+
      1 row in set (0.005 sec)
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            holyfoot Alexey Botchkov made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 107390 ] MariaDB v4 [ 157637 ]

            People

              holyfoot Alexey Botchkov
              elenst Elena Stepanova
              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.