mysql-backup4j
mysql-backup4j copied to clipboard
Reimporting a single mysql table containing a longblob column throws exceptions
I created a MySQL database containing a single table with a primary key column, some describing meta data columns and a longblob column. Then I added 3 records containing the meta data. Finally I used MySQL Workbench to upload the images by using its "Load Value From File..." function. Using the MySQL Workbench Value Editor I was able to display the Images correctly. After that I used the MysqlBackup4JIntegrationTest class to verify both export and import of the database. While export ran without complications the import threw exceptions.
I noticed the recommendation to store the images hexadecimally encoded but I have to handle a customer database in which all blobs are already filled up. So I tried to setup my test database nearly the same way like the customer did it.
Hope you can help me by solving the issue.
Perhaps in MysqlExportService the method getDataInsertStatement should should handle blobs as hexadecimally encoded byte arrays rather than handle them as strings?
Here I uploaded my sample dump: