Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
68214d21
Commit
68214d21
authored
Oct 17, 2013
by
Vicențiu Ciorbaru
Committed by
Sergei Golubchik
Oct 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed failing tests due to wrong delete in the testsuite.
parent
540673f0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
21 deletions
+15
-21
mysql-test/r/acl_roles_set_role-recursive.result
mysql-test/r/acl_roles_set_role-recursive.result
+4
-8
mysql-test/r/acl_roles_set_role-simple.result
mysql-test/r/acl_roles_set_role-simple.result
+1
-5
mysql-test/t/acl_roles_set_role-recursive.test
mysql-test/t/acl_roles_set_role-recursive.test
+5
-4
mysql-test/t/acl_roles_set_role-simple.test
mysql-test/t/acl_roles_set_role-simple.test
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+4
-3
No files found.
mysql-test/r/acl_roles_set_role-recursive.result
View file @
68214d21
...
...
@@ -9,14 +9,11 @@ update mysql.user set is_role='Y' where user='test_role2';
insert into mysql.roles_mapping (HostFk, UserFk, RoleFk) values ('',
'test_role1',
'test_role2');
select user, host from mysql.user;
flush privileges;
select user, host from mysql.user where user not like 'root';
user host
test_role1
test_role2
root 127.0.0.1
root ::1
root Arrakis
root localhost
test_user localhost
select * from mysql.roles_mapping;
HostFk UserFk RoleFk
...
...
@@ -81,8 +78,7 @@ GRANT USAGE ON *.* TO 'test_user'@'localhost'
select * from mysql.roles_mapping;
ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'roles_mapping'
delete from mysql.user where user='test_role1';
delete from mysql.roles_mapping where UserFk like 'test_role1';
delete from mysql.user where user='test_role2';
delete from mysql.roles_mapping where UserFk like 'test_role2';
drop user 'test_user'@'localhost';
delete from mysql.roles_mapping;
flush privileges;
drop user 'test_user'@'localhost';
mysql-test/r/acl_roles_set_role-simple.result
View file @
68214d21
...
...
@@ -4,13 +4,9 @@ update mysql.user set is_role='Y' where user='test_role1';
insert into mysql.roles_mapping (HostFk, UserFk, RoleFk) values ('localhost',
'test_user',
'test_role1');
select user, host from mysql.user;
select user, host from mysql.user
where user not like 'root'
;
user host
test_role1
root 127.0.0.1
root ::1
root Arrakis
root localhost
test_user localhost
select * from mysql.roles_mapping;
HostFk UserFk RoleFk
...
...
mysql-test/t/acl_roles_set_role-recursive.test
View file @
68214d21
...
...
@@ -13,7 +13,9 @@ update mysql.user set is_role='Y' where user='test_role2';
insert
into
mysql
.
roles_mapping
(
HostFk
,
UserFk
,
RoleFk
)
values
(
''
,
'test_role1'
,
'test_role2'
);
select
user
,
host
from
mysql
.
user
;
flush
privileges
;
select
user
,
host
from
mysql
.
user
where
user
not
like
'root'
;
select
*
from
mysql
.
roles_mapping
;
grant
select
on
*.*
to
'test_role2'
@
''
;
select
*
from
mysql
.
user
where
user
like
'test_role%'
;
...
...
@@ -56,8 +58,7 @@ select * from mysql.roles_mapping;
change_user
'root'
;
delete
from
mysql
.
user
where
user
=
'test_role1'
;
delete
from
mysql
.
roles_mapping
where
UserFk
like
'test_role1'
;
delete
from
mysql
.
user
where
user
=
'test_role2'
;
delete
from
mysql
.
roles_mapping
where
UserFk
like
'test_role2'
;
drop
user
'test_user'
@
'localhost'
;
delete
from
mysql
.
roles_mapping
;
flush
privileges
;
drop
user
'test_user'
@
'localhost'
;
mysql-test/t/acl_roles_set_role-simple.test
View file @
68214d21
...
...
@@ -7,7 +7,7 @@ update mysql.user set is_role='Y' where user='test_role1';
insert
into
mysql
.
roles_mapping
(
HostFk
,
UserFk
,
RoleFk
)
values
(
'localhost'
,
'test_user'
,
'test_role1'
);
select
user
,
host
from
mysql
.
user
;
select
user
,
host
from
mysql
.
user
where
user
not
like
'root'
;
select
*
from
mysql
.
roles_mapping
;
grant
select
on
*.*
to
'test_role1'
@
''
;
select
*
from
mysql
.
user
where
user
=
'test_role1'
;
...
...
sql/sql_acl.cc
View file @
68214d21
...
...
@@ -543,7 +543,7 @@ static uchar* acl_entry_get_key(acl_entry *entry, size_t *length,
return
(
uchar
*
)
entry
->
key
;
}
static
uchar
*
acl_role_get_key
(
ACL_
USER
*
entry
,
size_t
*
length
,
static
uchar
*
acl_role_get_key
(
ACL_
ROLE
*
entry
,
size_t
*
length
,
my_bool
not_used
__attribute__
((
unused
)))
{
*
length
=
(
uint
)
entry
->
user
.
length
;
...
...
@@ -2377,9 +2377,9 @@ int add_role_user_mapping(ROLE_GRANT_PAIR *mapping)
}
else
{
DBUG_PRINT
(
"warning"
,
(
"Invalid add_role_user_mapping '%s'@'%s' %s"
,
DBUG_PRINT
(
"warning"
,
(
"Invalid add_role_user_mapping '%s'@'%s' %s
%p %p
"
,
mapping
->
u_uname
,
mapping
->
u_hname
,
mapping
->
r_uname
));
mapping
->
r_uname
,
user
,
role
));
return
-
1
;
}
...
...
@@ -2725,6 +2725,7 @@ find_acl_role(const char *user)
{
DBUG_ENTER
(
"find_acl_role"
);
DBUG_PRINT
(
"enter"
,(
"user: '%s'"
,
user
));
DBUG_PRINT
(
"info"
,
(
"Hash elements: %ld"
,
acl_roles
.
records
));
mysql_mutex_assert_owner
(
&
acl_cache
->
lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment