Currently, MySqlConnection checks transaction state between the Mono.defer is subscribed and Exchangeable is executed.
It may cause some undefined behavior. All states checking will have same problem, like MySqlConnection.isSessionAutoCommit.
I was thinking that transaction state is necessary, like ConnectionImpl#rollback() does, it even throws an exception if connection is not in a transaction.
Firstly, we should remove transaction state checking in MySqlConnection, see also #179 does.
Then we can consider adding proper status checks in Exchangeable and RequestQueue.
Expected behavior
States should be checked in RequestQueue executing Exchangeable instead.
Describe the bug
Currently,
MySqlConnection
checks transaction state between theMono.defer
is subscribed andExchangeable
is executed.It may cause some undefined behavior. All states checking will have same problem, like
MySqlConnection.isSessionAutoCommit
.I was thinking that transaction state is necessary, like ConnectionImpl#rollback() does, it even throws an exception if connection is not in a transaction.
Firstly, we should remove transaction state checking in
MySqlConnection
, see also #179 does.Then we can consider adding proper status checks in
Exchangeable
andRequestQueue
.Expected behavior
States should be checked in
RequestQueue
executingExchangeable
instead.