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

LP:1014723 - UNIX_TIMESTAMP return value change not documented

    XMLWordPrintable

Details

    Description

      Hi,

      In MariaDB 5.3.5, a change was made to UNIX_TIMESTAMP() so that it returns NULL instead of "0" for a nonsense argument. This is a change in behavior from upstream Oracle MySQL releases.

      mysql 5.5.22 (root) [test]> select unix_timestamp('(null)');
      +--------------------------+
      | unix_timestamp('(null)') |
      +--------------------------+
      |                        0 |
      +--------------------------+
      1 row in set, 1 warning (0.00 sec)
       
      mysql 5.5.23-MariaDB (root) [test]> select unix_timestamp('(null)');
      +--------------------------+
      | unix_timestamp('(null)') |
      +--------------------------+
      |                     NULL |
      +--------------------------+
      1 row in set, 1 warning (0.00 sec)

      See:

      http://kb.askmonty.org/en/mariadb-535-changelog/

      http://bazaar.launchpad.net/~maria-captains/maria/5.3/revision/3435

      a) I believe this change should be reverted, so that MariaDB's behavior matches that of the upstream product.

      b) If Monty Program chooses not to revert this change, they must better document this incompatibility at http://kb.askmonty.org/en/unix_timestamp/ and http://kb.askmonty.org/en/mariadb-versus-mysql-compatibility/

      Attachments

        Activity

          People

            serg Sergei Golubchik
            kolbe Kolbe Kegel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.