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]: mo-dump SQL restore fails under NO_BACKSLASH_ESCAPES because script depends on backslash quoting #30587
生成脚本中是 INSERT INTO t VALUES (1,'a\\\\b'),(2,'O\\'Reilly'),...,没有 SET sql_mode。在上述导入会话下,返回 ERROR 1064 (42000) at line 14 ... near "Reilly')"。源表仍为三行;目标 t 已创建但为零行,连接随后可正常查询。期望导出文件在文档支持的恢复会话配置下可重建数据,或导出脚本明确固定所依赖的字符串解析 mode;不能报导出成功而留下无法恢复的脚本。
Regression and extended verification for #30587 (2026-10-27)
Verification Environment
MatrixOne latest main: 2465dae7a4ada1b277113cca5afff6fe10149b96 — refactor: consolidate unused code and bookkeeping cleanup (#31348). The binary was built from this commit; git_version() returned 2465dae7a4 on every route.
Isolated topology: 2 CN / 1 TN / 1 Log service / Proxy. Container endpoints Proxy 6001, CN1 16001, CN2 16002 were mapped to host 6601, 16601, 16602; all three were connected and tested independently.
Export used mo-dump over the MySQL driver; restore used native mysql 9.7.1 over the MySQL text protocol. Each route used its own new source/restore database.
What Was Covered
OK — The original NO_BACKSLASH_ESCAPES restore scenario completed with exit 0 on Proxy, CN1, and CN2. Rows containing a backslash, apostrophe, and plain text retained exact HEX(v) values 615C62, 4F275265696C6C79, and 706C61696E.
OK — The restore script saved the incoming session sql_mode, temporarily removed NO_BACKSLASH_ESCAPES, and restored the incoming mode afterward on all 3 routes.
OK — A second restore of each dump under the default session mode also completed with exit 0 and exact byte-for-byte values.
Not covered — A live dependent-view restore with a separately persisted view mode; the owning repository's regression tests cover the script/view variable separation.
Findings
The original parser failure no longer reproduces. The same dump is usable in both affected and default restore modes, without changing source bytes. This is a script/session-mode issue, not a row-count or resource-scale boundary. Large-data regression required: No; the 3-row fixture crosses the relevant quoting and mode boundary.
MOTR / BVT Coverage
The owning mo_dump repository's full make test passed at the tested commit, and the live native-client restores above passed on all 3 routes. No duplicate SQL-only MOTR case was added: the contract includes CLI output, restore-session mode, and process exit status, which a standalone SQL .test cannot assert.
Final Conclusion
Fixed for #30587 on the tested MatrixOne and mo-dump revisions. No issue-specific PR was created.
Activity
fix: make SQL/CSV dump scripts restore-safe
fix: make SQL/CSV dump scripts restore-safe
fix: make SQL/CSV dump scripts restore-safe (#30596 #30598 #30587 #30…
slyunnn commentedon Oct 27, 2026
Regression and extended verification for #30587 (2026-10-27)
Verification Environment
main:2465dae7a4ada1b277113cca5afff6fe10149b96—refactor: consolidate unused code and bookkeeping cleanup (#31348). The binary was built from this commit;git_version()returned2465dae7a4on every route.mo-dumplatestmain:d9d6375512620f12ff371b8602cc1d10d6f6caa0—fix: make SQL/CSV dump scripts restore-safe (#30596 #30598 #30587 #30590 #30628 #30481) (#58). Associated fix: mo_dump PR #58.2 CN / 1 TN / 1 Log service / Proxy. Container endpoints Proxy6001, CN116001, CN216002were mapped to host6601,16601,16602; all three were connected and tested independently.mo-dumpover the MySQL driver; restore used nativemysql 9.7.1over the MySQL text protocol. Each route used its own new source/restore database.What Was Covered
NO_BACKSLASH_ESCAPESrestore scenario completed with exit0on Proxy, CN1, and CN2. Rows containing a backslash, apostrophe, and plain text retained exactHEX(v)values615C62,4F275265696C6C79, and706C61696E.sql_mode, temporarily removedNO_BACKSLASH_ESCAPES, and restored the incoming mode afterward on all3routes.0and exact byte-for-byte values.Findings
The original parser failure no longer reproduces. The same dump is usable in both affected and default restore modes, without changing source bytes. This is a script/session-mode issue, not a row-count or resource-scale boundary. Large-data regression required: No; the
3-row fixture crosses the relevant quoting and mode boundary.MOTR / BVT Coverage
The owning
mo_dumprepository's fullmake testpassed at the tested commit, and the live native-client restores above passed on all3routes. No duplicate SQL-only MOTR case was added: the contract includes CLI output, restore-session mode, and process exit status, which a standalone SQL.testcannot assert.Final Conclusion
Fixed for #30587 on the tested MatrixOne and
mo-dumprevisions. No issue-specific PR was created.