Bug #1124 Incorrect handling of blob fields with 'set character set' option used
Submitted: 23 Aug 2003 2:52 Modified: 22 Sep 2003 5:41
Reporter: Sergey Aleshin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.14 OS:Windows (Windows 2000 AS)
Assigned to: Alexander Barkov CPU Architecture:Any

[23 Aug 2003 2:52] Sergey Aleshin
Description:
Hello!

I'm from Russia, so i use SET CHARACTER SET cp1251_koi8 command to acces database in koi8_ru charset from my Windows client with Windows-1251 codepage.
Server runs on Windows too with default charset set to koi8_ru.
I've found that blob fields also recoded with directive above, not only text
fields. So images, for example, can not be extracted from blob field correctly.

Problem can be workarounded:

set character set to default
select blobfield
set character set to cp1251_koi8

This sequence of commands extract corect value, but my application writen in Perl and inserts blobs with other fields in one insert statement.
Anyway, i think recode blobs - very bad idea ;-)

How to repeat:
I think, your dont't need to repeat this, just check it.

Suggested fix:
Don't recode blob fields.
[26 Aug 2003 3:03] Sergey Aleshin
Priority is High for me
[22 Sep 2003 5:41] Alexander Barkov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

This work fine in 4.1 branch. Unfortunately, 
there is a problem fixing this in 4.0.
We decided not to fix this in 4.0.
Documentation should be shortly
updated to comment this behaviour.