Subject Internal Firebird question.
Author Fabiano
Hi all.

I have a question about how Firebird internally updates a record.



Here an example:

Create table test(cod integer, name varchar(50))

Commit;



Insert into test(cod, name) values (1, 'Big description 1');

Insert into test(cod, name) values (2, 'Big description 2');

Insert into test(cod, name) values (3, 'Big description 3');

Commit;



Delete from teste where cod=2;

Commit;



At this point when I inspect the FDB with an hex editor I can see 3 record
on Page record (0x05).

There are 3 entries in the "struct dpg_repeater". Two of them with offset
and length and one (for record cod=2) with both offset and length 0.



Whell, next I insert a new record:

Insert into test(cod, name) values (2, 'Small 2');

Commit;



After that I reinspect the FDB file and it not REUSE the old record that
contains "Big description 2". It stays here and a NEW record was create to
hold the new record 2 that are SMALL than old record.



Why? Why Firebird does not reutilize that space?

I tested with only one connection in a test database with only this table.

Thanks, Fabiano.







[Non-text portions of this message have been removed]