Skip to content

Commit af8b2c6

Browse files
committed
MDEV-26637: (plugin) ASAN: main.metadata and user_variables.basic MTR failures after MDEV-26572
Get rid of locking "empty" plugin. This problem present in our tests in case of malformed frm-file, for example.
1 parent 763bdee commit af8b2c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sql/sql_plugin.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,8 @@ plugin_ref plugin_lock_by_name(THD *thd, const LEX_CSTRING *name, int type)
10681068
plugin_ref rc= NULL;
10691069
st_plugin_int *plugin;
10701070
DBUG_ENTER("plugin_lock_by_name");
1071+
if (!name->length)
1072+
DBUG_RETURN(NULL);
10711073
mysql_mutex_lock(&LOCK_plugin);
10721074
if ((plugin= plugin_find_internal(name, type)))
10731075
rc= intern_plugin_lock(lex, plugin_int_to_ref(plugin));

0 commit comments

Comments
 (0)