It was a side effect, in a way. In earlier versions, the default could be either a constant or CURRENT_TIMESTAMP.
Now it's just an expression, so the default value is printed like any expression is. See how CURRENT_TIMESTAMP is printed elsewhere:
MariaDB [test]> explain extended select CURRENT_TIMESTAMP;
|
+------+-------------+-------+------+---------------+------+---------+------+------+----------+----------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
|
+------+-------------+-------+------+---------------+------+---------+------+------+----------+----------------+
|
| 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used |
|
+------+-------------+-------+------+---------------+------+---------+------+------+----------+----------------+
|
1 row in set, 1 warning (0.00 sec)
|
|
Note (Code 1003): select current_timestamp() AS `CURRENT_TIMESTAMP`
|
MariaDB [test]> create view v1 as SELECT CURRENT_TIMESTAMP; show create view v1;
|
Query OK, 0 rows affected (0.00 sec)
|
|
+------+-------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| View | Create View | character_set_client | collation_connection |
|
+------+-------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
| v1 | CREATE ALGORITHM=UNDEFINED DEFINER=`serg`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select current_timestamp() AS `CURRENT_TIMESTAMP` | utf8 | utf8_general_ci |
|
+------+-------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
|
1 row in set (0.00 sec)
|
Now CURRENT_TIMESTAMP is consistently printed everywhere. In earlier versions, the sequence of letters "DEFAULT CURRENT_TIMESTAMP" was hard-coded, so CURRENT_TIMESTAMP was printed differently in DEFAULT as compared to all other cases.
Any comment on this?