Description:
It would be really useful to have a way to transalate TIMER_START and similar column (measured in picoseconds since some time after server startup) to a timetstamp (with data and time) that can be related to error log entires, I_S tables etc.
We have sys.format_time() function and the one I ask about may be similar, to be used in context more or less like this:
mysql> select event_id, @ts := date_add(@start, interval timer_start/10
00000000000 second) as ts, sql_text, now(), timediff(now(), @ts) from performance_schema.events_statements_current\G
*************************** 1. row ***************************
event_id: 657
ts: 2019-11-03 18:24:00.501654
sql_text: select event_id, @ts := date_add(@start, interval timer_start/1000000000000 second) as ts, sql_text, now(), timediff(now(), @ts) from performance_schema.events_statements_current
now(): 2019-11-03 18:24:05
timediff(now(), @ts): 00:00:04.498346
1 row in set (0.002 sec)
where @start is somehow determined timestamp of counter start.
As my example above shows, simple calculation may start to differ notably with uptime. So, something better is needed.
How to repeat:
Try to conver TIMER_START column from performance_schema into the real timestamp reliably and correctly.
Suggested fix:
If there is no reliable way to relate TIMER_START to the real life timestamp of event, please, document this as a clear limitation in the manual.