Is the [ON UPDATE <update_value>]
only available to datetime/timestamp columns?
When trying to modify a column (also happens with CREATE TABLE
), I get an error:
alter table keywords modify column indexed tinyint(1) unsigned not null default 0 on update 0;
ERROR 1064 ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘0’ at line 1
The documentation is not entirely clear about supported data types.
The behaviour is helpful to CDC functionality. I’m also testing nullable timestamps, but they consume more disk space than integers.