Detecting uncommitted changes

  • thomas kellerer

    thomas kellerer - 2013-06-20


    I'm trying to check if my current session to the database has any uncommitted changes (e.g. a DELETE without a commit)

    Is the value in the column TRANSACTION_SIZE in INFORMATION_SCHEMA.SYSTEM_SESSIONS a reliable way to do this?

    As far as I can tell anything greater than zero indicates a non-committed DML statement.

    I don't care if there are false positives (i.e. a non-zero value even if nothing has changed), but a false negative (a zero even though something has changed) would not be so good (although not a real problem).


  • Fred Toussi

    Fred Toussi - 2013-06-20

    You can rely on this value. It is always accurate.

    For example, if a rollback to a savepoint has been made, the value indicates the size of the remaining changes after the rollback. If a row has been changed multiple times, each change is counted.

  • thomas kellerer

    thomas kellerer - 2013-06-20

    Thanks for the quick answer.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks