Bug #4128 Please allow more than one DEFAULT or ON UPDATE of CURRENT_TIMESTAMP in a table
| Submitted: | 14 Jun 2004 16:53 | Modified: | 25 Apr 2005 19:15 |
|---|---|---|---|
| Reporter: | Sophia Poirier | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S4 (Feature request) |
| Version: | 4.1.2 alpha | OS: | MacOS (Mac OS X 10.3.4) |
| Assigned to: | CPU Architecture: | Any |
[14 Jun 2004 16:53]
Sophia Poirier
[15 Jun 2004 10:37]
Sergei Golubchik
I'll close it, as it's already in our todo. The limitation lays in our .frm format (which dates back to 1980-ties) - it's doesn't have a space for new extensions (there are a couple of bits left here and there that we're trying to use, but two bits cannot be used for everything :( ). We do plan to change frm format in 5.0 (it is a big internal change - so it's not easy), then what you ask for will be possible.
[20 Apr 2005 1:12]
Steve Edberg
In comments related to the closing of this request, Sergei Golubchik [15 Jun 2004 12:37] mentioned that this was on the ToDo for MySQL 5. I'm currently testing 5.0.3 (using InnoDB tables, on solaris 8), and this feature still doesn't seem to be implemented. I searched the MySQL site, the to-do list in the documentation & the mysql-internals list and found nothing. This feature would be very useful to automatically capture both the create date & last update dates of a record. Did I miss something on the ToDo list, or has this feature been postponed? Thanks.
[25 Apr 2005 19:15]
Sergei Golubchik
It was postponed (if you take a look at frm files in the 5.0.3 you will see that they're still binary files - that is "plain-text frm" feature is not implemented). But 5.0.3 supports triggers, and you can create a trigger to set as many fields to CURRENT_TIMESTAMP as you want.
[25 Mar 2008 17:54]
Edam
Still no word on this? :o( It would be extremely handy (as noted above) for creating tables with automatic created_at and updated_at fields.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.