Bug #33992 | Date column not named in update statement is set to current date | ||
---|---|---|---|
Submitted: | 22 Jan 2008 20:19 | Modified: | 22 Jan 2008 21:19 |
Reporter: | Bob Hucker | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.0.45 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | update incorrect result |
[22 Jan 2008 20:19]
Bob Hucker
[22 Jan 2008 20:27]
Paul DuBois
You don't have a DATE column, you have a TIMESTAMP column, and it is behaving as expected: http://dev.mysql.com/doc/refman/5.0/en/timestamp.html You might want to use DATETIME instead.
[22 Jan 2008 21:19]
Bob Hucker
Thank you for the quick answer. Apparently creating the timestamp column with DEFAULT 0 also solves my problem. I have read the discussion in the documentation, but does this behavior really make any sense? Is it true that for this one data type, the update statement works differently than for other data types?