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
[Compatibility]: UNCOMPRESS returns NULL for invalid data without MySQL warnings #28458
The closed implementation issue #23026 and compression fix #27965 cover value/format compatibility, but no issue was found for invalid-stream warning behavior.
Branch Name
main
Commit ID
a9d3b8b857c44f1249e682c91d4d62a914eb7d20
Other Environment Information
Local standalone MatrixOne built from the commit above
Reference: MySQL 8.3.0
Actual Behavior
MatrixOne and MySQL both return NULL for invalid UNCOMPRESS() input, but MatrixOne leaves the warning list empty:
SELECT UNCOMPRESS(x'00000000') IS NULL;
SHOW WARNINGS;
MatrixOne:
1
-- no warning rows
MySQL 8.3:
1
Warning 1259 ZLIB: Input data corrupted
A truncated zlib stream produces the same 1259 warning only in MySQL. A forged oversized header produces MySQL warning 1256 (Uncompressed data size too large) while MatrixOne again has no warning.
Each invalid input and its immediately following SHOW WARNINGS was repeated three times. Valid UNCOMPRESS(COMPRESS('abc')) returns abc without warnings in both engines.
The executor currently catches both MySQL-zlib and legacy-DEFLATE decoding errors and appends a NULL result directly. It does not publish the corresponding warning to the session diagnostic area.
Expected Behavior
Invalid compressed input should retain the existing NULL result and emit MySQL-compatible diagnostics so applications that inspect warnings can distinguish corrupt input from an ordinary NULL.
Steps to Reproduce
SELECT UNCOMPRESS(x'00000000') IS NULL;
SHOW WARNINGS;
SELECT UNCOMPRESS(x'03000000789c00') IS NULL;
SHOW WARNINGS;
SELECT UNCOMPRESS(x'ffffffff00') IS NULL;
SHOW WARNINGS;
Controls
Valid text and arbitrary binary payloads round-trip in MatrixOne.
MatrixOne- and MySQL-produced compressed streams are mutually readable.
Empty input and NULL propagation were checked separately.
The issue is the missing diagnostic, not decompressed value correctness.
Implemented and opened PR #28762 for this issue (head 2eb115303d19487f20522b8bde53a408ff2b1124).
Root cause: when both zlib and the legacy raw-DEFLATE fallback rejected an input, UNCOMPRESS discarded the decoder error and returned NULL without a warning. The PR preserves the existing NULL result while reporting MySQL-compatible warnings 1256 (advertised size exceeds the limit), 1258 (decoded output exceeds the advertised capacity), or 1259 (other invalid/truncated input). Successful legacy values, valid zlib, empty, SQL NULL, and masked rows remain warning-free.
The PR adds bounded per-invocation warning accumulation, prevents constant folding from hiding execution diagnostics, and adds UT plus a registered distributed BVT for constants and mixed column rows. GPT-6 Astra medium reviewed the exact diff and found no blocking issues.
Validation: formatting, diff checks, and incremental lint passed. Local Go UT/BVT were not run because this macOS checkout lacks valid CGo artifact provenance and unrelated MatrixOne services are active. Exact-head CI is running. The 1258 fixture is supported by MySQL 8.3 source mapping but was not independently black-box tested against MySQL.
Activity
XuPeng-SH commentedon Sep 12, 2026
Implemented and opened PR #28762 for this issue (head
2eb115303d19487f20522b8bde53a408ff2b1124).Root cause: when both zlib and the legacy raw-DEFLATE fallback rejected an input,
UNCOMPRESSdiscarded the decoder error and returnedNULLwithout a warning. The PR preserves the existingNULLresult while reporting MySQL-compatible warnings 1256 (advertised size exceeds the limit), 1258 (decoded output exceeds the advertised capacity), or 1259 (other invalid/truncated input). Successful legacy values, valid zlib, empty, SQLNULL, and masked rows remain warning-free.The PR adds bounded per-invocation warning accumulation, prevents constant folding from hiding execution diagnostics, and adds UT plus a registered distributed BVT for constants and mixed column rows. GPT-6 Astra medium reviewed the exact diff and found no blocking issues.
Validation: formatting, diff checks, and incremental lint passed. Local Go UT/BVT were not run because this macOS checkout lacks valid CGo artifact provenance and unrelated MatrixOne services are active. Exact-head CI is running. The 1258 fixture is supported by MySQL 8.3 source mapping but was not independently black-box tested against MySQL.
fix: report UNCOMPRESS warnings (#28762)
Ariznawlll commentedon Sep 14, 2026
测试版本
原问题验证
Happy Path 覆盖
Unhappy Path 覆盖
白盒验证
回归测试
./motr --repeat 3 14_issue_regression.issue_28187_28772_latest_main连续 3/3 通过(213/213 statements matched)。测试证据
测试结论
测试通过。
fix: report UNCOMPRESS warnings (matrixorigin#28762)
fix: report UNCOMPRESS warnings (matrixorigin#28762)
fix: report UNCOMPRESS warnings (matrixorigin#28762)