summaryrefslogtreecommitdiff
path: root/sql/opt_trace.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2022-06-18 00:49:15 -0700
committerIgor Babaev <igor@askmonty.org>2022-06-18 00:49:15 -0700
commit2f09d93bc4054a965178f1a1d953924f09739b56 (patch)
tree7f02ea6d1d7c0e9a41ea6267fe5eac4989a23c55 /sql/opt_trace.cc
parentd371e35257c45895318c4efbed20e5bfdcc7cee9 (diff)
downloadmariadb-git-bb-10.10-mdev-28883.tar.gz
MDEV-27159 Re-design the upper level of handling DML commandsbb-10.10-mdev-28883
This patch allows to execute only single-table and multi-table UPDATE and DELETE statements using the method Sql_cmd_dml::execute(). The code that handles INSERT statements has not been touched.
Diffstat (limited to 'sql/opt_trace.cc')
-rw-r--r--sql/opt_trace.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_trace.cc b/sql/opt_trace.cc
index 4bc493940fb..33209ff0a8c 100644
--- a/sql/opt_trace.cc
+++ b/sql/opt_trace.cc
@@ -491,7 +491,8 @@ void Opt_trace_start::init(THD *thd,
!list_has_optimizer_trace_table(tbl) &&
!sets_var_optimizer_trace(sql_command, set_vars) &&
!thd->system_thread &&
- !ctx->disable_tracing_if_required())
+ !ctx->disable_tracing_if_required() &&
+ !(thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_PREPARE))
{
ctx->start(thd, tbl, sql_command, query, query_length, query_charset,
thd->variables.optimizer_trace_max_mem_size);