Commit 71312824 authored by Sergei Golubchik's avatar Sergei Golubchik

At --log-warnings=9 or more, log at what address a dynamic plugin was loaded.

It helps to interpret valgrind/safemalloc memory-related warnings that are
printed when a plugin is unloaded (and thus cannot resolve addresses automatically)
parent 3febb3ce
...@@ -1357,6 +1357,16 @@ static int plugin_initialize(MEM_ROOT *tmp_root, struct st_plugin_int *plugin, ...@@ -1357,6 +1357,16 @@ static int plugin_initialize(MEM_ROOT *tmp_root, struct st_plugin_int *plugin,
goto err; goto err;
} }
if (plugin->plugin_dl && global_system_variables.log_warnings >= 9)
{
void *sym= dlsym(plugin->plugin_dl->handle,
plugin->plugin_dl->mariaversion ?
maria_plugin_declarations_sym : plugin_declarations_sym);
DBUG_ASSERT(sym);
sql_print_information("Plugin %s loaded at %p",
plugin->name.str, sym);
}
if (plugin_type_initialize[plugin->plugin->type]) if (plugin_type_initialize[plugin->plugin->type])
{ {
if ((*plugin_type_initialize[plugin->plugin->type])(plugin)) if ((*plugin_type_initialize[plugin->plugin->type])(plugin))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment