diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 1858e9d81c8..b251df490c4 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -2458,7 +2458,7 @@ static bool plugin_dl_foreach_internal(THD *thd, st_plugin_dl *plugin_dl, tmp.plugin_dl= plugin_dl; mysql_mutex_lock(&LOCK_plugin); - if ((plugin= plugin_find_internal(&tmp.name, MYSQL_ANY_PLUGIN)) && + if ((plugin= plugin_find_internal(&tmp.name, plug->type)) && plugin->plugin == plug) {