[MDEV-5221] User auto-creation does not work upon GRANT <role> Created: 2013-11-01  Updated: 2014-02-04  Resolved: 2014-02-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.5
Fix Version/s: 10.0.8

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-4397 Roles Closed
relates to MDEV-5164 Testing Roles Closed

 Description   

As discussed on IRC, it should work as a normal GRANT <privilege>, but now it doesn't. The test case is below, cannot push it or record the result since it doesn't work.

--disable_warnings
drop database if exists db;
--enable_warnings
--error 0,ER_CANNOT_USER
drop role auto_create;
 
create database db;
create role auto_create;
grant all on db.* to auto_create;
 
--error 0,ER_CANNOT_USER
drop user foo@localhost, bar@localhost;
 
grant auto_create to foo@localhost;
grant auto_create to bar@localhost identified by 'baz';
 
--connect (con1,localhost,foo,,db)
set role 'auto_create';
create table t1 (i int);
--disconnect con1
 
--connect (con1,localhost,bar,baz,db)
set role auto_create;
insert into t1 values (1);
--disconnect con1
 
--connection default
drop user foo@localhost, bar@localhost;
 
set @sql_mode_saved = @@sql_mode;
set sql_mode = 'no_auto_create_user';
 
--error ER_PASSWORD_NO_MATCH
grant auto_create to foo@localhost;
grant auto_create to bar@localhost identified by 'baz';
 
--error ER_ACCESS_DENIED_ERROR
--connect (con1,localhost,foo,,db)
--connect (con1,localhost,bar,baz,db)
set role auto_create;
drop table t1;
--disconnect con1
 
--connection default
 
drop user bar@localhost;
drop role auto_create;
drop database db;
 
set sql_mode = @sql_mode_saved;



 Comments   
Comment by Vicențiu Ciorbaru [ 2014-01-14 ]

Hi Sergey!

I see that this issue is marked as stalled at the moment. I don't
understand what exactly that means.

Is there something else that needs to be done for this particular issue?

Vicentiu
On 14 Jan 2014 17:29, "Sergei Golubchik (JIRA)" <jira@mariadb.atlassian.net>

Comment by Vicențiu Ciorbaru [ 2014-01-14 ]

Sorry about misspelling your name here. Phone autocomplete.

understand what exactly that means.
jira@mariadb.atlassian.net> wrote:
https://mariadb.atlassian.net/browse/MDEV-5221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
now it doesn't. The test case is below, cannot push it or record the result
since it doesn't work.

Comment by Sergei Golubchik [ 2014-01-19 ]

"stalled" is just a name of the state in a workflow, you can see a link "view workflow" next to the state. in short, it means that the issue was "in progress" and now it's not "in progress", but is not "closed" either.

But never mind that, I took your fix and pushed it into 10.0-serg tree, it will soon be in 10.0, then I'll close this issue. See above - I'm the assignee now, so you aren't expected to do anything for this issue anymore.

Generated at Thu Feb 08 07:02:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.