Between 4.0.0.1820 and 4.0.01876 something has changed with the commit behaviour of a selectable stored procedure under a transaction using isc_tpb_autocommit.

I have a test in Jaybird[1] that executes a stored procedure with a loop that inserts a row in a table and then suspends the count of inserted rows. Jaybird fetches individual rows and after each row it will count the number of inserted rows in the table using a separate connection.

In 4.0.0.1820, when the select from the stored procedure was executed, but not yet fetched, the number of rows seen by the other transaction was 0, but in 4.0.0.1876 the number of rows seen by the other transaction is 1.

This would seem to indicate that either Firebird now prefetches a row from the stored procedure, or that previously the transaction boundary of isc_tpb_autocommit was after the suspend, but is now after the insert itself or at suspend.

Was this change intentional?

PS If necessary I can try to narrow it down further by trying other snapshots, but maybe it rings a bell with anyone. Let me know if a closer version identification is necessary.

Jaybird itself uses this test to verify if it is really using isc_tpb_autocommit or not (with the 'standard' autocommit of Jaybird, the commit would only happen after the stored procedure execution is complete).

[1]: https://github.com/FirebirdSQL/jaybird/blob/master/src/test/org/firebirdsql/jdbc/TestUseFirebirdAutocommit.java#L150
--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to