Bug #32999 | nullable timestamp column become not-nullable | ||
---|---|---|---|
Submitted: | 5 Dec 2007 14:18 | Modified: | 5 Dec 2007 15:11 |
Reporter: | Gábor Pápai | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S2 (Serious) |
Version: | 5.x | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | nullable, timestamp |
[5 Dec 2007 14:18]
Gábor Pápai
[5 Dec 2007 14:37]
Peter Laursen
looks like on 5.x that `TIME_1_FROM` timestamp >> server creates as "`TIME_1_FROM` timestamp NOT NULL default '0000-00-00 00:00:00'" `TIME_1_FROM` timestamp NOT NULL >> same `TIME_1_FROM` timestamp NULL >> server creates as "`TIME_1_FROM` timestamp NULL DEFAULT NULL" I cannot tell if this is an intended and documented change as compared to 4.1, but rather easy to declare NULL in CREATE TABLE statement!
[5 Dec 2007 14:41]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php According to http://dev.mysql.com/doc/refman/5.0/en/timestamp.html: "TIMESTAMP columns are NOT NULL by default, cannot contain NULL values, and assigning NULL assigns the current timestamp." How to create NULLable TIMESTAMP column read at the same page.
[5 Dec 2007 15:11]
Gábor Pápai
Thank you for helping!