Bug #73974 trunk - slow query log shows some bogus SET timestamp=4294966218; value

Submitted: 18 Sep 2014 21:41 Modified: 28 Sep 2015 19:08
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.7.6 OS:Windows
Assigned to: CPU Architecture:Any
Tags: slow query log, timestamp, WL6661

[18 Sep 2014 21:41] Shane Bester
Description:
mysqld, Version: 5.7.6-m16-log (MySQL Community Server (GPL)). started with:
TCP Port: 0, Named Pipe: (null)
Time                 Id Command    Argument
# Time: 2014-09-18T21:34:27.156489Z
# User@Host: [root] @ localhost [127.0.0.1]  Id:     1
# Query_time: 1.000627  Lock_time: 0.000000 Rows_sent: 1  Rows_examined: 0
use test;
SET timestamp=4294966218;
select sleep(1);

How to repeat:
start server with: --slow-query-log --long-query-time=0

run a slow query:     select sleep(1);

check slow log.
[20 Sep 2014 21:05] Shane Bester
The fix is simple:

=== modified file 'sql/log.cc'
--- sql/log.cc  2014-09-04 11:03:17 +0000
+++ sql/log.cc  2014-09-20 20:54:44 +0000
@@ -785,7 +785,7 @@
     timestamp to the slow log
   */
   end= my_stpcpy(end, ",timestamp=");
-  end= int10_to_str((long) current_utime / 1000000, end, 10);
+  end= int10_to_str((long) (current_utime / 1000000), end, 10);

   if (end != buff)
   {
[20 Sep 2014 21:19] Shane Bester
regression caused by:
WL#6661: Error logging: Allow control of verbosity
[28 Sep 2015 19:08] Paul DuBois
Noted in 5.7.9, 5.8.0 changelogs.

Timestamp values written to the slow query log could be incorrect.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.045 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.