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

HEX(<decimal>) gets truncated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Stalled (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.5.5, 1.4.5
    • Component/s: ExeMgr
    • Labels:
      None
    • Sprint:
      2020-2

      Description

      see mysql/queries/working_tpch1/qa_fe_cnxFunctions/hex.sql

      The query:
      select cidx, CDECIMAL1, HEX(CDECIMAL1) from datatypetestm order by cidx;

      should return
      1 -9.99 FFFFFFFFFFFFFFF6
      2 -9.98 FFFFFFFFFFFFFFF6
      3 -9.97 FFFFFFFFFFFFFFF6
      4 -9.96 FFFFFFFFFFFFFFF6
      5 -9.95 FFFFFFFFFFFFFFF6
      6 9.95 A
      7 9.96 A
      8 9.97 A
      9 9.98 A
      10 9.99 A
      11 0.00 0

      But instead returns
      1 -9 FFFF
      2 -8 FFFF
      3 -7 FFFF
      4 -6 FFFF
      5 -5 FFFF
      6 5 5
      7 6 6
      8 7 7
      9 8 8
      10 9 9
      11 0 0

      This appears to only affect decimal types. I looked in the utils/funcexp/hex.cpp code and no changes there should have caused this.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              David.Hall David Hall
              Reporter:
              David.Hall David Hall
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: