Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
23.10.4
-
None
-
None
Description
Summary
A NULL value in a CHAR/VARCHAR column with width ≤ 8 read from InnoDB via CrossEngineStep is delivered to the client as the byte 0xFF (CHAR(1) → ? / 0x3F after charset conversion) instead of NULL.
Repro (standalone, no state)
CREATE TABLE t (a CHAR(1)) ENGINE=InnoDB; |
INSERT INTO t VALUES (NULL),('x'); |
SET SESSION columnstore_innodb_queries_use_mcs=ON; |
SELECT a, HEX(a), a IS NULL FROM t; |
-- expected: NULL, NULL, 1 | x, 78, 0
|
-- actual: ?, FF, 0 | x, 78, 0
|
Root cause
dbcon/joblist/crossenginestep.cpp::convertValueNum() hardcodes the 8-byte NULL marker for any CHAR/VARCHAR width:
case CHAR: case VARCHAR: |
if (nullFlag) rv = joblist::CHAR8NULL; // 0xFEFFFFFFFFFFFFFFULL |
For colWidth=1, setIntField then truncates to the low byte = 0xFF (which is CHAR1EMPTYROW, not CHAR1NULL=0xFE). Per-width markers already exist in joblist/joblisttypes.h (CHAR1NULL, CHAR2NULL, CHAR4NULL, CHAR8NULL) — fix is a switch (ct.colWidth).
Trigger / scope
Bug is pre-existing. Exposed in CI by columnstore commit 09783833b (2026-04-17) which set innodb_queries_use_mcs=ON globally in build/run_mtr.sh. With OFF, MTR test passes (verified in rocky9 container).
Affected MTR test / artifacts
columnstore/basic.mcol_2000 — disabled in c4635ff6b under MCOL-6340. Artifacts: mcol_2000_artifacts.tgz.
Attachments
Issue Links
- relates to
-
MCOL-6340 Stabilize tests in columnstore's ci/cd
-
- Closed
-