Fixes #1567438 - Wrong transaction type was being catched in a MySQL transaction specific loop when releasing transactions