Subject Re: [firebird-support] mon$record_inserts and rolled-back transactions
Author Vlad Khorsun
> I just noticed the following behavior:
>
> Connection A inserts 1 record e does not commit.
> Connection B "selects mon$record_inserts from mon$record_stats where
> mon$stat_group = 1". The result is 1.
> Should B see that A inserted before A commits?

Of course. Note, B is not see what you said - it sees statistical data : there
was 1 insert. No more, no less.

> Now A rolls back.
> Again B "selects mon$record_inserts from mon$record_stats where
> mon$stat_group = 1". The result is still 1.
> Shouldn't the result be zero?

Why ? Insert was performed by the engine. Also backout was made at
rollback. This all is pieces of job that was really executed. Its not about
transaction, record counts etc. Its statistics.

> Is this expected behavior?

Of course.

Regards,
Vlad