[MDEV-22302] JSON_TABLE: Column privilege is insufficient for query with json_table Created: 2020-04-19  Updated: 2020-04-27  Resolved: 2020-04-27

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System, JSON
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-17399 Add support for JSON_TABLE Closed

 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.


Generated at Thu Feb 08 09:13:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.