[Info-ingres] Is Ingres supposed to rollback in case of the connection dropping?
Roy Hann
roy.hann at rationalcommerce.com
Thu Oct 4 10:15:15 UTC 2018
Thursday, October 4, 2018, 10:58:22 AM, you wrote:
> In an ABF application I sometimes see transactions being
> half-done.For an insert to one table and then an insert to another
> table within the same ABF session, having the connection dropped (I
> guess in between), or some other Ingres internal exception
> happening, I find that the first insert completed successfully but
> the second not (as it should,since this point was never
> reached).Should Ingres had rolled back so that both the statements fail?
> The session is run with autocommit off, the commit submitted only
> after both of the inserts.Also there's checking iierror with
> inquire_ingres (h_rowcount = rowcount, h_errorno = errorno), after
> each sql statement but I guess that only has an effect as long as
> there's no out of the ordinary exceptions ?
What you describe should never happen and to my certain knowledge
never does. So the problem is that somehow the incomplete transaction
_is_ being committed.
When it is hard to see where it happens the usual culprit is a
database procedure doing a commit. It will be an explicitly executed
DBP not a rule-fired DBP because rule-fired DBPs are not allowed to
commit.
If it is a DBP you will not see the commit in the SC930 trace, but if
you are running a GA release of Ingres you will see the in-transaction
indicator (the last field of the EQY record) go to zero unexpectedly.
Roy Hann
Rational Commerce Ltd.
T +44 20 8691 2089
"Ingres development, tuning and training experts"
More information about the Info-ingres
mailing list