INSERT with NOW() gives incorrect timestamp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
New
|
Undecided
|
Unassigned | ||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Had a very strange issue today.
From a C program (using libmysqlclient) I am executing queries like INSERT INTO ... (t, ..) VALUES (NOW(), ...)
And similarly UPDATE .... WHERE ..=NOW()
For the past 12 hours or so all NOW() statements resulted in a TIMESTAMP of '2014-09-22 05:17:03' in the database fields.
Yeah... "huh!?"... like after that time the time stood still...
Just to be clear: the machine is running NTP and I checked the date manually, it's perfectly synchronized.
Presumably NOW() is not expanded on the client-side right? So my libmysqlclient application can't be blamed, correct?
Must be the SQL server / Percona then?
I restarted the client application - which closed the connection to the SQL server and reinitiated it - and the bug disappeared... or at least for now.
Using ubuntu:
i percona-xtrabackup 2.2.3-4982-1.trusty amd64 Open source backup tool for InnoDB and XtraDB
ii percona-
ii percona-
ii percona-
ii percona-
ii percona-
ii percona-
Changed in percona-xtradb-cluster: | |
status: | New → Incomplete |
Changed in percona-xtradb-cluster: | |
status: | Incomplete → New |
Changed in percona-server: | |
status: | Expired → New |
Changed in percona-xtradb-cluster: | |
status: | Incomplete → New |
tags: | added: i65455 |
Thank you for the problem report. Please, share the exact C code that is used to connect to MySQL server in your application.
Had you tried to run the same application over Percona Server (not Percona XtraDB Cluster) or upstream MySQL Server 5.6.20?