diff options
author | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
commit | 139a2b64bf8ec2e248656835e23a5c98ffc667a8 (patch) | |
tree | 7d77d6f1073f8090f275b30cb3f10254497da243 /sql-common | |
parent | b3f7eac5301529c2d069ebe4d0558980412af3a2 (diff) | |
parent | ce675406ca8dbc1532a908803a1371de8432d466 (diff) | |
download | mariadb-git-139a2b64bf8ec2e248656835e23a5c98ffc667a8.tar.gz |
Merge with 5.2
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 3 | ||||
-rw-r--r-- | sql-common/client_plugin.c | 15 |
2 files changed, 13 insertions, 5 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index c449cd17100..d361d35b7a8 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -1620,6 +1620,7 @@ mysql_init(MYSQL *mysql) */ mysql->reconnect= 0; + DBUG_PRINT("mysql",("mysql: 0x%lx", (long) mysql)); return mysql; } @@ -3302,6 +3303,8 @@ void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)), void STDCALL mysql_close(MYSQL *mysql) { DBUG_ENTER("mysql_close"); + DBUG_PRINT("enter", ("mysql: 0x%lx", (long) mysql)); + if (mysql) /* Some simple safety */ { /* If connection is still up, send a QUIT message */ diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c index 433942199e5..e37849d75b2 100644 --- a/sql-common/client_plugin.c +++ b/sql-common/client_plugin.c @@ -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; } |