The type DATETIME set default value fail

Tony's profile image Tony posted 1 month ago in General Permalink

When I set the default value of DATETIME through an expression,
I found that it was enclosed in quotation marks after saving.
When I click to open it again, it will appear in the Custom text instead of the expression.
At this point, the save button for the data table is activated, and clicking save will result in an error message Description

Tony's profile image Tony posted 1 month ago Permalink

Description Description

Tony's profile image Tony posted 1 month ago Permalink

HeidiSQL current version is: 12.6.0.6786

ansgar's profile image ansgar posted 1 month ago Permalink

Yes, this is an older issue, and still a problem on some server versions, dispite of quite a few attemps from me to fix that.

So which server version is it on your side? Hopefully not a very old one?

Tony's profile image Tony posted 1 month ago Permalink

Are you saying it's due to the server version of MySQL affecting it? The current version of MySQL is:8.0.32 - Source distribution. Thanks for your reply!

Tony's profile image Tony posted 1 month ago Permalink

The version 10.7.3-MariaDB-log will show:

Description

It looks normal

ansgar's profile image ansgar posted 1 month ago Permalink

On MySQL 8.0.26, the server converts the default expression "CURRENT_TIMESTAMP()" to "NOW()", like in the image below.

1 attachment(s):
  • current-timestamp-mysql-8.0
Tony's profile image Tony posted 1 month ago Permalink

Okay, thank you again for your reply. I understand the problem

Please login to leave a reply, or register at first.