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

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • JSON
    • 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

              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.