MXS-2241: Detect invalid readwritesplit configuration

master_reconnection and disable_sescmd_history are, in practice, mutually
exclusive settings.
This commit is contained in:
Markus Mäkelä 2019-01-07 09:58:28 +02:00
parent 0859f3caff
commit 5f83b07fc2
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -228,6 +228,13 @@ RWSplit* RWSplit::create(SERVICE* service, MXS_CONFIG_PARAMETER* params)
return NULL;
}
if (config.master_reconnection && config.disable_sescmd_history)
{
MXS_ERROR("Both 'master_reconnection' and 'disable_sescmd_history' are enabled: "
"Master reconnection cannot be done without session command history.");
return NULL;
}
return new(std::nothrow) RWSplit(service, config);
}