mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
MDEV-12501 -- set --maturity-level by default
* Note: breaking change; since this commit, a plugin that has
worked so far might get rejected due to plugin maturity
* mariabackup is not affected (allows all plugins)
* VERSION file defines SERVER_MATURITY, which defines the
corresponding numeric value as SERVER_MATURITY_LEVEL in
include/mysql_version.h
* The default value for 'plugin_maturity' is SERVER_MATURITY_LEVEL - 1
* Logs a warning if a plugin has maturity lower than
SERVER_MATURITY_LEVEL
* Tests suppress the plugin maturity warning
* Tests use --plugin-maturity=unknown by default so as not to fail
due to the stricter plugin maturity handling
This commit is contained in:
@@ -1155,6 +1155,7 @@ static bool plugin_add(MEM_ROOT *tmp_root,
|
||||
report_error(report, ER_CANT_OPEN_LIBRARY, dl->str, ENOEXEC, buf);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (plugin_maturity_map[plugin->maturity] < plugin_maturity)
|
||||
{
|
||||
char buf[256];
|
||||
@@ -1167,6 +1168,14 @@ static bool plugin_add(MEM_ROOT *tmp_root,
|
||||
report_error(report, ER_CANT_OPEN_LIBRARY, dl->str, EPERM, buf);
|
||||
goto err;
|
||||
}
|
||||
else if (plugin_maturity_map[plugin->maturity] < SERVER_MATURITY_LEVEL)
|
||||
{
|
||||
sql_print_warning("Plugin '%s' is of maturity level %s while the server is %s",
|
||||
tmp.name.str,
|
||||
plugin_maturity_names[plugin->maturity],
|
||||
plugin_maturity_names[SERVER_MATURITY_LEVEL]);
|
||||
}
|
||||
|
||||
tmp.plugin= plugin;
|
||||
tmp.ref_count= 0;
|
||||
tmp.state= PLUGIN_IS_UNINITIALIZED;
|
||||
|
||||
Reference in New Issue
Block a user