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

LP:1014723 - UNIX_TIMESTAMP return value change not documented

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.32, 5.3.13
    • Component/s: None
    • Labels:

      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/

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 1014723

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 1014723
            Hide
            serg Sergei Golubchik added a comment -

            already documented

            Show
            serg Sergei Golubchik added a comment - already documented

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                kolbe Kolbe Kegel
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: