1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

10.0-base merge

This commit is contained in:
Sergei Golubchik
2013-07-18 16:46:57 +02:00
1818 changed files with 11042 additions and 3689 deletions

View File

@ -1110,6 +1110,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->enable_slow_log= TRUE;
thd->query_plan_flags= QPLAN_INIT;
thd->lex->sql_command= SQLCOM_END; /* to avoid confusing VIEW detectors */
DEBUG_SYNC(thd,"dispatch_command_before_set_time");
thd->set_time();
if (!(server_command_flags[command] & CF_SKIP_QUERY_ID))
thd->set_query_id(next_query_id());
@ -1289,6 +1292,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->update_server_status();
thd->protocol->end_statement();
query_cache_end_of_result(thd);
mysql_audit_general(thd, MYSQL_AUDIT_GENERAL_STATUS,
thd->stmt_da->is_error() ? thd->stmt_da->sql_errno()
: 0, command_name[command].str);
ulong length= (ulong)(packet_end - beginning_of_next_stmt);
log_slow_statement(thd);
@ -1689,6 +1697,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
thd->m_statement_psi= NULL;
thd->set_time();
dec_thread_running();
thd->packet.shrink(thd->variables.net_buffer_length); // Reclaim some memory
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
@ -4130,6 +4139,17 @@ end_with_restore_list:
lex->kill_signal);
break;
}
case SQLCOM_SHUTDOWN:
#ifndef EMBEDDED_LIBRARY
if (check_global_access(thd,SHUTDOWN_ACL))
goto error;
kill_mysql();
my_ok(thd);
#else
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "embedded server");
#endif
break;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
case SQLCOM_SHOW_GRANTS:
{
@ -6700,6 +6720,8 @@ TABLE_LIST *st_select_lex::nest_last_join(THD *thd)
for (uint i=0; i < 2; i++)
{
TABLE_LIST *table= join_list->pop();
if (!table)
DBUG_RETURN(NULL);
table->join_list= embedded_list;
table->embedding= ptr;
embedded_list->push_back(table);