mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 10.11 into 11.0
This commit is contained in:
@ -4575,7 +4575,10 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
|
||||
thd->protocol= save_protocol;
|
||||
}
|
||||
if (!res && thd->lex->analyze_stmt)
|
||||
res= thd->lex->explain->send_explain(thd);
|
||||
{
|
||||
bool extended= thd->lex->describe & DESCRIBE_EXTENDED;
|
||||
res= thd->lex->explain->send_explain(thd, extended);
|
||||
}
|
||||
delete sel_result;
|
||||
MYSQL_INSERT_DONE(res, (ulong) thd->get_row_count_func());
|
||||
/*
|
||||
@ -4755,7 +4758,10 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
|
||||
thd->protocol= save_protocol;
|
||||
}
|
||||
if (!res && (explain || lex->analyze_stmt))
|
||||
res= thd->lex->explain->send_explain(thd);
|
||||
{
|
||||
bool extended= thd->lex->describe & DESCRIBE_EXTENDED;
|
||||
res= thd->lex->explain->send_explain(thd, extended);
|
||||
}
|
||||
|
||||
/* revert changes for SP */
|
||||
MYSQL_INSERT_SELECT_DONE(res, (ulong) thd->get_row_count_func());
|
||||
@ -4822,7 +4828,10 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
|
||||
if (thd->lex->analyze_stmt || thd->lex->describe)
|
||||
{
|
||||
if (!res)
|
||||
res= thd->lex->explain->send_explain(thd);
|
||||
{
|
||||
bool extended= thd->lex->describe & DESCRIBE_EXTENDED;
|
||||
res= thd->lex->explain->send_explain(thd, extended);
|
||||
}
|
||||
}
|
||||
|
||||
delete sel_result;
|
||||
@ -4883,7 +4892,10 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
|
||||
else
|
||||
{
|
||||
if (lex->describe || lex->analyze_stmt)
|
||||
res= thd->lex->explain->send_explain(thd);
|
||||
{
|
||||
bool extended= thd->lex->describe & DESCRIBE_EXTENDED;
|
||||
res= thd->lex->explain->send_explain(thd, extended);
|
||||
}
|
||||
}
|
||||
multi_delete_error:
|
||||
delete result;
|
||||
@ -6276,7 +6288,10 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
|
||||
thd->protocol= save_protocol;
|
||||
}
|
||||
if (!res)
|
||||
res= thd->lex->explain->send_explain(thd);
|
||||
{
|
||||
bool extended= thd->lex->describe & DESCRIBE_EXTENDED;
|
||||
res= thd->lex->explain->send_explain(thd, extended);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9278,7 +9293,9 @@ static my_bool kill_threads_callback(THD *thd, kill_threads_callback_arg *arg)
|
||||
if (!(arg->thd->security_ctx->master_access &
|
||||
PRIV_KILL_OTHER_USER_PROCESS) &&
|
||||
!arg->thd->security_ctx->user_matches(thd->security_ctx))
|
||||
return 1;
|
||||
{
|
||||
return MY_TEST(arg->thd->security_ctx->master_access & PROCESS_ACL);
|
||||
}
|
||||
if (!arg->threads_to_kill.push_back(thd, arg->thd->mem_root))
|
||||
{
|
||||
mysql_mutex_lock(&thd->LOCK_thd_kill); // Lock from delete
|
||||
@ -9398,7 +9415,10 @@ sql_kill_user(THD *thd, LEX_USER *user, killed_state state)
|
||||
my_ok(thd, rows);
|
||||
break;
|
||||
case ER_KILL_DENIED_ERROR:
|
||||
my_error(error, MYF(0), (long long) thd->thread_id);
|
||||
char buf[DEFINER_LENGTH+1];
|
||||
strxnmov(buf, sizeof(buf), user->user.str, "@", user->host.str, NULL);
|
||||
my_printf_error(ER_KILL_DENIED_ERROR, ER_THD(thd, ER_CANNOT_USER), MYF(0),
|
||||
"KILL USER", buf);
|
||||
break;
|
||||
case ER_OUT_OF_RESOURCES:
|
||||
default:
|
||||
|
Reference in New Issue
Block a user