Bug #6534 | Timestamp fields in the same table seem to be linked or in error | ||
---|---|---|---|
Submitted: | 9 Nov 2004 23:23 | Modified: | 10 Nov 2004 16:59 |
Reporter: | Paul Servant | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0.22 | OS: | Linux (Debian) |
Assigned to: | CPU Architecture: | Any |
[9 Nov 2004 23:23]
Paul Servant
[10 Nov 2004 12:56]
MySQL Verification Team
Verified with 4.0.23-debug-log
[10 Nov 2004 13:44]
MySQL Verification Team
Sorry, this is not a bug. You set the second timestamp column to NOW(). First timestamp column is updated automatically.
[10 Nov 2004 16:32]
Paul Servant
Thanks for the quick response. Why does MySQL function this way? I had version 3.6 and I was updating the second timestamp with now() and the first one wasn't affected.
[10 Nov 2004 16:44]
Paul Servant
I was wrong about the timestamp field in version 3.6. I was using the datetime type. I would still like to understand why the two timestamps are linked. Is there an article I can read. Thanks.
[10 Nov 2004 16:59]
MySQL Verification Team
They are not linked. First timestamp column are always set to the current date and time value during UPDATE, the second column was set to the current date and time value by you. For more info, please, read MySQL manual.
[10 Nov 2004 17:04]
Paul DuBois
Sure, you can read the part of the MySQL Reference Manual that discusses these data types: http://dev.mysql.com/doc/mysql/en/Date_and_time_types.html
[10 Nov 2004 19:36]
Paul Servant
Thanks for the help.