Character Set and Localization Issues

ID #1079

When adding a TIMESTAMP column to an existing table ZERO-dates are inserted

You experience that when adding a TIMESTAMP column to an existing table (with existing rows in it) using the definition:

`ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,

... the new values are created as 0000-00-00 00:00:00 and not as CURRENT_TIMESTAMP.

After some discussion MySQL AB finally accepted that this should be considered a bug. Refer to http://bugs.mysql.com/bug.php?id=17392 for details.

As a consequence using the ALTER TABLE pane of SQLyog to add a TIMESTAMP column creates ZERO-dates in existing rows as well. No information available at the time about when this will be fixed and not either to what versions the patch will be applied when available.

Tags: -

Related entries:

Last update: 2006-05-30 04:43
Author: Peter Laursen
Revision: 1.1

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 1 out of 5 (2 Votes )

completely useless 1 2 3 4 5 most valuable

You can comment on this entry