summaryrefslogtreecommitdiff
path: root/sql/opt_trace_context.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2021-12-17 20:29:41 +0300
committerSergei Petrunia <sergey@mariadb.com>2022-03-07 20:33:33 +0300
commit39570001084ad06556a660dcee6ad951955436e2 (patch)
tree0e69a786a40edb2c8bdd2c4689883b8ee7741bd2 /sql/opt_trace_context.h
parent06988bdcaa2d1af2c178c199b7f65dbafda45a2c (diff)
downloadmariadb-git-bb-10.7-mdev27188.tar.gz
MDEV-27188: Suppress optimizer output when executing preparebb-10.7-mdev27188
- Do not write anything into Optimizer Trace at Prepare phase - When the query gets an error at Prepare phase, make sure there is no trace written, either. This is important as we need to produce the same trace for "mtr --ps-protocol" and regular mtr run. - For other kinds of errors, trace is still produced as it might be valuable. (variant 3)
Diffstat (limited to 'sql/opt_trace_context.h')
-rw-r--r--sql/opt_trace_context.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/opt_trace_context.h b/sql/opt_trace_context.h
index f578a0c67ec..ae77c94fdc2 100644
--- a/sql/opt_trace_context.h
+++ b/sql/opt_trace_context.h
@@ -114,6 +114,12 @@ public:
bool is_enabled();
+ void abort_trace()
+ {
+ delete current_trace;
+ current_trace= NULL;
+ }
+
void missing_privilege();
static const char *flag_names[];