Determining whether the current transaction has pending changes