MCPcopy Create free account
hub / github.com/MariaDB/server / save_explain_data_intern

Method save_explain_data_intern

sql/sql_delete.cc:105–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103
104
105bool Update_plan::save_explain_data_intern(THD *thd,
106 MEM_ROOT *mem_root,
107 Explain_update *explain,
108 bool is_analyze)
109{
110 explain->select_type= "SIMPLE";
111 explain->table_name.append(table->alias);
112
113 explain->impossible_where= false;
114 explain->no_partitions= false;
115
116 if (impossible_where)
117 {
118 explain->impossible_where= true;
119 return 0;
120 }
121
122 if (no_partitions)
123 {
124 explain->no_partitions= true;
125 return 0;
126 }
127
128 if (is_analyze ||
129 (thd->variables.log_slow_verbosity &
130 LOG_SLOW_VERBOSITY_ENGINE))
131 {
132 explain->table_tracker.set_gap_tracker(&explain->extra_time_tracker);
133 table->file->set_time_tracker(&explain->table_tracker);
134
135 if (table->file->handler_stats && table->s->tmp_table != INTERNAL_TMP_TABLE)
136 explain->handler_for_stats= table->file;
137 }
138
139 select_lex->set_explain_type(TRUE);
140 explain->select_type= select_lex->type;
141 /* Partitions */
142 {
143#ifdef WITH_PARTITION_STORAGE_ENGINE
144 partition_info *part_info;
145 if ((part_info= table->part_info))
146 {
147 make_used_partitions_str(mem_root, part_info, &explain->used_partitions,
148 explain->used_partitions_list);
149 explain->used_partitions_set= true;
150 }
151 else
152 explain->used_partitions_set= false;
153#else
154 /* just produce empty column if partitioning is not compiled in */
155 explain->used_partitions_set= false;
156#endif
157 }
158
159
160 /* Set jtype */
161 if (select && select->quick)
162 {

Callers

nothing calls this directly

Calls 15

make_used_partitions_strFunction · 0.85
is_index_mergeFunction · 0.85
append_possible_keysFunction · 0.85
explain_append_mrr_infoFunction · 0.85
set_gap_trackerMethod · 0.80
set_time_trackerMethod · 0.80
set_explain_typeMethod · 0.80
get_explainMethod · 0.80
first_inner_unitMethod · 0.80
next_unitMethod · 0.80
explainableMethod · 0.80
add_childMethod · 0.80

Tested by

no test coverage detected