mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge with 5.2
This commit is contained in:
@ -181,7 +181,7 @@ err2:
|
||||
plugin->deinit();
|
||||
err1:
|
||||
if (dlhandle)
|
||||
dlclose(dlhandle);
|
||||
(void)dlclose(dlhandle);
|
||||
set_mysql_extended_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD, unknown_sqlstate,
|
||||
ER(CR_AUTH_PLUGIN_CANNOT_LOAD), plugin->name,
|
||||
errmsg);
|
||||
@ -240,6 +240,8 @@ int mysql_client_plugin_init()
|
||||
{
|
||||
MYSQL mysql;
|
||||
struct st_mysql_client_plugin **builtin;
|
||||
va_list unused;
|
||||
LINT_INIT_STRUCT(unused);
|
||||
|
||||
if (initialized)
|
||||
return 0;
|
||||
@ -256,7 +258,7 @@ int mysql_client_plugin_init()
|
||||
pthread_mutex_lock(&LOCK_load_client_plugin);
|
||||
|
||||
for (builtin= mysql_client_builtins; *builtin; builtin++)
|
||||
add_plugin(&mysql, *builtin, 0, 0, 0);
|
||||
add_plugin(&mysql, *builtin, 0, 0, unused);
|
||||
|
||||
pthread_mutex_unlock(&LOCK_load_client_plugin);
|
||||
|
||||
@ -286,7 +288,7 @@ void mysql_client_plugin_deinit()
|
||||
if (p->plugin->deinit)
|
||||
p->plugin->deinit();
|
||||
if (p->dlhandle)
|
||||
dlclose(p->dlhandle);
|
||||
(void)dlclose(p->dlhandle);
|
||||
}
|
||||
|
||||
bzero(&plugin_list, sizeof(plugin_list));
|
||||
@ -302,6 +304,9 @@ struct st_mysql_client_plugin *
|
||||
mysql_client_register_plugin(MYSQL *mysql,
|
||||
struct st_mysql_client_plugin *plugin)
|
||||
{
|
||||
va_list unused;
|
||||
LINT_INIT_STRUCT(unused);
|
||||
|
||||
if (is_not_initialized(mysql, plugin->name))
|
||||
return NULL;
|
||||
|
||||
@ -316,7 +321,7 @@ mysql_client_register_plugin(MYSQL *mysql,
|
||||
plugin= NULL;
|
||||
}
|
||||
else
|
||||
plugin= add_plugin(mysql, plugin, 0, 0, 0);
|
||||
plugin= add_plugin(mysql, plugin, 0, 0, unused);
|
||||
|
||||
pthread_mutex_unlock(&LOCK_load_client_plugin);
|
||||
return plugin;
|
||||
@ -361,7 +366,7 @@ mysql_load_plugin_v(MYSQL *mysql, const char *name, int type,
|
||||
if (!(sym= dlsym(dlhandle, plugin_declarations_sym)))
|
||||
{
|
||||
errmsg= "not a plugin";
|
||||
dlclose(dlhandle);
|
||||
(void)dlclose(dlhandle);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user