Subject Re: Firebird issue/bug
Author william_yuwei
Hi, Helen
> Did you know that, when you add a new, non-nullable field to a table, you must ALSO course through the existing data and apply the default to all of the records manually? Firebird *does not* automatically fill new fields of old records with data.

Yes. I know that. all the old data has the fields filled in.
What I'm talking about is that, AFTER that, the records that being created by calling the stored procedure were ALL NULL.

> Whenever you do metadata actions like this you should put the database off-line and then log in with exclusive access. If you try to do it without putting the DB offline first, you will have old versions of the table and the stored procedures in the cache, amongst other problems.

> Commit work when you have completed the metadata changes. Then populate the empty field in a fresh transaction and commit work. Lastly, log out, before putting the database back on-line. After that, all should work as you expect.
> ./heLen

Yes. The DB IS off line. each time when we upgrade the client's database, all the DB are offline, we ran the backup and restore process first, then apply metadata changes, e.g. ALTER TABLE SERVICES ADD POSTED NOT NULL DEFAULT 'N', UPDATE SERVICES SET POSTED = 'N') to the database, then made the DB back online again.

However, the NEW records that being created by calling the stored procedure were STILL ALL NULL, UNLESS the stored procedure gets re-compiled again (put its source code back in, re-compile and commit it, remove the source code from RDB$PROCEDURES).

I don't think I'm doing wrong. Obviously, something is doing wrong in FireBird.