Repository navigation
Description
Description
MatrixOne permits users to create, insert into, and query the ordinary table demo_index_data, but SHOW TABLES silently omits it. The catalog identifies it as an ordinary table (relkind = 'r'), and its data remains readable. A client using SHOW TABLES for object discovery can therefore miss a valid user table.
This was discovered during regression of #30562. It is a MatrixOne server-side metadata discovery issue; the tested mo-dump version exported and restored this table successfully.
Environment
- MatrixOne
main:1231f06468dacc4a2997abc6c2147362913a2043—fix(python-sdk): quote export paths and line terminators (#31397). - The service binary was locally built from the above checkout.
git_version()returned1231f06468on each tested endpoint. - Isolated deployment:
2 CN / 1 TN / 1 Log service / Proxy; MySQL text protocol. - Reproduced through Proxy, CN1 and CN2 on 2026-10-27.
Steps to reproduce
Run the following in a fresh database:
CREATE DATABASE issue_showtables_wildcard;
CREATE TABLE issue_showtables_wildcard.demo_index_data (id INT PRIMARY KEY);
INSERT INTO issue_showtables_wildcard.demo_index_data VALUES (7);
CREATE TABLE issue_showtables_wildcard.plain (id INT PRIMARY KEY);
INSERT INTO issue_showtables_wildcard.plain VALUES (8);
SHOW TABLES FROM issue_showtables_wildcard;
SELECT relname, relkind FROM mo_catalog.mo_tables
WHERE reldatabase = 'issue_showtables_wildcard'
ORDER BY relname;
SELECT id FROM issue_showtables_wildcard.demo_index_data;Actual behavior
On each of the three endpoints:
SHOW TABLESreturnsplain, but omitsdemo_index_data.- The catalog returns both
demo_index_dataandplainwithrelkind = 'r'. - The direct query on
demo_index_datareturns7.
The table was omitted from the listing without a reported error. The test establishes a listing failure, not loss of the underlying table or data.
Expected behavior
SHOW TABLES should list both ordinary user tables. A user table should not be hidden solely because its name matches a wildcard-expanded pattern intended for internal index tables. Genuine internal index helper tables should remain hidden.
Stability and controls
- The same minimal reproduction was observed through Proxy, CN1 and CN2 against the same isolated deployment. These are three endpoint checks, not three independent clusters.
plainis a normal-name listing control; the catalog and directSELECTindependently confirm thatdemo_index_dataexists and remains readable.- During [Bug]: mo-dump must select current-tenant objects without omitting valid user tables #30562 verification, the tested
mo-dumpversion included and restoreddemo_index_data; that tool result does not imply thatSHOW TABLESis correct.
Code analysis
In the tested commit, pkg/sql/plan/build_show.go generates a relname NOT LIKE filter using catalog.IndexTableNamePrefix + "%". The prefix is __mo_index_ (definition). In a SQL LIKE pattern, each underscore matches any single character, so demo_index_data matches the pattern even though it is a user table rather than an internal index helper.
This is the likely cause inferred from the generated predicate and observed output; the reproduction above is the direct behavioral evidence.
Regression coverage
- Assert that
SHOW TABLESreturnsdemo_index_dataand an ordinary-name control. - Add boundary names that match the wildcard-expanded pattern but do not have the literal internal prefix, and ordinary names outside that pattern.
- Create a real secondary index and assert that its genuine internal helper remains excluded while user tables remain visible.
- Exercise the relevant account/database scope and any other
SHOWpaths that use the same predicate, with independent catalog and direct-query controls.
Related: #30562. No MatrixOne source changes were made during this verification.
Activity
fix: show user tables matching the internal index pattern (#31420)
XuPeng-SH commentedon Oct 29, 2026
QA handoff for merged #31420 (
b4906fbc65abe7abce1666b5ffb59e8fcb99191a): this isolated QA run inspected the source and issue history but did not run current-head functional tests or live SQL because the existing resource guard left insufficient headroom. Please verify SHOW TABLES and information_schema visibility, genuine index helpers, tenant scope and upgrade/maintenance retry. Author-reported PR tests are separate evidence and are not results of this QA run.fix(python): unify SDK query and analytics lifecycle contracts (#31774)
Ariznawlll commentedon Oct 30, 2026
结论
测试不通过。新环境和旧租户的
SHOW TABLES已正常,但旧租户升级后information_schema.TABLES仍遗漏合法用户表,不满足修复 PR 的元数据可见性范围。关键证据
main@c32e75a2b26e7bfddc99e0aeafae4d66fafca114;修复 PR fix: show user tables matching the internal index pattern #31420 合并提交b4906fbc65abe7abce1666b5ffb59e8fcb99191a在其祖先链。二进制构建元数据和git_version()均对应当前 SHA。demo_index_data、plain和 wildcard 边界用户表均出现在SHOW TABLES与information_schema.TABLES,真实索引辅助表隐藏,数据为(7,70),3/3。f847803802289b2b2d0df4f0a2f842c2804b823a创建 3 个租户和同样的普通表,再保留数据升级至上述 main。每个旧租户中,SHOW TABLES均列出demo_index_data与plain,但information_schema.TABLES仅列出plain;升级后新建的demo_index_new也只在 SHOW 中出现。原表数据均保持(7,70)。这是一次升级、三个租户,之后重复检查 3 次,非三次独立升级。__mo_index_的NOT LIKE条件。fix: show user tables matching the internal index pattern #31420 明确覆盖已完成升级租户的持久化视图收敛;当前结果需要研发核查维护/版本迁移路径,暂不推断唯一根因。测试租户已清理。待解决点