Log the transaction after determining what sort of START TRANSACTION statement to use.