Subject Re: [ib-support] Re: Database corruption after alter table
Author Carsten Schaefer
""Alexander V.Nevsky"" <ded@...> schrieb im Newsbeitrag
news:b47fiu+tntp@......
> --- In ib-support@yahoogroups.com, Carsten Sch=E4fer
<ca_schaefer@g...>=20
> wrote:
> > Alexander,
> > i think it is all right, what you have written, but it's not=20
> relevant for my case.
> > (there was no data insertet in the database after my updates)
>
> Carsten, it can't be relevant to new data. If you don't set value
for=20
> 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.
>
> > I forget to define a default value.
> > Why is there no error raised from the database, if this leads
to=20
> unrestorable backups ?
>
> Because there is not another way to add new not null column
without=20
> default to table with data and sometimes it exactly what we need,=20
> having in mind to fill it using some sophicticated algorithm. We
must=20
> care about filling ourselves.
>

Maybe this behavior is correct.
But why can i insert a foreign key for this column without any
exception.
The field id_mitarbeiter is primary key for t_mitarbeiter and there is
no null value allowed.

gru�
Carsten