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

Comparison between TIME and DATETIME does not use CURRENT_DATE

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.10
    • 10.0.12
    • None

    Description

      This SQL script:

      SET timestamp=UNIX_TIMESTAMP('2014-04-14 10:20:30');
      SELECT CAST(TIME'10:20:30' AS DATETIME), TIME'10:20:30'=TIMESTAMP'2014-04-14 10:20:30' AS cmp;

      demonstrates that conversion between TIME and DATETIME
      does not add CURRENT_DATE to TIME.

      +----------------------------------+-----+
      | CAST(TIME'10:20:30' AS DATETIME) | cmp |
      +----------------------------------+-----+
      | 2014-04-14 10:20:30              |   0 |
      +----------------------------------+-----+

      MySQL-5.6 returns "1" in the "cmp" field in the same scenario.

      Attachments

        Issue Links

          Activity

            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.