You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: information_schema.PARTITIONS returns no rows for non-partitioned tables (MySQL returns one row with NULL partition columns) #31927
Regression and extended verification for #31927 (2026-11-12)
Verification Environment
Target: main@4760bcaa88b23fabe064b1631b624c0e8c40d549, Fix native preparation and stabilize CI tests (Fix native preparation and stabilize CI tests #32574), frozen from the remote branch at test start. A fresh release build and git_version() at all endpoints confirmed runtime identity.
Topology: 2 CN / 1 TN / 1 Log service / Proxy, cohosted locally on macOS arm64. Proxy 127.0.0.1:6001, CN1 127.0.0.1:16001, and CN2 127.0.0.1:16002 were connected and actually exercised, rather than health-checked only.
Clients: PyMySQL text protocol and the existing Java mo-tester with JDBC metadata comparison enabled. No MatrixOne service source was modified.
Upgrade source: unmodified official v4.2.5 Linux arm64 release binary, commit 1a44f3d; release ZIP SHA-256 5cee90a0904f32fc52b06c09891129501e3b293a3d86d73cbff398a2b3325736 matched the published digest. Its isolated two-CN topology was fully stopped and backed up before the new binary opened its data. Raft hostname was explicitly preserved across the container-to-host transition.
What Was Covered
OK — Original ordinary-table example: exactly one row with NULL partition fields, including empty and indexed ordinary-table controls.
OK — Range-partition row count and metadata; ordinary statistics matched mo_table_rows / mo_table_size for the parent, and partition statistics matched their physical partition identities.
OK — Internal indexes, partition backing tables, views, sequences, and temporary objects excluded by the existing BVT. A legitimate name containing an internal-looking substring remained visible.
OK — System and ordinary tenants, cross-tenant isolation, and a restricted user's table-level visibility on all three endpoints.
OK — Real stopped official-release upgrade with pre-existing data and indexes in system and ordinary tenants. The old binary returned 0 rows for the ordinary table in both tenants before upgrade. CDC-task and snapshot preflight inventories were empty.
OK — Six independent first-connection observers: system/ordinary tenant through Proxy/CN1/CN2. Each first accepted SQL session already returned the correct unique NULL-partition row, correct runtime identity, and preserved data. First connection times were approximately 20.3–20.9 seconds after launch; no accepted-session stale-view window was observed. Repeated immediate reads remained correct.
OK — Restart of the already-upgraded same directory, again observing first accepted sessions for all six combinations: definitions and data remained correct.
OK — Existing startup tests: current/stale PARTITIONS, read/replace errors preventing ingress, exact current-system-definition checks, and initialization retry/cancellation.
Not covered — Production Linux-to-Linux deployment, large tenant/catalog populations, mixed-version operation, downgrade, and upgrades from unreleased-main catalogs. Admission error injection was tested at the component seam, not by corrupting a real catalog.
Findings
PR #32197, fix(sql): honor DESC column filters and ordinary table partitions, merge 547d2cb2de0c1e16767290e3575a468f89dabe5c, fixes ordinary-table rows and statistics while preserving visibility. PR #32307, fix: consolidate stopped-upgrade cleanup and stabilize CI, merge 606ae4fb2a94890709a2d573aaee936a27442dc3, includes PARTITIONS in startup/admission coordination and removes the periodic repair owner. This run directly retested the earlier upgrade visibility gap.
Predecessor shutdown limitation: service shutdown completion was logged after clients were drained, but the container reached its 60-second grace limit with only cgroup configuration watchers reported pending, then exited 137. The complete stopped data was backed up before upgrade. This is evidence for the tested stopped/recovery transition, not a claim that the predecessor's cgroup shutdown behavior is fixed.
Large-data regression required: No for the reported row-shape and admission-ordering contract. Two populated tenants and actual stopped upgrade cross the necessary boundary. Production-scale catalog migration cost was not measured or claimed.
MOTR / BVT Coverage
Existing bvt_partitions_ordinary_31927.sql: 23/23 per endpoint, 69/69 total, with metadata comparison. Focused bootstrap/CN tests passed, including explicit read and replace failure cases. Shared catalog setup and process transitions ran serially; the six ingress observers ran concurrently with independent connections.
Existing regression cases and focused developer tests were reused. No redundant MOTR case, test commit, or empty summary PR was created. Test setup, logs, and machine-readable observations remain in the isolated QA artifact directory.
Final Conclusion
Fixed on the tested main commit for ordinary-table PARTITIONS visibility and coordination before accepted SQL ingress, including the stopped official-release transition and restart described above. No separate 4.2-dev backport acceptance is implied.
Activity
MatrixAdventurer commentedon Oct 31, 2026
分级建议:s2。系统视图兼容缺陷:information_schema.PARTITIONS 对普通表返 0 行,依赖它汇总行数/大小或用 PARTITION_NAME IS NULL 判断分区的外部工具会把普通表全部漏掉;不影响数据正确性,可用 mo_tables 等替代。模块:pkg/util/sysview(InformationSchemaPartitionsDDL)。疑似重复:未发现(旧分区视图缺陷均已关)。建议负责人:daviszhen(sysview 近期提交者)。本操作由LW授权的MOI智能体提交
fix(sql): honor DESC column filters and ordinary table partitions
fix(sql): honor DESC column filters and ordinary table partitions
fix(sql): honor DESC column filters and ordinary table partitions
fix(sql): honor DESC column filters and ordinary table partitions (#3…
XuPeng-SH commentedon Nov 6, 2026
QA 交接(main,待验证)
PR #32197 已合入 main,merge SHA
547d2cb2de0c1e16767290e3575a468f89dabe5c。information_schema.PARTITIONS 为普通 base table 返回一行 NULL 分区信息,分区表仍按实际分区返回,统计目标分别使用主表/分区表;保留租户可见性和内部索引、分区子表、view、sequence、临时表等排除边界。既有 startup 与有界 tenant maintenance 负责持久化定义协调,存活账户错误会回滚并保留游标。已读取全部 issue 评论及 PR 讨论,未发现合并版本当前适用的已验证反例或未完成的本 issue 开发 follow-up。作者报告既有 CN admission/bootstrap 错误路径及原 46/46 service SQL;新审查进行了 source/SQLite/fixture 核对,未做新 MatrixOne service 或前驱迁移运行。最终 head 的 build/UT/coverage/SCA 取消,CI Required 失败,不能称为全绿。本轮只核对远端证据,没有本地实测。
请 @Ariznawlll 复测原例、普通表唯一 NULL 行和统计值、分区表行数/统计来源,覆盖租户权限及各类排除对象;重点检查新安装、已有当前版本租户、重启/周期协调、账户删除与存活账户错误回滚。前驱升级、真实权限/临时对象和运行时修复仍需验证。转测不等于验收通过,且不自动要求 4.2 backport。
Ariznawlll commentedon Nov 6, 2026
测试版本
65b721e1b93c6b9e05db2063b220e0c35916b335,包含修复 fix(sql): honor DESC column filters and ordinary table partitions #32197;新建实例为隔离 2 CN / 1 TN / 1 LogService / Proxy,三个入口git_version()均为此 SHA。b27f3869e6,Go 构建信息记录为b27f3869e6f2552311fbbdda2f62b0ca31ec3a67、vcs.modified=true;因此旧版来源不是可复现的官方干净构建。升级后的二进制git_version()与上述官方 main 完整 SHA 一致。原问题验证
当前 main 的新建实例中,普通表返回一条
PARTITION_NAME等字段为 NULL 的记录,分区表返回实际分区记录;两个 CN 与 Proxy 各执行 3 轮通过。主库现有 BVT 三个入口各 3 轮均为 23/23。Happy Path 覆盖
mo_table_rows/mo_table_size的主表值一致;分区表的每个分区统计与对应物理分区表的统计一致。视图、序列、临时表和内部索引表不泄漏;每个入口各重复 3 轮。information_schema.PARTITIONS中看到有 SELECT 权限的表,访问无权表被拒绝,连接仍可用。每个入口各重复 3 轮。Unhappy Path 覆盖
全新隔离升级实例中,SQL 入口在启动后 4.616 秒可连接;从 4.618 秒起连续查询普通表,直到 14.397 秒仍返回 0 行,14.606 秒首次返回 1 行。共采样 47 次,SQL 已可服务但旧视图继续对外可见约 10 秒。第一套独立升级实例也观察到启动后立即为 0,随后恢复;两套均未发现数据丢失。
白盒验证
当前 main 的维护器定向单测重复 3 次通过,覆盖旧 PARTITIONS 定义替换、更新失败重试、事务回滚、旧定义转换、缺失/过期定义修复、账户删除及存活账户错误传播。源码默认租户维护轮询间隔为 10 秒。当前仅观察到 SQL 可访问期间旧结果持续约 10 秒,尚未断言其根因或是否符合升级对外可见性合同。
回归测试
修复 #32197 已带 主库现有 BVT 和维护器单测;本轮扩展用例仅在本地执行,没有提交主库测试 PR。
测试证据
qa-upgrade2-31927/timed-upgrade.log。测试结论
测试不通过。新建实例和维护完成后的功能验证通过,但旧实例升级后存在 SQL 已开放而旧 PARTITIONS 视图仍可见的窗口;请研发确认该窗口是否符合发布/升级合同,并排查是否应在对外开放 SQL 前完成协调。旧二进制带
vcs.modified=true,建议使用干净的官方前驱构建再次复现。XuPeng-SH commentedon Nov 6, 2026
QA 再交接(main,待验证)
原修复 #32197(
547d2cb2de0c1e16767290e3575a468f89dabe5c)的普通表 NULL 分区行、统计、租户权限及排除对象,已由前次 QA在 main65b721e报告通过;当时保留的研发问题是升级后 SQL 已开放、旧 PARTITIONS 定义仍可见约 10 秒,以及前驱构建带修改标记,需要确认受支持升级合同。新 PR #32307 已合入 main,merge SHA
606ae4fb2a94890709a2d573aaee936a27442dc3。它把 PARTITIONS 纳入系统视图启动完成检查:缺失、过期或读取错误在 SQL ingress 前由既有 startup/admission owner 处理,必要协调失败不开放入口;移除原周期性 CN 维修循环。新增的启动回归覆盖旧定义只替换一次,以及读取/替换错误时禁止 ingress。该范围直接回应旧 QA 窗口,不能继续把旧版本反例视为新修复的当前反例。完整 3 条 issue 评论和返回的全部 PR 讨论已读,未见其他未完成的本 issue 开发 follow-up。证据与限制:
bfbb2645c034后 bootstrap/sysview race 分别 84/43 个顶层测试通过,覆盖 PARTITIONS 缺失/过期/错误及 admission;真实本地 catalog 的旧 4.2.8 定义触发一次协调、第二次为 no-op。df8de7376c21435679b4d1e6fc87e11726ef1e7a,复用了作者运行结果;没有独立 Go/cluster/BVT 执行及原始作者运行日志,当时五项 CI 尚未完成。最终 PR head 为cc890a2341a99791a2034bd26a5f562d3969936d,不能据此前审查声称最终头全绿。历史 BVT/4.2.8 证据不当作本轮运行。请 @Ariznawlll 在新合并版本复测受支持的停止 4.2→main 升级:使用干净官方前驱,记录首次 SQL 可访问时 PARTITIONS 已为当前定义,覆盖系统/普通租户、缺失/过期定义、读取和协调失败不放行、重启与幂等协调。同时保留原普通表唯一 NULL 行、分区表统计来源、租户权限和内部对象排除回归。真实 release 多 CN/生产规模成本仍待验证;不将混合版本运行、降级或 unreleased-main catalog 升级纳入已支持合同,也不要求 backport。
保持 issue open,交 QA 验证;转测不等于验收通过。
slyunnn commentedon Nov 12, 2026
Regression and extended verification for #31927 (2026-11-12)
Verification Environment
main@4760bcaa88b23fabe064b1631b624c0e8c40d549, Fix native preparation and stabilize CI tests (Fix native preparation and stabilize CI tests #32574), frozen from the remote branch at test start. A fresh release build andgit_version()at all endpoints confirmed runtime identity.2 CN / 1 TN / 1 Log service / Proxy, cohosted locally on macOS arm64. Proxy127.0.0.1:6001, CN1127.0.0.1:16001, and CN2127.0.0.1:16002were connected and actually exercised, rather than health-checked only.v4.2.5Linux arm64 release binary, commit1a44f3d; release ZIP SHA-2565cee90a0904f32fc52b06c09891129501e3b293a3d86d73cbff398a2b3325736matched the published digest. Its isolated two-CN topology was fully stopped and backed up before the new binary opened its data. Raft hostname was explicitly preserved across the container-to-host transition.What Was Covered
NULLpartition fields, including empty and indexed ordinary-table controls.mo_table_rows/mo_table_sizefor the parent, and partition statistics matched their physical partition identities.0rows for the ordinary table in both tenants before upgrade. CDC-task and snapshot preflight inventories were empty.NULL-partition row, correct runtime identity, and preserved data. First connection times were approximately20.3–20.9seconds after launch; no accepted-session stale-view window was observed. Repeated immediate reads remained correct.Findings
PR #32197, fix(sql): honor DESC column filters and ordinary table partitions, merge
547d2cb2de0c1e16767290e3575a468f89dabe5c, fixes ordinary-table rows and statistics while preserving visibility. PR #32307, fix: consolidate stopped-upgrade cleanup and stabilize CI, merge606ae4fb2a94890709a2d573aaee936a27442dc3, includes PARTITIONS in startup/admission coordination and removes the periodic repair owner. This run directly retested the earlier upgrade visibility gap.Predecessor shutdown limitation: service shutdown completion was logged after clients were drained, but the container reached its
60-second grace limit with only cgroup configuration watchers reported pending, then exited137. The complete stopped data was backed up before upgrade. This is evidence for the tested stopped/recovery transition, not a claim that the predecessor's cgroup shutdown behavior is fixed.Large-data regression required: No for the reported row-shape and admission-ordering contract. Two populated tenants and actual stopped upgrade cross the necessary boundary. Production-scale catalog migration cost was not measured or claimed.
MOTR / BVT Coverage
Existing bvt_partitions_ordinary_31927.sql:
23/23per endpoint,69/69total, with metadata comparison. Focused bootstrap/CN tests passed, including explicit read and replace failure cases. Shared catalog setup and process transitions ran serially; the six ingress observers ran concurrently with independent connections.Existing regression cases and focused developer tests were reused. No redundant MOTR case, test commit, or empty summary PR was created. Test setup, logs, and machine-readable observations remain in the isolated QA artifact directory.
Final Conclusion
Fixed on the tested
maincommit for ordinary-table PARTITIONS visibility and coordination before accepted SQL ingress, including the stopped official-release transition and restart described above. No separate4.2-devbackport acceptance is implied.