distal-attribute
distal-attribute
distal-attribute
distal-attribute

Quotation Bug Still Exists!?

heidihey posted 4 years ago in General
Since some builds earlier I have to fight with inserting images into tables. The problem: quotations - maybe. The one thing I could expose, that to insert an image into a blob several signs where substituted by escape characters like \n, \r, \0 and so far. It's all the problem, I think. All is need to escape an ' is a backslash - \' makes single '

Kind Regards
ansgar posted 4 years ago
The escape chars are fine and intentionally, what's the problem here?
heidihey posted 4 years ago
I tried to insert an image into a table. Look at the image before inserting (view in Hex-Editor):
http://rapidshare.com/files/441797502/mppp-before.png
and this one is after inserting:
http://rapidshare.com/files/441797501/mppp-after.png

The image after inserting is bigger than before. When you look at the header of the Images you can see that few of original bytes still there, but before one original byte came one foreign. I also suggest that it could be bad conversion to Unicode and/or back.

However try to insert the image I gave and see what I mean.

Kind Regards
ansgar posted 4 years ago
I just teste that, without any problem. I can insert the same file ("...before"), see it in the table, can rightclick "Image preview, and am able to save it as file again onto my harddisk, where it is again of the same file size and viewable in any image editor. So, I am probably doing something different than you, or you have an out dated release / build?
heidihey posted 4 years ago
I have the latest build of HeidiSQL. Have you tried to switch to other table and back, if you still have the same information? When I just insert the image using Binary Editor -> Load binary, I can view the image too, but when I switch to other table or database, and back I get the bullshit I showed. I'll try to uninstall HeidiSQL completely then install it back. Thanks so far!

Kind Regards

heidihey posted 4 years ago
I already tried to reinstall the program, but with no changes. The bug is still there.

Maybe it's important to know, that inserting images using import function works as hell. Maybe it belongs to the difference, that the import function inserting the image using

INSERT INTO `database`.`table`(`blob_row`) VALUES(_binary 0x89504E470D0A)



the Binary Editor instead

INSERT INTO `database`.`table`(`blob_row`) VALUES('‰PNG\r\n')



However it makes no sense if the insertion is an UPDATE or INSERT function.
ansgar posted 4 years ago
Oh you were using the binary editor to load the image, not the "Insert files into BLOBs..." function. So I'll retry.
ansgar posted 4 years ago
You could be so nice and check if it makes a difference if you have pressed the button "View binary data as text" (the white one with the "0x" on it, on the main toolbar)
heidihey posted 4 years ago
I tried this too. No difference!
heidihey posted 4 years ago
I've forgotten to tell, that you don't need to switch to other table. Refresh the data shows you the same result. smile

heidihey posted 4 years ago
Did you already try the bug?
ansgar posted 4 years ago
Yes, same result here - image is corrupted for some reason. No clue what's wrong here.
heidihey posted 4 years ago
I think the clue is that parsing data using import function works because of using different code as the function for direct insert - look at the post above I wrote.

this would work

INSERT INTO `database`.`table`(`blob_row`) VALUES(_binary 0x89504E470D0A)



this not, but this is how it does.

INSERT INTO `database`.`table`(`blob_row`) VALUES('‰PNG\r\n')



You can see it below in the query history of HeidiSQL. Try it and you'll see.

Please login to leave a reply, or register at first.