Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1768

DATE_FORMAT() does not behave like MariaDB

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 1.2.0
    • 5.5.1
    • N/A
    • None

    Description

      DATE_FORMAT doesn't behave the same as MariaDB for converting a time to a date. We would need to refactor the code for the function to make it behave the same.

      DATE_FORMAT()
       
      Reference:
       
      MariaDB [mytest]> select cidx, CTIME, DATE_FORMAT(CTIME,'%W %M %Y') from datatypetestm order by cidx;
      -------------------------------------------
       
      cidx	CTIME	DATE_FORMAT(CTIME,'%W %M %Y')
      -------------------------------------------
       
      1	13:00:00	NULL
      -------------------------------------------
      1 row in set (0.000 sec)
       
      MariaDB [mytest]> select cidx, CTIME, DATE_FORMAT(CTIME,'%D %y %a %d %m %b %j') from datatypetestm order by cidx;
      -------------------------------------------------------
       
      cidx	CTIME	DATE_FORMAT(CTIME,'%D %y %a %d %m %b %j')
      -------------------------------------------------------
       
      1	13:00:00	NULL
      -------------------------------------------------------
      1 row in set (0.000 sec)
       
      ColumnStore:
       
      MariaDB [mytest]> select cidx, CTIME, DATE_FORMAT(CTIME,'%W %M %Y') from datatypetestm order by cidx;
      -------------------------------------------
       
      cidx	CTIME	DATE_FORMAT(CTIME,'%W %M %Y')
      -------------------------------------------
       
      1	13:00:00	Monday October 2018
      -------------------------------------------
      1 row in set (0.031 sec)
       
      MariaDB [mytest]> select cidx, CTIME, DATE_FORMAT(CTIME,'%D %y %a %d %m %b %j') from datatypetestm order by cidx;
      -------------------------------------------------------
       
      cidx	CTIME	DATE_FORMAT(CTIME,'%D %y %a %d %m %b %j')
      -------------------------------------------------------
       
      1	13:00:00	1st 18 Mon 01 10 Oct 274
      -------------------------------------------------------
      1 row in set (0.007 sec)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              LinuxJedi Andrew Hutchings (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.