Skip to content

Commit

Permalink
Merge branch '3.1' into 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
9EOR9 committed Oct 8, 2021
2 parents 5cd74de + f6b8fe1 commit 0bf84c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 4 additions & 10 deletions libmariadb/ma_client_plugin.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ struct st_mysql_client_plugin * STDCALL
mysql_client_register_plugin(MYSQL *mysql,
struct st_mysql_client_plugin *plugin)
{
struct st_mysql_client_plugin *found_plugin= NULL;
va_list unused;
LINT_INIT_STRUCT(unused);

Expand All @@ -339,18 +340,11 @@ mysql_client_register_plugin(MYSQL *mysql,
pthread_mutex_lock(&LOCK_load_client_plugin);

/* make sure the plugin wasn't loaded meanwhile */
if (find_plugin(plugin->name, plugin->type))
{
my_set_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD,
SQLSTATE_UNKNOWN, ER(CR_AUTH_PLUGIN_CANNOT_LOAD),
plugin->name, "it is already loaded");
plugin= NULL;
}
else
plugin= add_plugin(mysql, plugin, 0, 0, unused);
if (!(found_plugin= find_plugin(plugin->name, plugin->type)))
found_plugin= add_plugin(mysql, plugin, 0, 0, unused);

pthread_mutex_unlock(&LOCK_load_client_plugin);
return plugin;
return found_plugin;
}


Expand Down
2 changes: 1 addition & 1 deletion libmariadb/mariadb_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -4174,7 +4174,7 @@ my_bool mariadb_get_infov(MYSQL *mysql, enum mariadb_value value, void *arg, ...
*((char **)arg)= (char *)ma_pvio_tls_cipher(mysql->net.pvio->ctls);
else
#endif
goto error;
*((char **)arg)= NULL;
break;
case MARIADB_CLIENT_ERRORS:
*((char ***)arg)= (char **)client_errors;
Expand Down

0 comments on commit 0bf84c0

Please sign in to comment.