Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
13.1
-
None
Description
(this is the complementary to MDEV-23085, they should probably be fixed jointly)
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; |
grant insert (b) on db.t to foo; -- Should not be needed, but otherwise we hit MDEV-23085 |
|
|
--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): SELECT command denied to user 'foo'@'localhost' for column 'a' in table 't' |
Without RETURNING, the same INSERT works. The value of a is never returned.
MariaDB [test]> insert into db.t (a) values (1); |
Query OK, 1 row affected (0.017 sec)
|
Attachments
Issue Links
- relates to
-
MDEV-23085 INSERT .. RETURNING requires INSERT privilege on columns which only participate in RETURNING clause
-
- Open
-