Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
23.10.4
-
None
-
None
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)