[MDEV-23715] UTC_TIMESTAMP() should work with ON UPDATE for DATETIME type Created: 2020-09-11 Updated: 2020-09-11 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Jeff Groves | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Description |
|
It is now possible to create DATETIME columns with a DEFAULT of UTC_TIMESTAMP(), but it is not possible to use ON UPDATE UTC_TIMESTAMP(). Only ON UPDATE CURRENT_TIMESTAMP() will work. For example, this will NOT work:
But this will work:
Instead of using TIMESTAMP fields (which stop working for dates past the year 2038), |