MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
opt_trace.h File Reference
#include "my_config.h"
#include "sql_array.h"
#include "sql_list.h"
#include "sql_cmd.h"
#include "opt_trace_context.h"
Include dependency graph for opt_trace.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Opt_trace_object
class  Opt_trace_array
class  Opt_trace_disable_I_S
class  Opt_trace_start

Macros

#define opt_trace_print_expanded_query(thd, select_lex, trace_object)   do {} while (0)
#define opt_trace_disable_if_no_view_access(thd, view, underlying_tables)   do {} while (0)
#define opt_trace_disable_if_no_stored_proc_func_access(thd, sp)   do{} while(0)
#define opt_trace_disable_if_no_security_context_access(thd)   do {} while (0)
#define OPT_TRACE_TRANSFORM(trace, object_level0, object_level1,select_number, from, to)

Detailed Description

API for the Optimizer trace (WL#5257)

Doxygen parses include files in order to find defined symbols, which in turn influence what code is scanned. OPTIMIZER_TRACE must be defined for the optimizer trace code to be documented. Doxygen searches for include files in "INCLUDE_PATH". But in out-of-source builds, this path varies accross builds. An alternative is to use PREDEFINED = OPTIMIZER_TRACE

Definition in file opt_trace.h.

Macro Definition Documentation

#define OPT_TRACE_TRANSFORM (   trace,
  object_level0,
  object_level1,
  select_number,
  from,
  to 
)
Value:
Opt_trace_object object_level0(trace); \
Opt_trace_object object_level1(trace, "transformation"); \
object_level1.add_select_number(select_number); \
object_level1.add_alnum("from", from).add_alnum("to", to);

Helper for defining query-transformation-related trace objects in one code line. This produces { "transformation": { "select#": <select_number>, "from": <from>, "to": <to> The objects are left open, so that one can add more to them (often a "chosen" property after making some computation). Objects get closed when going out of scope as usual.

Parameters
traceoptimizer trace
object_level0name of the outer Opt_trace_object C++ object
object_level1name of the inner Opt_trace_object C++ object
select_numbernumber of the being-transformed SELECT_LEX
fromdescription of the before-transformation state
todescription of the after-transformation state

Definition at line 1231 of file opt_trace.h.