List:General Discussion« Previous MessageNext Message »
From:Bernhard Schmidt Date:July 16 2003 8:43am
Subject:compare longblob with binary data
View as plain text  
hi all

a question about checking the data of a longblob for equality. assume the `data` field is
of type longblob. the following statement returns the image records with equal data.

SELECT * FROM `image` WHERE `data`=?

how does mysql performe the test. does it check the length of the blob before comparing
the data, or makes it sense to add the length test as follows

SELECT * FROM `image` WHERE LENGTH(`data`) = ? AND `data`=?

any suggestions?

best regard
benny


Thread
compare longblob with binary dataBernhard Schmidt16 Jul