MySql transaction with lost database connection


I have an application which uses remote MySql database (it connects the database via internet).

The Internet of one of my clients is very unstable.

Because of this I intend to put the Sql statements in a transaction.
The question is: if I start a transaction and in the middle of it there is a "Lost connection" with the database, the previous Sql statements will roll back, right?

Thank you very much.
Who is Participating?
John TsioumprisConnect With a Mentor Software & Systems EngineerCommented:
Look at the documentation here...essentially it says that if the COMMIT is not issued and the autocommit is disabled the transaction will be rolled back.
All Courses

From novice to tech pro — start learning today.