-
Notifications
You must be signed in to change notification settings - Fork 14
Description
I believe there may be an issue when trying to insert binary values into binary (blob, tinyblob, mediumblob, longblob, binary, varbinary) database fields when using the DBD::MariaDB database driver. See the discussion here about needing to provide DBD::MariaDB with the correct type information of each value. And specifically that ->do() binds all parameters as SQL_VARCHAR type.
https://metacpan.org/dist/DBD-MariaDB/view/lib/DBD/MariaDB.pod#Binary-parameters
Data::ObjectDriver::Driver::DBD::MariaDB extends Data::ObjectDriver::Driver::DBD::mysql, which has a $dbh->do() in the bulk_insert() sub.
The above documentation offers a solution of using bind_param to specify a type (DBI::SQL_BINARY) while using a full prepare/bind_param/execute instead of using do. It's not clear to me how to apply that recommendation to this module.
I know that DBIx::Class has somehow done this, but that module has access to a schema definition to know the type of each database field.
I use this module via TheSchwartz reliable job queue, which uses this module. The args field in the TheSchwartz backend database table structure is of type "MEDIUMBLOB" and should likely have that DBI::SQL_BINARY type applied to it.
I'm fairly new at issue reports, so please go easy on me if this report lacks any desired content/context.
Thanks for taking some time to think about this.