[Dbix-class] Inserting binary data without corrupting

David Cantrell david at cantrell.org.uk
Fri Feb 27 13:33:17 GMT 2015


On Fri, Feb 27, 2015 at 12:43:11PM +0000, Sam Kington wrote:
> On 27 Feb 2015, at 07:54, Peter Rabbitson <rabbit+dbic at rabbit.us> wrote:
> > On 02/26/2015 11:38 PM, Sam Kington wrote:
> >> Is this the best way of handling this, or is there a simpler or purer way I've overlooked?
> > 
> > Interesting. This is one way of handling it, yes (btw `unpack 'H*', $binary data` would be much faster). If this definitely fixes things on a combination of a DBD and RDBMS version (you never said what you are using) - I can look into making this implicitly handled by the driver itself.
> 
> MySQL 5.1.73-1, DBIx::Class 0.082810, DBI 1.622, DBD::mysql 4.022.

Same happens in MySQL 5.5 with DBD::mysql $latest as well.

-- 
David Cantrell | London Perl Mongers Deputy Chief Heretic

You don't need to spam good porn



More information about the DBIx-Class mailing list