Only increase if profile_counters is intialized

This commit is contained in:
Alejandro 2024-08-28 23:26:13 +01:00
parent 100c560cb8
commit 91724c29a4

View File

@ -421,8 +421,12 @@ void logQueryFinish(
Progress p;
p.incrementPiecewiseAtomically(Progress{ResultProgress{elem.result_rows, elem.result_bytes}});
UInt64 real_time_microseconds = (*info.profile_counters)[ProfileEvents::RealTimeMicroseconds];
p.incrementRealTimeMicroseconds(real_time_microseconds);
if (info.profile_counters)
{
UInt64 real_time_microseconds = (*info.profile_counters)[ProfileEvents::RealTimeMicroseconds];
p.incrementRealTimeMicroseconds(real_time_microseconds);
}
progress_callback(p);
}