1278
MariaDBerrordatahigh confidence
ZLIB: Input data corrupted
Production Risk
Medium — indicates data integrity issues in stored BLOBs.
What this means
UNCOMPRESS() received data that is not valid zlib-compressed content; the data is corrupt.
Why it happens
- 1Data was truncated during storage
- 2Data was not compressed by MySQL COMPRESS()
- 3Bit-level corruption in a BLOB column
How to reproduce
trigger — this will error
trigger — this will error
SELECT UNCOMPRESS('not_compressed_data');expected output
ERROR 1278 (HY000): ZLIB: Input data corrupted
Fix 1
Validate data source
Validate data source
SELECT LENGTH(col), UNCOMPRESSED_LENGTH(col) FROM t;
Why this works
A NULL from UNCOMPRESSED_LENGTH indicates invalid zlib data.
Fix 2
Re-compress from original source
Why this works
Restore the original uncompressed data and re-apply COMPRESS().
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1278 ER_ZLIB_Z_DATA_ERROR
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev