Bug #41075 MySQL 4 to MySQL 5 mediumblob corruption, may be related to MyODBC .12/.26
Submitted: 27 Nov 2008 16:01 Modified: 2 Dec 2008 15:33
Reporter: Oliver VieBrooks Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.26 OS:Any
Assigned to: CPU Architecture:Any

[27 Nov 2008 16:01] Oliver VieBrooks
Description:
After upgrading from MySQL 4 to MySQL 5, and upgrading the connector from 3.51.12 to 3.51.26, mediumblob columns come back corrupted when using the instructions found here: http://dev.mysql.com/tech-resources/articles/vb-blob-handling.html  Exporting the data using the commandline and accessing it under MySQL 4 with the old connector renders it usable again.  The connector may just be part of the issue, since the same symptoms have been observed using the GUI tool MySQL Query Analyzer.  Was there a change to how mediumblob columns are handled?  We have been using the method described in the link provided for several years without issue until the upgrade.

How to repeat:
On a server running MySQL 4, create a schema with a single table containing a mediumblob field.  Insert file data into it using the instructions at the URL above.  Export the schema and import it onto a server running MySQL 5.  Attempt to retrieve the field value as in the instructions.
[27 Nov 2008 16:40] MySQL Verification Team
Thank you for the bug report. When upgrading the server have you applied the instructions at: http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html?.
Thanks in advance.
[1 Dec 2008 13:35] Oliver VieBrooks
Yes, we dump and re-import when we move schema.
[1 Dec 2008 18:03] Jess Balint
What is the query you are using to retrieve the data?
[2 Dec 2008 8:46] Tonci Grgin
Oliver. I have problem with you changing two things at once. Please vary *only* connector *or* server, not both at the same time. Like this:
  Server 4.x c/ODBC .12 == works
  Server 4.x c/ODBC .26 == works
--dump following upgrade instructions--
  Server 5.x c/ODBC .12 == works
  Server 5.x c/ODBC .26 == works
you get the point.
[2 Dec 2008 13:30] Oliver VieBrooks
We've investigated further here, please see http://bugs.mysql.com/bug.php?id=41160
[2 Dec 2008 15:28] Tonci Grgin
Olivier, I think the new bug Brian posted is the source of problem and this is just it's overcomplicated version. So I suggest to close this report and continue investigation in Bug#41160. If you agree of course.
[2 Dec 2008 15:29] Oliver VieBrooks
Aye, thank you.
[2 Dec 2008 15:33] Tonci Grgin
Oliver, no problem.

Closing as we have better view of problem in Bug#41160.