Bug #68040 | ALTER TABLE ADD COLUMN TIMESTAMP DEFAULT CURRENT_TIMESTAMP still inserts zero | ||
---|---|---|---|
Submitted: | 6 Jan 2013 2:08 | Modified: | 1 Mar 2013 16:51 |
Reporter: | Elena Stepanova | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
Version: | 5.6.9 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[6 Jan 2013 2:08]
Elena Stepanova
[6 Jan 2013 5:59]
MySQL Verification Team
verified as described!
[6 Jan 2013 10:21]
Peter Laursen
Isn't this bug report of mine somewhat related? http://bugs.mysql.com/bug.php?id=17392
[6 Jan 2013 13:13]
Elena Stepanova
Hi Peter, Certainly it is. As Timour's comment (quoted in the description) says, "it is an incomplete fix for MySQL's Bug#11745578: 17392 ..." -- there 17392 stands for your original bug report. From my experience, it's not a great idea to revive a bug report which was already handled, it causes confusion in fixed versions etc., so I've created a new one which is the 2nd generation of yours.
[30 Jan 2013 14:08]
Guilhem Bichot
The fix for Bug11745578 only covered the case where ALTER TABLE creates a new copy of the table, it forgot the case of "in-place ALTER", so it did not work for InnoDB.
[1 Mar 2013 16:51]
Paul DuBois
Noted in 5.6.11, 5.7.1 changelogs. ALTER TABLE tbl_name ADD COLUMN col_name TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP inserted 0000-00-00 00:00:00 rather than the current timestamp if the alteration was done in place rather than by making a table copy.