Subject Re: [ib-support] Re: Database corruption after alter table
Author Martijn Tonies
> > Carsten, it can't be relevant to new data. If you don't set value for
> > not null column variants:
> > 1. Components can set something for you as Thomas said
> > 2. You'll get exception on insert
> >
> > But it is relevant to already existing records:
> > Some table contained colunm A INT only:
> > 1
> > 2
> > 3
> > you added not null column B without default and _old_ records are now
> > 1 null
> > 2 null
> > 3 null
> > until you don't fill them.
>
> this is something I can't reproduce with FB 1.0 Build 796.
>
> To be sure, I used isql.exe and not a third-party tool and
> after altering a table with:
>
> SQL> alter table mytable2 add myint2 integer not null;
> SQL> commit;
>
> A select
>
> SQL> select myint2 from mytable2;
>
> shows the value 0 for myint2 for old records, so the database
> *should* be in a restoreable state.

Right - I actually discussed this with Claudio once, and I believe this
behaviour was introduced in IB6.


With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."