MXS-1032: Add configurable connector plugin directory

The connector plugin directory can now be controlled with the
`connector_plugindir` argument and configuration option. This should allow
the connector to use the system plugins if the versions are binary
compatible.

Replaced calls to mysql_options to mysql_optionsv as the former is
deprecated in Connector-C 3.0 and the latter is supported in Connector-C
2.3.
This commit is contained in:
Markus Mäkelä
2017-03-14 11:52:38 +02:00
parent 61627e035c
commit d19e5b376d
7 changed files with 80 additions and 27 deletions

View File

@ -137,6 +137,17 @@ void set_execdir(char* param)
execdir = param;
}
/**
* Set the connector plugin directory.
* @param str Path to directory
*/
void set_connector_plugindir(char* param)
{
MXS_FREE(connector_plugindir);
clean_up_pathname(param);
connector_plugindir = param;
}
/**
* Get the directory with all the modules.
* @return The module directory
@ -235,3 +246,12 @@ char* get_execdir()
{
return execdir ? execdir : (char*) default_execdir;
}
/**
* Get connector plugin directory
* @return The connector plugin directory
*/
char* get_connector_plugindir()
{
return connector_plugindir ? connector_plugindir : (char*) default_connector_plugindir;
}