Using mysql transactions

consistency