Commit d5c97122 authored by Sergei Golubchik's avatar Sergei Golubchik

post-review cleanup

parent e46eea86
# #
# MDEV-5176 Server crashes in fill_schema_applicable_roles on select from APPLICABLE_ROLES after a suicide # MDEV-5176 Server crashes in fill_schema_applicable_roles on select from APPLICABLE_ROLES after a suicide
# #
--source include/not_embedded.inc
grant create user on *.* to foo@localhost; grant create user on *.* to foo@localhost;
--connect (foo,localhost,foo,,) --connect (foo,localhost,foo,,)
......
...@@ -2866,7 +2866,7 @@ bool Query_log_event::write(IO_CACHE* file) ...@@ -2866,7 +2866,7 @@ bool Query_log_event::write(IO_CACHE* file)
else else
{ {
user.str= ctx->priv_role; user.str= ctx->priv_role;
host= null_lex_str; // XXX FIXME or empty_lex_str ? host= empty_lex_str;
} }
user.length= strlen(user.str); user.length= strlen(user.str);
} }
......
This diff is collapsed.
...@@ -3908,8 +3908,6 @@ case SQLCOM_PREPARE: ...@@ -3908,8 +3908,6 @@ case SQLCOM_PREPARE:
case SQLCOM_REVOKE_ROLE: case SQLCOM_REVOKE_ROLE:
case SQLCOM_GRANT_ROLE: case SQLCOM_GRANT_ROLE:
{ {
/* TODO access check */
if (!(res= mysql_grant_role(thd, lex->users_list, if (!(res= mysql_grant_role(thd, lex->users_list,
lex->sql_command != SQLCOM_GRANT_ROLE))) lex->sql_command != SQLCOM_GRANT_ROLE)))
my_ok(thd); my_ok(thd);
......
...@@ -822,6 +822,10 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, ...@@ -822,6 +822,10 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
goto err; goto err;
} }
/*
version 1 - before 10.0.5
version 2 - empty definer_host means a role
*/
view->file_version= 2; view->file_version= 2;
view->calc_md5(md5); view->calc_md5(md5);
if (!(view->md5.str= (char*) thd->memdup(md5, 32))) if (!(view->md5.str= (char*) thd->memdup(md5, 32)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment