MXS-2241: Detect invalid readwritesplit configuration
master_reconnection and disable_sescmd_history are, in practice, mutually exclusive settings.
This commit is contained in:
@ -228,6 +228,13 @@ RWSplit* RWSplit::create(SERVICE* service, MXS_CONFIG_PARAMETER* params)
|
|||||||
return NULL;
|
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);
|
return new(std::nothrow) RWSplit(service, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user