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

FROM_DAYS() incorrect return 0000-00-00 for some numeric data types

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.1
    • 1.0.3
    • ExeMgr
    • None
    • 1.0.3

    Description

      Build tested:

      mscadmin> getsoft
      getsoftwareinfo Fri Jun 17 17:27:58 2016

      Name : mariadb-columnstore-platform Relocations: (not relocatable)
      Version : 1.0 Vendor: MariaDB Corporation Ab
      Release : 1 Build Date: Mon 13 Jun 2016 06:50:26 PM CDT

      The following statements should return a valid date when the column value is possible.
      InfiniDB and reference returns:

      mysql> select cidx, CDECIMAL4, FROM_DAYS(CDECIMAL4) from datatypetestm order by cidx
      -> ;
      -----------------------------------

      cidx CDECIMAL4 FROM_DAYS(CDECIMAL4)

      -----------------------------------

      1 -999 0000-00-00
      2 -998 0000-00-00
      3 -997 0000-00-00
      4 -996 0000-00-00
      5 -995 0000-00-00
      6 995 0002-09-22
      7 996 0002-09-23
      8 997 0002-09-24
      9 998 0002-09-25
      10 999 0002-09-26
      11 0 0000-00-00

      -----------------------------------
      11 rows in set (0.01 sec)

      select cidx, CDECIMAL4, FROM_DAYS(CDECIMAL4) from datatypetestm order by cidx
      --------------

      cidx CDECIMAL4 FROM_DAYS(CDECIMAL4)
      1 -999 0000-00-00
      2 -998 0000-00-00
      3 -997 0000-00-00
      4 -996 0000-00-00
      5 -995 0000-00-00
      6 995 0000-00-00
      7 996 0000-00-00
      8 997 0000-00-00
      9 998 0000-00-00
      10 999 0000-00-00
      11 0 0000-00-00
      11 rows in set
      --------------
      select cidx, CDECIMAL5, FROM_DAYS(CDECIMAL5) from datatypetestm order by cidx
      --------------

      cidx CDECIMAL5 FROM_DAYS(CDECIMAL5)
      1 -999 0000-00-00
      2 -998 0000-00-00
      3 -997 0000-00-00
      4 -996 0000-00-00
      5 -995 0000-00-00
      6 995 0000-00-00
      7 996 0000-00-00
      8 997 0000-00-00
      9 998 0000-00-00
      10 999 0000-00-00
      11 0 0000-00-00
      11 rows in set

      --------------
      select cidx, CDECIMAL9_2, FROM_DAYS(CDECIMAL9_2) from datatypetestm order by cidx
      --------------

      cidx CDECIMAL9_2 FROM_DAYS(CDECIMAL9_2)
      1 -9999.99 0000-00-00
      2 -9999.98 0000-00-00
      3 -9999.97 0000-00-00
      4 -9999.96 0000-00-00
      5 -9999.95 0000-00-00
      6 9999.95 0000-00-00
      7 9999.96 0000-00-00
      8 9999.97 0000-00-00
      9 9999.98 0000-00-00
      10 9999.99 0000-00-00
      11 0.00 0000-00-00
      11 rows in set
      --------------
      select cidx, CSMALLINT, FROM_DAYS(CSMALLINT) from datatypetestm order by cidx
      --------------

      cidx CSMALLINT FROM_DAYS(CSMALLINT)
      1 -766 0000-00-00
      2 -765 0000-00-00
      3 -764 0000-00-00
      4 -763 0000-00-00
      5 -762 0000-00-00
      6 763 0000-00-00
      7 764 0000-00-00
      8 765 0000-00-00
      9 766 0000-00-00
      10 767 0000-00-00
      11 0 0000-00-00
      11 rows in set

      Attachments

        Activity

          People

            dleeyh Daniel Lee (Inactive)
            dleeyh Daniel Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.