MariaDB: Executing stored procedure, Select denied, privilege via role

83 views Asked by At

I have created a stored procedure with a user db_owner (Definer = db_owner, SQL Security Definer). This procedure selects some data from a table. The db_owner has full select privilege on all tables of his database via a role. Executing the procedure works fine, also selects from this table. Another user db_connect has execute privilege for the procedure, executing procedure works also fine, but I get an error "ERROR 1142 (42000): SELECT command denied to user db_owner'@'host' for table 'xxx'"

If I grant a privilege to the user db_owner (grant select on db.'xxx' to db_owner@'host') without using the role, it works. Have anyone a better idea? I want to use roles.

MariaDB 10.3

0

There are 0 answers