Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8630

Datetime value dropped in "INSERT ... SELECT ... ON DUPLICATE KEY"

Details

    • 5.5.47-1

    Description

      INSERT INTO ...
       SELECT ...
        GREATEST( COALESCE(`inspection`.`ts`, 0), COALESCE(`inspection_details`.`ts`, 0), COALESCE(`open_time_reason`.`ts`, 0)
       ) AS `changed_at`
       ON DUPLICATE KEY UPDATE ...
       `changed_at` = VALUES(`changed_at`)

      In MySQL the changed_at will be the expected value from the greatest function, but in MariaDB it will be '0000-00-00 00:00:00'

      Attachments

        1. test.query.sql
          2 kB
          Raymond Xu
        2. test.sql.gz
          3.14 MB
          Raymond Xu
        3. test.variables.txt
          61 kB
          Raymond Xu

        Activity

          Transition Time In Source Status Execution Times
          Elena Stepanova made transition -
          Open Confirmed
          2d 18h 8m 1
          Alexander Barkov made transition -
          Confirmed Closed
          105d 23h 13m 1

          People

            bar Alexander Barkov
            raynix Raymond Xu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.