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

JSON_TABLE: Cannot create a view selecting from json_table

    XMLWordPrintable

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

            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.