summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/sql_plugin.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index cc20e22ab32..84810fb3324 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -967,7 +967,6 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
for (idx= 0; idx < total; idx++)
{
- plugin= plugins[idx];
if (unlikely(version != plugin_array_version))
{
rw_rdlock(&THR_LOCK_plugin);
@@ -976,6 +975,7 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
plugins[i]=0;
rw_unlock(&THR_LOCK_plugin);
}
+ plugin= plugins[idx];
if (plugin && func(thd, plugin, arg))
goto err;
}