Subject | RE: [ib-support] Re: Database corruption after alter table |
---|---|
Author | Thomas Steinmaurer |
Post date | 2003-03-06T13:57:47Z |
Hi Alexander,
Firebird 1.0 Build 796 and isql.exe.
A table with one record.
SQL> alter table mytable2 add myint3 integer not null;
SQL> commit;
SQL> select * from mytable2 where myint3 is null;
I get a result set of one record <= wrong
SQL> select * from mytable2 where myint3 is not null;
I get an empty result set <= still wrong
SQL> select * from mytable2 where myint3 = 0;
I get an empty result set <= again wrong
SQL> select * from mytable2;
I get a result set of one record <= correct
Regards,
Thomas.
> > SQL> select myint2 from mytable2;Ha, "catch me if you can", and yes, you did it ;-)).
> >
> > shows the value 0 for myint2 for old records, so the database
> > *should* be in a restoreable state.
>
> Thomas, now try
>
> select * from mytable2 where myint2 is null;
>
> ;)) You see client-side null-interpretation of Not Null column. IIRC I
> even registered it in bug tracker once.
Firebird 1.0 Build 796 and isql.exe.
A table with one record.
SQL> alter table mytable2 add myint3 integer not null;
SQL> commit;
SQL> select * from mytable2 where myint3 is null;
I get a result set of one record <= wrong
SQL> select * from mytable2 where myint3 is not null;
I get an empty result set <= still wrong
SQL> select * from mytable2 where myint3 = 0;
I get an empty result set <= again wrong
SQL> select * from mytable2;
I get a result set of one record <= correct
Regards,
Thomas.