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

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

    XMLWordPrintable

    Details

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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: