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

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: 7.10.0
    • Fix Version/s: 7.10.0, 7.10.0-alpha6
    • Component/s: None
    • Labels:
      None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: