MXS-2140: Fix readwritesplit configuration processing

Runtime configuration changes did not properly enable implicitly enabled
parameters.
This commit is contained in:
Markus Mäkelä
2018-11-05 15:53:31 +02:00
parent b2d1a5b91b
commit 95745f5a4e
2 changed files with 22 additions and 22 deletions

View File

@ -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);
}

View File

@ -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 */