Hello Stanislav,
and thanks for your reply!
Yes, I know that inserts within a transaction are considered
even before committing, within the same transaction.
However, sometimes I find useful to have separate procedures
for entering some data, which require special checks.
It is true that I can handle the code differently, do the
checks, and then insert all into the unique transaction.
However, I cannot understand why the single entries that have
been entered and committed separately between the Start and
the Commit of the main transaction are not seen.
I don't know if the opposite could also happen, if for example
a data is deleted with a separate transaction, if this is not
seen within the main transaction, there could be a violation
of a foreign key. It's not my case however.
I would just like to understand if the Firebird transaction
management has somehow changed with version 3.0.8, I can still
solve by doing everything in the main transaction, I just
can't understand why this change and if this could in some how
to affect the security and integrity of the database.
Thank you again, best regards,
Stephanie
--
You received this message because you are subscribed to a topic in the Google Groups "firebird-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebird-support/d5TMni7sRsU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/41d660dc-7f8d-4982-88de-5c0a25b9f542n%40googlegroups.com.
Hello Dimitry,
thanks for your reply, yes the transaction is setted to Concurrency.
The UIB components su access to FB have Concurrency as default mode. Anyway I've now setted explicitly by code to Concurrency, but nothing change.
Thank you again and best regards,
Stephanie
Thanks for your reply, it
has been very useful to me.
Now everything is clearer to
me and I'm thinking what to do.
Setting the transaction as
ReadCommited could be a solution, even if from some tests it
seems to be slower, especially when there is a lot of data to
enter.
Keeping the transaction as
Concurrency with the workaround I had done to put everything
inside the transaction would be another solution.
It is still not clear to me
why with FB 2.5.X and FB 3.0.5 it also worked with
transactions set to Concurrency, but the important thing is to
have understood the problem.
Thanks again for your help!
Best regards,
Stephanie
Hello Mark,
and thanks for your reply.
Yes, it shouldn't work but it did. I had this procedure, that used separated und committed transaction for insert in secondary tables, for years, that worked until upgrade to FB 3.0.8.
Some days ago, a customer
has upgraded from FB 2.5.X to FB 3.0.8 on his server. I've
also installed with Virtual Box a XUbuntu 22.04 LTS with
Firebird 3.0.8, in order to have the same environnement. When
the customer has launched the procedure became error and have
called me. And testing the procedure on the virtual machine
with FB 3.0.8 I had the seme problem.
The same executable on my Debian Buster with FB 3.0.5 works, as it worked to my customer on FB 2.5.X. However this same executable copied to the machines with FB 3.0.8, with the same data to insert, raises exception (foreign key violation).
So I've made a workaround in
order to insert all data with the same transaction. So it
works.
May be my fault that I din't
think enough to the type of transaction and used the default
value. But why it worked until FB 3.0.5 I cannot understand.
Best regards,
Stephanie