Subject Re: [Firebird-Java] Re: Obscure error
Author William L. Thomson Jr.
On Fri, 2003-02-07 at 01:03, Simon Harper wrote:
> [snip]
> > However it allows people to proceed in an improper manner in my opinion.
> > I do not see a reason an empty blob should not be null. I see it as
> > making a mess of the data in the db.
> You're absolutely right. When I looked at the problem from another
> angle I realised that my application wouldn't cope in anycase, i.e.
> queries that find blobs that are null won't find these records. I
> don't know how the data got into this state, but it is easily cleaned
> up with statements like:
> update bad_table set blob_field=null where blob_field='';

I extracted the data, checked the length, and the set any columns to
null that had lengths of <=8. I believe I tried the update statement
above first, but it did not clean everything up for me. So I had to go
one step further.

> William, I agree this is not a problem for the JayBird developers and
> that instead the data should be cleaned up.

No worries. I gripped about the same thing. I tweaked out code in the
driver to get around my problem. I was then building a test case to
reproduce what I thought was a bug. Then I found out my mistake in the
process. Boy does my foot taste bad. ;)

> Roman, I did try to put a test case together but couldn't get it to go
> wrong !. I'm more than happy to do any testing if anyone wants me to,
> but I'm guessing that won't be needed.

I do not think so. I still have not come across my backup, since it was
a personal backup that I tend to write over from time to time.

> Thanks to all for your help,

Your welcome, have a nice day.

William L. Thomson Jr.
Support Group
Obsidian-Studios Inc.
439 Amber Way
Petaluma, Ca. 94952
Phone 707.766.9509
Fax 707.766.8989