Bug #101486 | Error when UTC_TIMESTAMP set as default value | ||
---|---|---|---|
Submitted: | 6 Nov 2020 3:53 | Modified: | 3 Dec 2020 17:58 |
Reporter: | John Carew | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
Version: | 8.0.22 | OS: | CentOS (8) |
Assigned to: | CPU Architecture: | x86 |
[6 Nov 2020 3:53]
John Carew
[6 Nov 2020 3:58]
John Carew
If I run this before the ALTER, it works; and then have to run another to set it back. Prior to ALTER ALTER TABLE test_timestamp CHANGE created created datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, CHANGE modified modified datetime NOT NULL DEFAULT CURRENT_TIMESTAMP; After ALTER ALTER TABLE test_timestamp CHANGE created created datetime NOT NULL DEFAULT (UTC_TIMESTAMP()), CHANGE modified modified datetime NOT NULL DEFAULT (UTC_TIMESTAMP());
[6 Nov 2020 7:12]
MySQL Verification Team
Hello John Carew, Thank you for the report and test case. regards, Umesh
[14 Nov 2020 2:17]
John Carew
Were you able to replicate the issue?
[16 Nov 2020 8:00]
Ståle Deraas
Yes, it was verified.
[16 Nov 2020 21:55]
John Carew
What is the expected fix timeframe for this? This is causing us to straight l drastically have to change update scripts to deploy updates to our dev databases.
[3 Dec 2020 17:58]
Paul DuBois
Posted by developer: Fixed in 8.0.24. Creating a table containing a column with a nonconstant default expression caused subsequent ALTER TABLE statments to fail.