Subject RE: [ib-support] Re: Database corruption after alter table
Author Thomas Steinmaurer
Hi Ivan,

> > Thomas, all results are correct except fact that you see '0' at
> > client representation when you must see 'null' if column defined as
> > Not Null. I'm not sure but seems null-flag of Not Null column is
> > wrongly cleared somewhere in chain engine-gds32. Internal queries and
> > gbak among them are not affected. And IIRC it was dependent on column
> > type too... Unfortunately I did'nt registered this bug myself, just
> > commented someone else's registration which was wrongly formulated and
> > can't quickly find it.
> There is not any bug. If the column is defined as not-null,
> then null-indicator is not cleared anywhere, it just is not used on client at all
> (which makes sense to me).
> If your client needs to indicate nulls in such logically corrupted database,
> then just ask for it in XSQLDA (by setting the lowest bit in SQLTYPE).

But, isn't it confusing when creating a NOT NULL column
without specifying a DEFAULT value that e.g. for an
created INTEGER column the value 0 is shown, when querying
the newly created column, but a WHERE MYCOLUMN IS NOT NULL
gives an empty result set? IMHO it is ;-).