TraceLog - add tests for event_time_microseconds

This commit is contained in:
bharatnc 2020-09-09 23:52:47 -07:00 committed by alesapin
parent b3c5aaff9e
commit c6b5ef1174
2 changed files with 19 additions and 0 deletions

View File

@ -1,2 +1,4 @@
01473_metric_log_table_event_start_time_microseconds_test 01473_metric_log_table_event_start_time_microseconds_test
ok ok
01473_trace_log_table_event_start_time_microseconds_test
ok

View File

@ -22,3 +22,20 @@ WITH (
LIMIT 1 LIMIT 1
) AS time) ) AS time)
SELECT if(dateDiff('second', toDateTime(time_with_microseconds), toDateTime(time)) = 0, 'ok', 'fail') SELECT if(dateDiff('second', toDateTime(time_with_microseconds), toDateTime(time)) = 0, 'ok', 'fail')
select '01473_trace_log_table_event_start_time_microseconds_test';
system flush logs;
WITH (
(
SELECT event_time_microseconds
FROM system.trace_log
ORDER BY event_time DESC
LIMIT 1
) AS time_with_microseconds,
(
SELECT event_time
FROM system.trace_log
ORDER BY event_time DESC
LIMIT 1
) AS time)
SELECT if(dateDiff('second', toDateTime(time_with_microseconds), toDateTime(time)) = 0, 'ok', 'fail'); -- success