Track session autocommit state

This tracks only what is explicitly set. That is, if autocommit
has been set true then, even if a transaction is started, autocommit
will not be set false.

That is, a user of the session autocommit and transaction states
need to be aware of their semantics. If a transaction is active,
then the state of autocommit is irrelevant.
This commit is contained in:
Johan Wikman
2016-10-21 13:08:18 +03:00
parent 5cc436c37c
commit 693d8dcbb4
3 changed files with 45 additions and 0 deletions

View File

@ -143,6 +143,7 @@ session_alloc(SERVICE *service, DCB *client_dcb)
session->state = SESSION_STATE_READY;
session->trx_state = SESSION_TRX_UNKNOWN;
session->autocommit = true;
/*
* Only create a router session if we are not the listening
* DCB or an internal DCB. Creating a router session may create a connection to a