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

Wrong result for CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5')

    Details

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

      Description

      This SQL query returns a wrong result:

      mysql> SELECT CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5'); show warnings;
      +----------------------------------------------+
      | CONVERT_TZ(TIME('00:00:00'),'+00:00','+7:5') |
      +----------------------------------------------+
      | 0000-00-00 00:00:00                          |
      +----------------------------------------------+
      1 row in set (0.00 sec)
      

      The expected result is NULL with a warning.
      The same problem happens in this query:

      mysql> SELECT CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5');
      +---------------------------------------------------------+
      | CONVERT_TZ(TIME('2010-01-01 00:00:00'),'+00:00','+7:5') |
      +---------------------------------------------------------+
      | 0000-00-00 00:00:00                                     |
      +---------------------------------------------------------+
      1 row in set (0.00 sec)
      

      Note: this problem is not repeatable with mysql-5.1, 5.5.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            bar Alexander Barkov added a comment -

            Pushed into 5.3.13 and 5.5.32.

            Show
            bar Alexander Barkov added a comment - Pushed into 5.3.13 and 5.5.32.

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: