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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
04de6ccc
Commit
04de6ccc
authored
Mar 01, 2014
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-5668 Assertion `granted_role->is_role()' fails on granting role with empty name
parser: error out on empty role names
parent
8dce8ecf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
mysql-test/suite/roles/grant_empty.result
mysql-test/suite/roles/grant_empty.result
+2
-0
mysql-test/suite/roles/grant_empty.test
mysql-test/suite/roles/grant_empty.test
+6
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+5
-0
No files found.
mysql-test/suite/roles/
show_grants_anon-5238
.result
→
mysql-test/suite/roles/
grant_empty
.result
View file @
04de6ccc
grant '' to foo@localhost;
ERROR OP000: Invalid role specification ``.
create user ''@localhost;
create role r1;
grant r1 to ''@localhost;
...
...
mysql-test/suite/roles/
show_grants_anon-5238
.test
→
mysql-test/suite/roles/
grant_empty
.test
View file @
04de6ccc
#
# MDEV-5668 Assertion `granted_role->is_role()' fails on granting role with empty name
#
--
error
ER_INVALID_ROLE
grant
''
to
foo
@
localhost
;
#
# MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user
#
...
...
sql/sql_yacc.yy
View file @
04de6ccc
...
...
@@ -15192,6 +15192,11 @@ current_role:
grant_role:
ident_or_text
{
if ($1.length == 0)
{
my_error(ER_INVALID_ROLE, MYF(0), "");
MYSQL_YYABORT;
}
if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user))))
MYSQL_YYABORT;
$$->user = $1;
...
...
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