Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Summary
Regression of MCOL-4642. SELECT … WHERE col IN (SELECT … WHERE x IS NOT NULL OR x IS NULL) returns Lost connection to ExeMgr (ER 1815) when the query is routed through CES. The original NOT IN form was fixed in MCOL-4642; the IN form of the same parse tree shape is now broken.
Repro (state-dependent — full basic suite required)
CREATE TABLE cs1 (a INT) ENGINE=ColumnStore; |
CREATE TABLE cs2 (b INT, c INT) ENGINE=ColumnStore; |
INSERT INTO cs1 VALUES (1),(2),(3),(4),(NULL); |
INSERT INTO cs2 VALUES (1,100),(1,101),(2,200),(3,300),(3,301),(3,302),(NULL,NULL); |
SELECT cs1.a FROM cs1 WHERE a IN (SELECT b FROM cs2 WHERE b IS NOT NULL OR b IS NULL); |
-- ERROR 1815: Lost connection to ExeMgr.
|
Standalone mtr ... mcol-4642 against a fresh server passes. Failure fires only inside the full basic suite (rocky9 11.8 + innodb_queries_use_mcs=ON). No process crash, no core — server-side exception closes the ExeMgr socket. Reproduction container setup: see MCOL-6340.
Root cause (suspected)
dbcon/mysql/ha_in_sub.cpp::InSub::handleFunc() lines 269-301 only matches the (a=b OR isnull(item)) shape (one side must be OP_EQ). For b IS NOT NULL OR b IS NULL neither side is OP_EQ, so the branch falls through. processHaving() then AND-s the correlation filter onto a degenerate ParseTree, and the resulting CSEP fails downstream in jlf_execplantojoblist.cpp::doSemiJoin.
Fix hint: in InSub::handleFunc recognise the all-NULL-predicate tautology and either drop it or replace with 1=1 so the IN-to-EXISTS rewrite produces a valid join.
Trigger / status
Pre-existing bug. Was exposed in CI by columnstore commit 09783833b (2026-04-17, which set innodb_queries_use_mcs=ON globally via run_mtr.sh). That approach was reverted in MCOL-6340 / PR #3989, which scopes the variable back to the future suite via suite.opt. As a result:
- basic.mcol-4642 is not disabled and passes in CI under the standard suite configuration.
- The bug is still reproducible by enabling innodb_queries_use_mcs=ON globally and running the full basic suite.
Affected MTR test
columnstore/basic.mcol-4642 (artifacts attached: mcol-4642_artifacts.tgz).