Corrupted images after attempting to store PNG images as BLOBs in MySQL?

Álvaro G. Vicario webmasterNOSPAMTHANKS at demogracia.com
Wed Aug 13 12:40:27 EDT 2008


*** Fredrik Lundh escribió/wrote (Wed, 13 Aug 2008 16:46:04 +0200):
> Oh, you did write BLOB in the subject.  BLOB columns hold 64k (minus 2 
> bytes for housekeeping), and excess data is discarded, by default:
> 
> "If strict SQL mode is not enabled and you assign a value to a BLOB or 
> TEXT column that exceeds the column's maximum length, the value is 
> truncated to fit and a warning is generated."
> 
> http://dev.mysql.com/doc/refman/5.0/en/blob.html

Apart from this, MySQL features another delightful data truncator called
the "max_allowed_packet" server parameter:

http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html


-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor en cubitos: http://www.demogracia.com
--



More information about the Python-list mailing list