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

conv() may truncate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.4.2
    • Fix Version/s: Icebox
    • Component/s: Connector, ExeMgr
    • Labels:
      None

      Description

      Consider
      select si, conv(si, 16, 8) from dtypes limit 1; //si = -9

      Columnstore returns 177777777777777777776
      InnoDB returns 1777777777777777777767

      Internally, we calculate the correct value, but in fetchNextRow(), we call
      f2->store((const char*)row.getStringPointer(s), row.getStringLength(s), f2->charset());
      This function looks at the max string length set in f2 (63 in this case) and divides it by the max number of bytes per char as set in f2 (not that passed in as the last param) – in this case 3. This results in 21 as the max number of chars to copy.

      What can we do to increase the max string length or not use utf8 for this single case?

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: