OK.... I think I've found a bug with MySQL's compression support. :-/

I'm using two Java zlib implementations.  One is jzlib 1.0.7 and the other
is java.io.DeflateOutputStream .  Both of these are referenced by the zlib
implementation as being compatible.

I can compress/uncompress locally WITHOUT a problem.....

When I store the data in the DB the value is stored correctly in a blob and
I can compare the MD5 hashcode with my local array of and the hashcode
values are identical which for all practical purposes means they're the
same.

The only problem is that UNCOMPRESS won't work...

It returns null and I get:


mysql> SHOW WARNINGS;
+-------+------+---------------------------------------------------------------------------------------------------------------------+
| Level | Code |
Message
|
+-------+------+---------------------------------------------------------------------------------------------------------------------+
| Error | 1256 | Uncompressed data size too large; the maximum size is
1047552 (probably, length of uncompressed data was corrupted) |
+-------+------+---------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Sure enough:

mysql> SELECT UNCOMPRESSED_LENGTH(BODY) FROM FOO;
+---------------------------+
| UNCOMPRESSED_LENGTH(BODY) |
+---------------------------+
|                 147577464 |
+---------------------------+
1 row in set (0.00 sec)

......

I've tested this on 5.1.19 and 4.1.21 with the same symptoms.

Anyone have any advice here?  Did you guys make any changes with the zlib
implementation you're using?

I'm willing to file this as a bug if necessary.

Kevin

--
Founder/CEO Tailrank.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Blog: feedblog.org
Cell: 415-637-8078

Reply via email to