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

Load data infile with varchar latin1 column may crash mysqld

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 1.0.11, 1.1.1
    • Icebox
    • MDB Plugin
    • None

    Description

      LDI using cpimport calls ha_calpont_impl_write_batch_row_. In here we check the column's datatype and parse the input row accordingly. For varchar, if the max length < 256, we take the first byte and use it as a length. However, we interpret that byte as a signed integer. Any value > 127 is seen as negative and string::assign asserts, shutting down mysqld. The value should be interpreted as an unsigned 1 byte int.

      For utf8, it should also be used as unsigned, but because the break-over to a two byte length is 87, rather 256, it's not possible to get values from 128-255 mis-interpreted as 1 byte signed and so won't break mysqld.

      For two byte lengths, latin1 is wrongly interpreted as signed, but utf8 is correctly interpreted as unsigned.

      Attachments

        Activity

          People

            Unassigned Unassigned
            David.Hall David Hall (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.