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

Method print_explain_json

sql/sql_explain.cc:266–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264
265
266int Explain_query::print_explain_json(select_result_sink *output,
267 bool is_analyze,
268 ulonglong query_time_in_progress_ms)
269{
270 Json_writer writer;
271
272#ifndef DBUG_OFF
273 DBUG_ASSERT(can_print_json);
274#endif
275
276 writer.start_object();
277
278 if (is_analyze)
279 {
280 if (query_time_in_progress_ms > 0){
281 writer.add_member("r_query_time_in_progress_ms").
282 add_ull(query_time_in_progress_ms);
283 }
284
285 print_query_optimization_json(&writer);
286 }
287
288 bool plan_found = print_query_blocks_json(&writer, is_analyze);
289 writer.end_object();
290
291 if( plan_found )
292 {
293 send_explain_json_to_output(&writer, output);
294 }
295
296 return 0;
297}
298
299void Explain_query::print_query_optimization_json(Json_writer *writer)
300{

Calls 15

write_itemFunction · 0.85
print_json_arrayFunction · 0.85
add_json_keysetFunction · 0.85
trace_engine_statsFunction · 0.85
print_r_icp_filteredFunction · 0.85
start_objectMethod · 0.80
add_ullMethod · 0.80
add_memberMethod · 0.80
end_objectMethod · 0.80
has_timed_statisticsMethod · 0.80
print_jsonMethod · 0.80

Tested by

no test coverage detected