mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-34125: ANALYZE FORMAT=JSON: r_engine_stats.pages_read_time_ms has wrong scale
- Change the comments in class ha_handler_stats to say the members are in ticks, not milliseconds. - In sql_explain.cc, adjust the scale to print milliseconds.
This commit is contained in:
@@ -207,6 +207,9 @@ int Explain_query::send_explain(THD *thd, bool extended)
|
||||
int Explain_query::print_explain(select_result_sink *output,
|
||||
uint8 explain_flags, bool is_analyze)
|
||||
{
|
||||
/* A sanity check for ANALYZE: */
|
||||
DBUG_ASSERT(timer_tracker_frequency() != 0.0);
|
||||
|
||||
if (upd_del_plan)
|
||||
{
|
||||
upd_del_plan->print_explain(this, output, explain_flags, is_analyze);
|
||||
@@ -1723,7 +1726,7 @@ static void trace_engine_stats(handler *file, Json_writer *writer)
|
||||
writer->add_member("pages_read_count").add_ull(hs->pages_read_count);
|
||||
if (hs->pages_read_time)
|
||||
writer->add_member("pages_read_time_ms").
|
||||
add_double(hs->pages_read_time / 1000.0);
|
||||
add_double(hs->pages_read_time * 1000. / timer_tracker_frequency());
|
||||
if (hs->undo_records_read)
|
||||
writer->add_member("old_rows_read").add_ull(hs->undo_records_read);
|
||||
writer->end_object();
|
||||
|
Reference in New Issue
Block a user