Commit 9d90a2a1 authored by Kristofer Pettersson's avatar Kristofer Pettersson

Bug#46486 warnings produced when running mysql_install_db

Incremental patch part 2

Removing dead code and changing a note level message to a warning.


sql/sql_plugin.cc:
  * Remove free_slots. The only purpose for this variable was to trigger
    a redundant warning message  and it failed.
  * Change the note level message about shutting down plugins which
    didn't end nicely to a warning level message. (If this shutdown
    fails and there still are reference counts in the plugin an
    additional error level message is emitted)
parent 1d584b8f
......@@ -1520,7 +1520,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
void plugin_shutdown(void)
{
uint i, count= plugin_array.elements, free_slots= 0;
uint i, count= plugin_array.elements;
struct st_plugin_int **plugins, *plugin;
struct st_plugin_dl **dl;
DBUG_ENTER("plugin_shutdown");
......@@ -1541,18 +1541,13 @@ void plugin_shutdown(void)
while (reap_needed && (count= plugin_array.elements))
{
reap_plugins();
for (i= free_slots= 0; i < count; i++)
for (i= 0; i < count; i++)
{
plugin= *dynamic_element(&plugin_array, i, struct st_plugin_int **);
switch (plugin->state) {
case PLUGIN_IS_READY:
if (plugin->state == PLUGIN_IS_READY)
{
plugin->state= PLUGIN_IS_DELETED;
reap_needed= true;
break;
case PLUGIN_IS_FREED:
case PLUGIN_IS_UNINITIALIZED:
free_slots++;
break;
}
}
if (!reap_needed)
......@@ -1586,7 +1581,7 @@ void plugin_shutdown(void)
if (!(plugins[i]->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_FREED |
PLUGIN_IS_DISABLED)))
{
sql_print_information("Plugin '%s' will be forced to shutdown",
sql_print_warning("Plugin '%s' will be forced to shutdown",
plugins[i]->name.str);
/*
We are forcing deinit on plugins so we don't want to do a ref_count
......
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