Hi All,
I am reading through a sql dump of a mySQL database in order to read in the SQL statements for purposes of my own custom replication system to another mySQL server.
All is fine until I come to a line containing a blob field (binary data).
I am basically searching for the presence of ";\r\n" (comma + windows new line) which works 99% of the time as this is indeed the end of the line. However the Blob data being binary is represented as ascii characters in the sql dump file and more often than not the characters \r\n and ;\r\n appear within the binary data and therefore not only at the end of the line.
Can anyone suggest a solution to this to avoid having to trawl through binary data or even a way to keep blob as binary and not read them as ascii characters.
My other thought was to save the binary data not as is in the blob column but as base64 or something. The trouble with base64 is that is takes up 33% more space. Something like this would be good if I can find a decent way of storing the images and therefore converting back and forth easily.
Many thanks in advance for any feedback received.