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
09ec8e2e
Commit
09ec8e2e
authored
Jul 30, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve the error message for a dropped current role
parent
4635218c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
mysql-test/suite/roles/drop_current_role.result
mysql-test/suite/roles/drop_current_role.result
+1
-1
mysql-test/suite/roles/drop_current_role.test
mysql-test/suite/roles/drop_current_role.test
+1
-1
sql/sql_acl.cc
sql/sql_acl.cc
+5
-3
No files found.
mysql-test/suite/roles/drop_current_role.result
View file @
09ec8e2e
...
...
@@ -2,4 +2,4 @@ create role r;
set role r;
drop role r;
revoke all on *.* from current_role;
ERROR
42000: There is no such grant defined for user 'r' on host ''
ERROR
OP000: Invalid role specification `r`.
mysql-test/suite/roles/drop_current_role.test
View file @
09ec8e2e
...
...
@@ -5,5 +5,5 @@
create
role
r
;
set
role
r
;
drop
role
r
;
error
ER_
NONEXISTING_GRANT
;
error
ER_
INVALID_ROLE
;
revoke
all
on
*.*
from
current_role
;
sql/sql_acl.cc
View file @
09ec8e2e
...
...
@@ -3475,13 +3475,15 @@ static int replace_user_table(THD *thd, TABLE *table, LEX_USER &combo,
table
->
key_info
->
key_length
);
if
(
table
->
file
->
ha_index_read_idx_map
(
table
->
record
[
0
],
0
,
user_key
,
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
HA_WHOLE_KEY
,
HA_READ_KEY_EXACT
))
{
/* what == 'N' means revoke */
if
(
what
==
'N'
)
{
my_error
(
ER_NONEXISTING_GRANT
,
MYF
(
0
),
combo
.
user
.
str
,
combo
.
host
.
str
);
if
(
combo
.
host
.
length
)
my_error
(
ER_NONEXISTING_GRANT
,
MYF
(
0
),
combo
.
user
.
str
,
combo
.
host
.
str
);
else
my_error
(
ER_INVALID_ROLE
,
MYF
(
0
),
combo
.
user
.
str
);
goto
end
;
}
/*
...
...
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