Repository navigation
Description
Description
For an ordinary local CSV external table without Hive partitioning, MatrixOne returns a SHOW CREATE TABLE definition with the original FILEPATH replaced by an empty string. The source table can read its file, but an external table recreated from this DDL (including through mo-dump SQL restore) cannot read the same file.
This is a MatrixOne external-table DDL/metadata defect, separate from the executable-comment marker in #30559.
Verified environment
- MatrixOne
mainb466f4ae9b74813a4ff93eaf43a6c81e6cbb8b0b(2026-10-26); the running binary was rebuilt and restarted from this commit, andgit_version()returnedb466f4aon all routes. - Local
2 CN / 1 TN / 1 Log service / Proxytopology; tested via Proxy6001, CN116001, and CN216002, using the MySQL text protocol. - Local CSV with the rows
1,alphaand2,beta, stored at a path readable by the MatrixOne services. mo-dumpmaind9d6375512620f12ff371b8602cc1d10d6f6caa0; the executable-comment marker fix from mo_dump PR #65 is present.
Minimal reproduction
Prepare a server-readable CSV with exactly:
1,alpha
2,beta
Replace the placeholder below with its absolute path, then execute:
CREATE DATABASE ext_ddl_source;
CREATE EXTERNAL TABLE ext_ddl_source.e(id INT, v VARCHAR(20))
INFILE{'filepath'='<server-readable-absolute-path>/rows.csv'}
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
SELECT * FROM ext_ddl_source.e ORDER BY id;
-- (1, alpha), (2, beta)
SHOW CREATE TABLE ext_ddl_source.e;The generated DDL contains:
INFILE{'FILEPATH'='','COMPRESSION'='','FORMAT'='csv','JSONDATA'=''}Recreate the table in a separate database using the returned DDL, or export and restore it with current mo-dump and a native MySQL client. The SQL restore finishes with exit 0 and the external-table catalog object exists, but SELECT * FROM <restored_table> fails with 20300: invalid configuration: the jsondata '' is not supported. The source CSV remains present and readable by the original table. This was observed through all three SQL routes.
Expected behavior
SHOW CREATE TABLE must preserve the external file configuration needed to recreate an equivalent table. A restored ordinary CSV external table should read the same rows as the source when the referenced file remains accessible. Do not expose secrets in generated DDL for credential-bearing external sources.
Scope and prior reports
- #24372 covered Hive-partitioned external tables and was closed after that scope was verified. The ordinary non-Hive CSV failure was reported later in this comment, so this is not a newly discovered failure.
- #30559 covers the distinct
mo-dumpexecutable-comment marker. Its 2026-10-26 regression confirms the marker no longer aborts SQL restore, while this DDL loss still prevents querying the restored external table. - S3/Stage portability and credential handling were not verified in this reproduction; they are not claimed fixed or failed here.
Acceptance criteria
- An ordinary non-Hive CSV external table with a real server-readable file returns a
SHOW CREATE TABLEdefinition retaining the required source configuration. - Replaying that DDL in a new database, and restoring a
mo-dumpexport with a native MySQL client, both produce a queryable external table with the same rows, provided the file remains available to every relevant CN. - Verify through Proxy and both CN routes; retain a focused regression for the non-Hive case alongside the earlier Hive-partitioned coverage.
Activity
fix(frontend,plan): restore FILEPATH in SHOW CREATE for file-based ex…
fix(frontend,plan): restore FILEPATH in SHOW CREATE for file-based ex…
fix(plan): redact object-store credentials in SHOW CREATE FILEPATH op…
fix(frontend,plan): restore FILEPATH in SHOW CREATE for file-based ex…
fix(plan): redact object-store credentials in SHOW CREATE FILEPATH op…
fix(frontend,plan): restore FILEPATH in SHOW CREATE for file-based ex…
XuPeng-SH commentedon Oct 28, 2026
QA on merged main
b888c218fb3a4f094bb8417288a45c47402e5635(#31466): our local parser checks passed (3 top-level tests, 26 RUN entries); resource limits prevented local verification of the renderer, credential masking, DDL replay and restored rows.Subsequently, slyunnn independently verified the original local CSV contract on exact
66c9e7624e3374897acc649195fde5b2836343a5using two CNs and Proxy: FILEPATH and apostrophe-path replay preserved the rows; synthetic credentials were redacted; actual mo-dump and native MySQL restore returned matching rows. Details: #31261 (comment). These are external verification results, not local execution in this QA environment. Live S3/Stage access and a separate mo-tester BVT run were not covered. The issue remains assigned to slyunnn.slyunnn commentedon Oct 28, 2026
Regression and extended verification for #31261 (2026-10-28)
Verification Environment
origin/main:66c9e7624e3374897acc649195fde5b2836343a5—fix: widen integer addition and multiplication (#31088). The freshmo-servicebinary reports this exactvcs.revisionwithvcs.modified=false;git_version()returned66c9e76through every route.2 CN / 1 TN / 1 Log service / Proxytopology. Endpoints: Proxy6001, CN116001, CN216002; all were reachable before and after testing.mo-dumpCLI plus native MySQL client for SQL restore. The testedmo-dumpbinary ismo_dumpmain9f0cc1173a9dc2def2656de3cb5c4b988c879442, withvcs.modified=false.What Was Covered
3rows;SHOW CREATE TABLEretained the realFILEPATH. Executing that returned DDL in a second database reproduced the same ordered rows through Proxy, CN1, and CN2.SHOW CREATE TABLE, DDL replay, and reading the same2rows through all3routes.s3-optspaths did not expose the supplied key or secret inSHOW CREATE TABLEon any route; the renderer emitted redaction.mo-dumpexport and native MySQL-client SQL restore through Proxy completed with exit0; source and restored external tables each returned the same3rows.mo-testerrun of the committed BVT.Findings
b888c218fb3a4f094bb8417288a45c47402e5635. It retains file-based external-table paths in theSHOW CREATErenderer and masks credential-bearing service arguments.FILEPATHsymptom and unreadable restored table did not reproduce on the current binary. No MatrixOne service source was changed.MOTR / BVT Coverage
test/distributed/cases/table/external_table_show_create_replay.sql; PR fix(frontend,plan): restore FILEPATH in SHOW CREATE for file-based external tables; rework query-result dump-format lifecycle (#30570 #31261) #31466 also includes focused renderer/planner tests. This run independently exercised the public SQL and dump/restore paths, but did not invokemo-tester.Final Conclusion
Fixed for the ordinary non-Hive local CSV external-table and SQL-restore contract on the exact current
mainruntime. Large-data regression is not needed: the defect is DDL metadata rendering, not a row-count, batch, spill, or concurrency boundary;3rows suffice to prove source/replay/restored rowset equivalence. Live cloud-source portability remains outside this verification.