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

JSON_TABLE: Column privilege is insufficient for query with json_table

    XMLWordPrintable

Details

    Description

      drop database if exists db;
      drop user if exists u@localhost;
      create database db;
      use db;
      create table t (a text);
      insert into t values ('{"foo":"bar"}');
      create user u@localhost;
      grant select (a) on db.t to u@localhost;
       
      --connect (con1,localhost,u,,db)
      select a from t;
      select * from t, json_table(t.a, '$' columns(f varchar(20) path '$.foo')) as jt;
      

      bb-10.5-hf 6dfb3fab2

      MariaDB [db]> select * from t, json_table(t.a, '$' columns(f varchar(20) path '$.foo')) as jt;
      ERROR 1142 (42000): SELECT command denied to user 'u'@'localhost' for table 'jt'
      

      It works on MySQL 8.0.19.

      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.