MXS-2140: Fix readwritesplit configuration processing
Runtime configuration changes did not properly enable implicitly enabled parameters.
This commit is contained in:
@ -228,28 +228,6 @@ RWSplit* RWSplit::create(SERVICE* service, MXS_CONFIG_PARAMETER* params)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/** These options cancel each other out */
|
||||
if (config.disable_sescmd_history && config.max_sescmd_history > 0)
|
||||
{
|
||||
config.max_sescmd_history = 0;
|
||||
}
|
||||
|
||||
if (config.optimistic_trx)
|
||||
{
|
||||
// Optimistic transaction routing requires transaction replay
|
||||
config.transaction_replay = true;
|
||||
}
|
||||
|
||||
if (config.transaction_replay)
|
||||
{
|
||||
/**
|
||||
* Replaying transactions requires that we are able to do delayed query
|
||||
* retries and reconnect to a master.
|
||||
*/
|
||||
config.delayed_retry = true;
|
||||
config.master_reconnection = true;
|
||||
}
|
||||
|
||||
return new(std::nothrow) RWSplit(service, config);
|
||||
}
|
||||
|
||||
|
@ -172,6 +172,28 @@ struct Config
|
||||
{
|
||||
retry_failed_reads = true;
|
||||
}
|
||||
|
||||
/** These options cancel each other out */
|
||||
if (disable_sescmd_history && max_sescmd_history > 0)
|
||||
{
|
||||
max_sescmd_history = 0;
|
||||
}
|
||||
|
||||
if (optimistic_trx)
|
||||
{
|
||||
// Optimistic transaction routing requires transaction replay
|
||||
transaction_replay = true;
|
||||
}
|
||||
|
||||
if (transaction_replay)
|
||||
{
|
||||
/**
|
||||
* Replaying transactions requires that we are able to do delayed query
|
||||
* retries and reconnect to a master.
|
||||
*/
|
||||
delayed_retry = true;
|
||||
master_reconnection = true;
|
||||
}
|
||||
}
|
||||
|
||||
select_criteria_t slave_selection_criteria; /**< The slave selection criteria */
|
||||
|
Reference in New Issue
Block a user