MXS-1549: Implement optimistic transaction execution
When the `optimistic_trx` mode is enabled, all transactions are started on a slave server. If the client executes a query inside the transaction that is not of a read-only nature, the transaction is rolled back and replayed on the master.
This commit is contained in:
@ -218,6 +218,16 @@ public:
|
||||
return m_trx_is_read_only;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if current transaction is still a read-only transaction
|
||||
*
|
||||
* @return True if no statements have been executed that modify data
|
||||
*/
|
||||
bool is_trx_starting() const
|
||||
{
|
||||
return qc_query_is_type(m_route_info.type_mask(), QUERY_TYPE_BEGIN_TRX);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Store and process a prepared statement
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user