Subject Re: [firebird-support] Something odd with BLOBs - is this a known issue?
Author Helen Borrie
At 12:11 PM 11/05/2005 +0200, you wrote:
>Hi,
>
>I'm using Fb 1.5 and tried this:
>
>RECREATE TABLE B_TEST
>(
> ID INTEGER,
> B BLOB SUB_TYPE 1
>);
>
>Inserted three rows:
>insert into B_TEST
>values (1, 'test1');
>insert into B_TEST
>values (2, 'test2');
>insert into B_TEST
>values (3, 'test3');
>
>Next, try this:
>select * from b_test where b = 'test'
>
>This returns ALL 3 ROWS.
>
>This, for example, will update all 3 rows as well:
>update b_test set b = null where b = 'test'
>
>Obviously, "b" NEVER equals "test".
>
>Is this a known issue already? If not, I surely consider this a bug.

You've never been able to do an equality test between a string and a blob,
nor between *anything* and a blob, even another blob. There are UDFs
around to return a boolean result (BLOBSEQUAL, BLOBCOMPARE) that take two
blobs as inputs. I think your query should return NO rows but I think what
really happens is that the engine simply ignores the test, instead of
returning false in every case, as it should, IMO.

./hb