"Boris Popov" <[EMAIL PROTECTED]> wrote: > There's a problem with LIKE in queries produces inconsistent results, > whereas = works as expected, > > CREATE TABLE TYPETESTS (test blob NULL , id integer NOT NULL) > INSERT INTO TYPETESTS (test,id) VALUES (X'616263646566',349) > > SELECT TEST,ID FROM TYPETESTS WHERE TEST = CAST (X'616263646566' AS blob) > > Proper results 100% of the times > > SELECT TEST,ID FROM TYPETESTS WHERE TEST = X'616263646566' > > Proper results 100% of the times > > SELECT TEST,ID FROM TYPETESTS WHERE TEST LIKE X'616263646566' > > Proper results 30-50% of the times, no results otherwise > > SELECT TEST,ID FROM TYPETESTS WHERE TEST LIKE CAST (X'616263646566' AS blob) > > Proper results 30-50% of the times, no results otherwise > > Would this be considered an issue worthy of a bug report? >
The LIKE() function expects '\000'-terminated inputs. So it probably will work if you add 00 to the end of your LIKE constant. Using a blob as the right argument to LIKE seems kind of an odd thing to do. I'm not much motivated to fix this. -- D. Richard Hipp <[EMAIL PROTECTED]>