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

When performing a cross-engine join in MariaDB between a ColumnStore table and an InnoDB table, NULL values in CHAR(1) and VARCHAR(1) columns from the InnoDB side are not handled correctly.

    XMLWordPrintable

Details

    Description

      • When performing a cross-engine join in MariaDB between a ColumnStore table and an InnoDB table, NULL values in CHAR(1) and VARCHAR(1) columns from the InnoDB side are not handled correctly.
      • The issue is triggered when the columnstore_select_handler is set to ON or AUTO.
      • Instead of being treated as a proper NULL, the value is misinterpreted as an invalid single-byte character, specifically \xFF (hexadecimal FF).
      • This causes errors like "Incorrect string value '\xFF…'" when you try to insert the results of the join into a temporary or permanent table.
      • Conditional logic that checks for NULLs, such as IS NULL or IFNULL, behaves unpredictably because it's operating on the \xFF value instead of a true NULL.
      • A reliable workaround is to disable the handler for the query's session by executing SET SESSION columnstore_select_handler = OFF;.
      • Another workaround is to change the data type of the affected columns from CHAR(1) or VARCHAR(1) to VARCHAR(2) or larger.

      I'm attaching a script to reproduce the error provided by a customer. It does not happen in old MariaDB product versions (at least in MariaDB 10.6.4 and CS 6.1.1) but it does in newer (reproducible in MariaDB 11.4 and CS 23.10.4)

      Attachments

        Activity

          People

            drrtuy Roman
            patrizio.tamorri Patrizio Tamorri
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.