Commit 3845856c authored by unknown's avatar unknown

Bug #20402: DROP USER failure logged as ERROR rather than WARNING

slave.cc, sql_acl.cc:
- remove sql_print_error() for events that are not server errors


sql/slave.cc:
  Bug #20402: DROP USER failure logged as ERROR rather than WARNING
  remove sql_print_error() for events that are not server errors
sql/sql_acl.cc:
  Bug #20402: DROP USER failure logged as ERROR rather than WARNING
  remove sql_print_error() for events that are not server errors
parent f794dc3a
...@@ -2946,7 +2946,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) ...@@ -2946,7 +2946,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
rli->is_until_satisfied()) rli->is_until_satisfied())
{ {
char buf[22]; char buf[22];
sql_print_error("Slave SQL thread stopped because it reached its" sql_print_information("Slave SQL thread stopped because it reached its"
" UNTIL position %s", llstr(rli->until_pos(), buf)); " UNTIL position %s", llstr(rli->until_pos(), buf));
/* /*
Setting abort_slave flag because we do not want additional message about Setting abort_slave flag because we do not want additional message about
......
...@@ -3671,17 +3671,11 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list) ...@@ -3671,17 +3671,11 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list)
{ {
if (!(acl_user= check_acl_user(user_name, &counter))) if (!(acl_user= check_acl_user(user_name, &counter)))
{ {
sql_print_error("DROP USER: Can't drop user: '%s'@'%s'; No such user",
user_name->user.str,
user_name->host.str);
result= -1; result= -1;
continue; continue;
} }
if ((acl_user->access & ~0)) if ((acl_user->access & ~0))
{ {
sql_print_error("DROP USER: Can't drop user: '%s'@'%s'; Global privileges exists",
user_name->user.str,
user_name->host.str);
result= -1; result= -1;
continue; continue;
} }
...@@ -3702,9 +3696,6 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list) ...@@ -3702,9 +3696,6 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list)
} }
if (counter != acl_dbs.elements) if (counter != acl_dbs.elements)
{ {
sql_print_error("DROP USER: Can't drop user: '%s'@'%s'; Database privileges exists",
user_name->user.str,
user_name->host.str);
result= -1; result= -1;
continue; continue;
} }
...@@ -3725,9 +3716,6 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list) ...@@ -3725,9 +3716,6 @@ int mysql_drop_user(THD *thd, List <LEX_USER> &list)
} }
if (counter != column_priv_hash.records) if (counter != column_priv_hash.records)
{ {
sql_print_error("DROP USER: Can't drop user: '%s'@'%s'; Table privileges exists",
user_name->user.str,
user_name->host.str);
result= -1; result= -1;
continue; continue;
} }
...@@ -3793,9 +3781,6 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list) ...@@ -3793,9 +3781,6 @@ int mysql_revoke_all(THD *thd, List <LEX_USER> &list)
{ {
if (!check_acl_user(lex_user, &counter)) if (!check_acl_user(lex_user, &counter))
{ {
sql_print_error("REVOKE ALL PRIVILEGES, GRANT: User '%s'@'%s' not exists",
lex_user->user.str,
lex_user->host.str);
result= -1; result= -1;
continue; continue;
} }
......
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