Details
Assignee
UnassignedUnassignedReporter
lpjirasynclpjirasync(Deactivated)Priority
LowFix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
lpjirasync
lpjirasync(Deactivated)Priority
Fix versions
Smart Checklist
Smart Checklist
Smart Checklist
Created January 24, 2018 at 9:41 PM
Updated December 20, 2023 at 3:44 AM
**Reported in Launchpad by Nickolay Ihalainen last update 09-01-2018 17:38:40
General log contains timestamps like: 2017-08-31T15:58:05.255051Z
my $genlog_line_1= qr{
\A
(?\d{6}\s+\d{1,2}:\d\d:\d\d|\d{4}\d{1,2}\d{1,2}T\d\d:\d\d:\d\d\.\d+Z))? # Timestamp
\s+
(?:\s*(\d+)) # Thread ID
\s
(\w+) # Command
\s+
(.*) # Argument
\Z
}xs;
It's not considered as proper TS or as mysql TS in parse_timestamp function and QPS always calculated as 0:
$mysql_ts = qr/(\d\d)(\d\d)(\d\d) (\d)\d+)\d+)(\.\d+)?/;
$proper_ts = qr/(\d\d\d\d)(\d\d)(\d\d)[T ](\d\d)\d\d)\d\d)(\.\d+)?/;
Suggested fix remove Z from genlog_line_1:
(?\d{6}\s+\d{1,2}:\d\d:\d\d|\d{4}\d{1,2}\d{1,2}T\d\d:\d\d:\d\d\.\d+))?Z? # Timestamp
/opt/mysql/product/mysql/bin/mysqld, Version: 5.7.18-15-29.20-log (Percona XtraDB Cluster binary (GPL) 5.7.18-29.20, Revision 7693d6e, wsrep_29.20). started with:
Tcp port: 3306 Unix socket: /opt/mysql/product/mysql/mysql3306.sock
Time Id Command Argument
2017-08-31T15:58:05.255051Z 2166396 Query SELECT 1
2017-08-31T15:59:05.255051Z 2166396 Query SELECT 1