Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-9505

On MariaDB and MySQL an update operation leads to an update of date fields if column type is timestamp

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.10.0, 7.10.0-alpha6
    • 7.10.0
    • None
    • None

      Steps to reproduce
      Setup the Engine with a MariaDB or MySQL database

      If an update statement is executed against a table that has columns of type TIMESTAMP without any constraint or with constraint NOT NULL, ...

      Observed behavior
      ...the value of these fields are automatically updated with the current timestamp

      Expected behavior
      ... the original timestamp value of these fields are preserved

      Root cause

      • if a table is created without any constraint on column of type TIMESTAMP or with constraint NOT NULL, the implicit default value is timestamp(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) and the field is updated with the current timestamp
      • if a table is created with NULL constraint on column of type TIMESTAMP, the respective field is not updated with current timestamp as the implicit default value is NULL DEFAULT NULL

      Hint

      • Examples of this misbehaviour: ACT_RU_INCIDENT, ACT_RU_TASK, etc.
      • Please check any further table

        This is the controller panel for Smart Panels app

              nikola.koevski Nikola Koevski
              tassilo.weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: