Submitted by: @hvlad
The bug was detected and reproduced when testing new fb4 feature (statement restart on update conflict) but its reason is present in all Firebird versions.
To reproduce start two isql sessions against same database with page size 8KB
update t5 set x = -1111 where id = 3;
set transaction read committed read consistency;
at this point isql 2 will print:
Statement failed, SQLSTATE = XX000
The text was updated successfully, but these errors were encountered:
Commented by: @hvlad
The bug reason is wrong space allocation on data page when fragmented record is deleted.
Unfortunately (or happily), I can't reproduce it on previous versions of Firebird (fb3 and older) but it doesn't mean it can't happen there.