Subject | Re: [firebird-support] Something odd with BLOBs - is this a known issue? |
---|---|
Author | Martijn Tonies |
Post date | 2005-05-11T14:09:47Z |
Hi,
Now it _appears_ to work, but obviously fails in some unexpected way.
If a blob-comparison is NOT supported, it should let the user know.
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
> >I'm using Fb 1.5 and tried this:I kind of figured that much... but ...
> >
> >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 UDFswhat
> 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
> really happens is that the engine simply ignores the test, instead ofEither that, OR - perhaps even better - raise an exception!!
> returning false in every case, as it should, IMO.
Now it _appears_ to work, but obviously fails in some unexpected way.
If a blob-comparison is NOT supported, it should let the user know.
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com