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

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

    XMLWordPrintable

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.variables.txt
          61 kB
        2. test.sql.gz
          3.14 MB
        3. test.query.sql
          2 kB

        Activity

          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.