mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
[SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Handle statements inside SPs: = regular statements = SET command, which does not have its own statement. - Handle execution of subquery from range optimizer: allocate subquery QPFs on the same MEM_ROOT as the whole query plan was allocated.
This commit is contained in:
@ -598,10 +598,7 @@ static void handle_bootstrap_impl(THD *thd)
|
||||
#if defined(ENABLED_PROFILING)
|
||||
thd->profiling.finish_current_query();
|
||||
#endif
|
||||
//
|
||||
delete thd->lex->query_plan_footprint;
|
||||
thd->lex->query_plan_footprint= NULL;
|
||||
//
|
||||
delete_qpf_query(thd->lex);
|
||||
|
||||
if (bootstrap_error)
|
||||
break;
|
||||
@ -1523,8 +1520,7 @@ void log_slow_statement(THD *thd)
|
||||
{
|
||||
DBUG_ENTER("log_slow_statement");
|
||||
|
||||
delete thd->lex->query_plan_footprint;
|
||||
thd->lex->query_plan_footprint= NULL;
|
||||
delete_qpf_query(thd->lex);
|
||||
|
||||
/*
|
||||
The following should never be true with our current code base,
|
||||
@ -2188,8 +2184,7 @@ mysql_execute_command(THD *thd)
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
}
|
||||
|
||||
DBUG_ASSERT(!thd->lex->query_plan_footprint);
|
||||
thd->lex->query_plan_footprint= new QPF_query;
|
||||
create_qpf_query(thd->lex, thd->mem_root);
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
if (lex->sql_command != SQLCOM_SET_OPTION)
|
||||
|
Reference in New Issue
Block a user