Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
4.2-dev and the released Docker image matrixorigin/matrixone:4.2.0
Commit ID
01ae8ec (Docker image matrixorigin/matrixone:4.2.0)
Other Environment Information
- Reproduced with SQL
PREPARE/EXECUTEand Godatabase/sqlusinggo-sql-driver/mysql. - The equivalent literal
INquery returns the correct rows.
Actual Behavior
A prepared query against information_schema.TABLES drops names from a parameterized IN list.
With five existing tables, only t001, t002, and t005 are returned. The production query uses 132 names and returns only 2 of 132.
Expected Behavior
The prepared query should return every existing table named in the IN list, matching the equivalent literal query.
Steps to Reproduce
DROP DATABASE IF EXISTS moi;
CREATE DATABASE moi;
CREATE TABLE moi.t001 (id INT PRIMARY KEY);
CREATE TABLE moi.t002 (id INT PRIMARY KEY);
CREATE TABLE moi.t003 (id INT PRIMARY KEY);
CREATE TABLE moi.t004 (id INT PRIMARY KEY);
CREATE TABLE moi.t005 (id INT PRIMARY KEY);
SET @schema_name = 'moi';
SET @n1 = 't001';
SET @n2 = 't002';
SET @n3 = 't003';
SET @n4 = 't004';
SET @n5 = 't005';
PREPARE stmt FROM '
SELECT TABLE_NAME
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = ?
AND TABLE_NAME IN (?,?,?,?,?)
ORDER BY TABLE_NAME
';
EXECUTE stmt USING @schema_name, @n1, @n2, @n3, @n4, @n5;
DEALLOCATE PREPARE stmt;Actual:
t001
t002
t005
Literal control:
SELECT TABLE_NAME
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'moi'
AND TABLE_NAME IN ('t001','t002','t003','t004','t005')
ORDER BY TABLE_NAME;The literal control returns all five rows.
Additional information
The hidden composite-primary-key predicate is folded into nested OR filters. A disjunctive BasePKFilter container has a zero-value Op equal to function.EQUAL; mergeFilters can therefore treat nested disjunction containers as atomic equality filters and discard the right-hand subtree.
Main no longer reproduces this exact SQL after #26627 added a cast that prevents this query from taking PK pruning, but the nested-OR merge defect itself was not fixed.
Activity
guopengfei116 commentedon Aug 25, 2026
Independent validation against the released 4.2.0 image confirms this is the direct cause of MatrixFlow workspace-creation failures.
Image and client
registry.cn-shanghai.aliyuncs.com/matrixorigin/matrixone:4.2.0sha256:c72d249f6f039c31cbfd673b43b6d31f456eeb982b5436add309d3184d6b5b9cSELECT VERSION():8.0.30-MatrixOne-v4.2.0database/sql+go-sql-driver/mysql v1.9.3linux/arm64and CI-matchinglinux/amd64Minimal four-table result
With
repro_athroughrepro_dpresent:The parameterized query is correct for one, two, and three names. At four or more names it consistently returns only two. The same parameterized
INquery against a normal user table returns every requested row, so the failure is specific to theinformation_schema.TABLESexecution path.Production-shaped result
MatrixFlow creates 136 tenant tables and then verifies them from a fresh connection:
This rules out DDL failure and metadata propagation lag: all 136 tables are already visible to the fresh connection. Four concurrent tenant initializations reproduced the same 2/136 result. The equivalent test on MatrixOne 4.1.2 returns 136/136 and readiness succeeds.
Observed CI failure: https://github.com/matrixorigin/matrixflow/actions/runs/32803786263/job/97671695276
PR #27502 is merged into
4.2-dev, but the released 4.2.0 image still contains the defect. Is there a 4.2 patch image/release containing merge commit5f4cd9d2b1ed5464f660e74fcab94447135fdd6a, or a planned tag that MatrixFlow CI can consume?