Merge pull request #3422 from sysown/v2.2.0-3376

Closes #3376: Invalid timestamps reported for 'first_seen' and 'last_seen' fields from 'stats_mysql_errors'
pull/3444/head
René Cannaò 5 years ago committed by GitHub
commit 8c05d8907c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5951,17 +5951,10 @@ class MySQL_Errors_stats {
sprintf(buf,"%llu",count_star);
pta[7]=strdup(buf);
time_t __now;
time(&__now);
unsigned long long curtime=monotonic_time();
time_t seen_time;
seen_time= __now - curtime/1000000 + first_seen/1000000;
sprintf(buf,"%ld", seen_time);
sprintf(buf,"%ld", first_seen);
pta[8]=strdup(buf);
seen_time= __now - curtime/1000000 + last_seen/1000000;
sprintf(buf,"%ld", seen_time);
sprintf(buf,"%ld", last_seen);
pta[9]=strdup(buf);
assert(last_error);

Loading…
Cancel
Save