MySQL Forums
Forum List  »  PHP

Re: Concat Occasionally Drops a Character or Two
Posted by: Jonathan Shaltz
Date: September 29, 2009 07:51PM

Additional update: Creating a file populated with the values A through Z (0x41 through 0x5A), it loads just fine, even with a large-ish file (1.3 MB).

I repeated this exercise with a file that consisted of the characters 0x00 through 0xFF, repeated through the end of a 1300000-byte file. The very first chunk lost a byte on its way into MySQL. Chunks #6 and #9 also lost a byte each. I'm still bewildered. It would make *some* sense if the program collapsed Windows-style linebreaks (0x0D, 0x0A) to UNIX (0x0A), though the BINARY flag should prevent that. But this test file does not have any such combinations. Because there are only 256 possible values, each 10,000-byte chunk includes about 400 repetitions of each combination of (byte X) || (byte X+1).

I suppose I'll sift through the decryption routines and see if I can wrap the data in AES and get it loaded correctly. Doubtful, since it would just shuffle one binary file into another, but I'm grasping at straws here.

- Jonathan

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.