SeunMatt / mysql-backup4j

mysql-backup4j is a library for programmatically exporting mysql databases and sending the zipped dump to email, Amazon S3, Google Drive or any other cloud storage of choice
MIT License
124 stars 71 forks source link

sometimes can export Blob data but cannot import them #16

Closed FULaBUla closed 2 months ago

FULaBUla commented 3 years ago

problem

I using Blob/TinyBlob/MediumBlob in MySql8. Sometimes i can export data from database but i cannot import them when read Blod data from file, java.sql will throw exception because MysqlExportService.java_Line:258 will convert binary data to string and some strange characters in the string which will cause the subscripts to cross the bounds.

I think we need to add judgment sentence when the type is LONGVARBINARY and save data like 0x00001abc maybe can solve this problem

SeunMatt commented 1 year ago

Please provide code examples of how you normally insert the blob data into the database and how you use them once they're pulled out of the database.

Given that Blob data are hexadecimally encoded before saving into the database, the getString function should work seamlessly. Please provide more info to help with this

SeunMatt commented 2 months ago

Issue fixed in version 1.3.0