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

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.3, 5.5.31, 5.3.13
    • 10.0.4, 5.5.33, 5.3.13
    • None
    • 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.

      Attachments

        Activity

          bar Alexander Barkov created issue -
          bar Alexander Barkov made changes -
          Field Original Value New Value
          Assignee Alexander Barkov [ bar ]
          bar Alexander Barkov made changes -
          Description This SQL query returns a wrong result:
          <code:sql>
          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)
          <code>

          The expected result is NULL with a warning.

          Note: this problem is not repeatable with mysql-5.1, 5.5.
          This SQL query returns a wrong result:
          {<code:sql}
          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)
          {code}

          The expected result is NULL with a warning.

          Note: this problem is not repeatable with mysql-5.1, 5.5.
          bar Alexander Barkov made changes -
          Description This SQL query returns a wrong result:
          {<code:sql}
          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)
          {code}

          The expected result is NULL with a warning.

          Note: this problem is not repeatable with mysql-5.1, 5.5.
          This SQL query returns a wrong result:
          {code:sql}
          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)
          {code}

          The expected result is NULL with a warning.

          Note: this problem is not repeatable with mysql-5.1, 5.5.
          bar Alexander Barkov made changes -
          Description This SQL query returns a wrong result:
          {code:sql}
          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)
          {code}

          The expected result is NULL with a warning.

          Note: this problem is not repeatable with mysql-5.1, 5.5.
          This SQL query returns a wrong result:
          {code:sql}
          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)
          {code}

          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.
          bar Alexander Barkov made changes -
          Description This SQL query returns a wrong result:
          {code:sql}
          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)
          {code}

          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.
          This SQL query returns a wrong result:
          {code:sql}
          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)
          {code}

          The expected result is NULL with a warning.
          The same problem happens in this query:
          {code}
          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)
          {code}

          Note: this problem is not repeatable with mysql-5.1, 5.5.
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0.4 [ 13101 ]
          Fix Version/s 5.5.32 [ 13000 ]
          Fix Version/s 5.3.13 [ 12602 ]
          serg Sergei Golubchik made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 5.5.33 [ 13300 ]
          Fix Version/s 5.5.32 [ 13000 ]
          bar Alexander Barkov made changes -
          Status Open [ 1 ] In Progress [ 3 ]

          Pushed into 5.3.13 and 5.5.32.

          bar Alexander Barkov added a comment - Pushed into 5.3.13 and 5.5.32.
          bar Alexander Barkov made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 27682 ] MariaDB v2 [ 44310 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 44310 ] MariaDB v3 [ 61392 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 61392 ] MariaDB v4 [ 146775 ]

          People

            bar Alexander Barkov
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.