Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.2(EOL)
-
None
Description
There seems to be no obvious good reason why
- MONTHNAME(..)
- DAYNAME(...)
- DATE_FORMAT(...)
- TIME_FORMAT(...)
should not work in DEFAULT clause, so it's worth checking whether it was intended:
MariaDB [test]> create table t1 (d datetime default current_timestamp, m varchar(16) default monthname(d)); |
ERROR 1901 (HY000): Function or expression 'monthname()' cannot be used in the DEFAULT clause of `m` |
Especially since MONTH() works:
MariaDB [test]> create or replace table t1 (d datetime default current_timestamp, m varchar(16) default month(d)); |
Query OK, 0 rows affected (0.58 sec) |
Attachments
Issue Links
- relates to
-
MDEV-10134 Add full support for DEFAULT
- Closed