Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.5
-
None
Description
create database db; |
create table db.t (a int, b int); |
create user foo; |
grant insert (a) on db.t to foo; |
grant select (b) on db.t to foo; |
|
--connect (con1,localhost,foo,,)
|
insert into db.t (a) values (1) returning b; |
|
# Cleanup
|
--disconnect con1
|
--connection default
|
drop database db; |
drop user foo; |
10.5 6cee9b1953 |
MariaDB [test]> insert into db.t (a) values (1) returning b; |
ERROR 1143 (42000): INSERT command denied to user 'foo'@'localhost' for column 'b' in table 't' |
Without RETURNING, the same INSERT works, so the INSERT privilege isn't really needed:
MariaDB [test]> insert into db.t (a) values (1); |
Query OK, 1 row affected (0.017 sec)
|