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

JSON_TABLE: SELECT from json_table does not work without default database

    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
    • Labels:
      None

      Description

      bb-10.5-hf 6dfb3fab2

      MariaDB [(none)]> select * from json_table('{"a":0}',"$" columns(a for ordinality)) foo;
      ERROR 1046 (3D000): No database selected
      

      It works with MySQL:

      MySQL 8.0.19

      MySQL [(none)]> select * from json_table('{"a":0}',"$" columns(a for ordinality)) foo;
      +------+
      | a    |
      +------+
      |    1 |
      +------+
      1 row in set (0.001 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: