diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index ab13e8cc569..f07c2dc5fae 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1068,6 +1068,8 @@ plugin_ref plugin_lock_by_name(THD *thd, const LEX_CSTRING *name, int type) plugin_ref rc= NULL; st_plugin_int *plugin; DBUG_ENTER("plugin_lock_by_name"); + if (!name->length) + DBUG_RETURN(NULL); mysql_mutex_lock(&LOCK_plugin); if ((plugin= plugin_find_internal(name, type))) rc= intern_plugin_lock(lex, plugin_int_to_ref(plugin));