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

JSON_TABLE: Cannot create a view selecting from json_table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: N/A
    • Component/s: JSON, Views
    • Labels:
      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

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

                Dates

                Created:
                Updated:
                Resolved: