-
Bug Report
-
Resolution: Duplicate
-
L3 - Default
-
None
-
None
By default, MySQL/MariaDB create timestamp fields such that when an UPDATE statement is performed that does not include these fields, then they are automatically updated to the current time.
This results in several inconsistencies when we make UPDATE statements, for example:
- task create time is updated when tasks are suspended by process definition
- Incidents are updated due to a process definition migration
The problem only occurs if the respective column has no further constraint or a NOT NULL constraint, which means that e. g. ACT_RU_JOB.LOCK_EXP_TIME_ is not affected as this column has a NULL constraint.
In general, every table that uses timestamp columns may be affected, depending on the UPDATE statements we make.
Resources:
- https://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html
- https://stackoverflow.com/questions/22860351/mysql-column-type-timestamp-implicitly-includes-not-null-default-current-time)
- SQL statement SHOW CREATE TABLE <table name>; can be used to view the effective CREATE TABLE statement for a table