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

Least function retuns date in date time format

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.49
    • 5.5.50
    • Temporal Types
    • None
    • mysql Ver 15.1 Distrib 5.5.49-MariaDB, for Linux (x86_64) using readline 5.1
    • 5.5.50

    Description

      Hi,

      This a follow up to MDEV-9521. the NULL value is returned as expected now but format of date still appears as date_time even if columns are date type.

      Same test case as MDEV-9521 , query now returns:

      +----+------------+---------------------+
      | id | date_debut | date_fin            |
      +----+------------+---------------------+
      |  1 | 2016-01-01 | 2016-01-31 00:00:00 |
      |  2 | 2016-02-01 | 2016-01-28 00:00:00 |
      |  3 | 2016-03-01 | 2016-03-31 00:00:00 |
      |  4 | 2016-04-01 | NULL                |
      +----+------------+---------------------+
      

      This is still not the same as 5.5.44.

      Attachments

        Issue Links

          Activity

            Apparently, in scope of MDEV-9521 only the NULL part was fixed, while the date(time) format part was missed. Sorry about that.

            elenst Elena Stepanova added a comment - Apparently, in scope of MDEV-9521 only the NULL part was fixed, while the date(time) format part was missed. Sorry about that.
            jkavalik Jiri Kavalik added a comment -

            Hello elenst,

            in http://dba.stackexchange.com/questions/140023/least-with-if-condition-brings-timestamp-instead-of-date the OP says that something similar happens in 10.0.22 too. I asked them to report it with their test case but they unfortunatelly never did. So I checked the test case from MDEV-9521 on 10.0.24 and got

            +----+------------+---------------------+
            | id | date_debut | date_fin            |
            +----+------------+---------------------+
            |  1 | 2016-01-01 | 2016-01-31 00:00:00 |
            |  2 | 2016-02-01 | 2016-01-28 00:00:00 |
            |  3 | 2016-03-01 | 2016-03-31 00:00:00 |
            |  4 | 2016-04-01 | 0000-00-00 00:00:00 |
            +----+------------+---------------------+
            

            jkavalik Jiri Kavalik added a comment - Hello elenst , in http://dba.stackexchange.com/questions/140023/least-with-if-condition-brings-timestamp-instead-of-date the OP says that something similar happens in 10.0.22 too. I asked them to report it with their test case but they unfortunatelly never did. So I checked the test case from MDEV-9521 on 10.0.24 and got +----+------------+---------------------+ | id | date_debut | date_fin | +----+------------+---------------------+ | 1 | 2016-01-01 | 2016-01-31 00:00:00 | | 2 | 2016-02-01 | 2016-01-28 00:00:00 | | 3 | 2016-03-01 | 2016-03-31 00:00:00 | | 4 | 2016-04-01 | 0000-00-00 00:00:00 | +----+------------+---------------------+
            bar Alexander Barkov added a comment - Pushed into 5.5: https://github.com/MariaDB/server/commit/a4848e975d2fe359ff354e767427c01dbe908037

            People

              bar Alexander Barkov
              marc.langevin@usherbrooke.ca Marc
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.