Commit b2008230 authored by patg@radha.patg.net's avatar patg@radha.patg.net

WL #3031

fixing pushbuild warnings and errors
parent 9fa4590c
...@@ -300,7 +300,7 @@ my_bool get_server_from_table_to_cache(TABLE *table) ...@@ -300,7 +300,7 @@ my_bool get_server_from_table_to_cache(TABLE *table)
if (my_hash_insert(&servers_cache, (byte*) server)) if (my_hash_insert(&servers_cache, (byte*) server))
{ {
DBUG_PRINT("info", ("had a problem inserting server %s at %lx", DBUG_PRINT("info", ("had a problem inserting server %s at %lx",
server->server_name, server)); server->server_name, (long unsigned int) server));
// error handling needed here // error handling needed here
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
...@@ -329,7 +329,7 @@ my_bool server_exists_in_table(THD *thd, LEX_SERVER_OPTIONS *server_options) ...@@ -329,7 +329,7 @@ my_bool server_exists_in_table(THD *thd, LEX_SERVER_OPTIONS *server_options)
{ {
byte server_key[MAX_KEY_LENGTH]; byte server_key[MAX_KEY_LENGTH];
int result= 1; int result= 1;
int error; int error= 0;
TABLE_LIST tables; TABLE_LIST tables;
TABLE *table; TABLE *table;
...@@ -392,7 +392,7 @@ my_bool server_exists_in_table(THD *thd, LEX_SERVER_OPTIONS *server_options) ...@@ -392,7 +392,7 @@ my_bool server_exists_in_table(THD *thd, LEX_SERVER_OPTIONS *server_options)
int insert_server(THD *thd, FOREIGN_SERVER *server) int insert_server(THD *thd, FOREIGN_SERVER *server)
{ {
byte server_key[MAX_KEY_LENGTH]; byte server_key[MAX_KEY_LENGTH];
int error; int error= 0;
TABLE_LIST tables; TABLE_LIST tables;
TABLE *table; TABLE *table;
...@@ -451,12 +451,12 @@ int insert_server_record_into_cache(FOREIGN_SERVER *server) ...@@ -451,12 +451,12 @@ int insert_server_record_into_cache(FOREIGN_SERVER *server)
the server to the cache the server to the cache
*/ */
DBUG_PRINT("info", ("inserting server %s at %lx, length %d", DBUG_PRINT("info", ("inserting server %s at %lx, length %d",
server->server_name, server, server->server_name, (long unsigned int) server,
server->server_name_length)); server->server_name_length));
if (my_hash_insert(&servers_cache, (byte*) server)) if (my_hash_insert(&servers_cache, (byte*) server))
{ {
DBUG_PRINT("info", ("had a problem inserting server %s at %lx", DBUG_PRINT("info", ("had a problem inserting server %s at %lx",
server->server_name, server)); server->server_name, (long unsigned int) server));
// error handling needed here // error handling needed here
error= 1; error= 1;
} }
...@@ -607,7 +607,7 @@ int insert_server_record(TABLE *table, FOREIGN_SERVER *server) ...@@ -607,7 +607,7 @@ int insert_server_record(TABLE *table, FOREIGN_SERVER *server)
int drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options) int drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options)
{ {
byte server_key[MAX_KEY_LENGTH]; byte server_key[MAX_KEY_LENGTH];
int error; int error= 0;
TABLE_LIST tables; TABLE_LIST tables;
TABLE *table; TABLE *table;
...@@ -791,7 +791,7 @@ int update_server_record_in_cache(FOREIGN_SERVER *existing, ...@@ -791,7 +791,7 @@ int update_server_record_in_cache(FOREIGN_SERVER *existing,
if (my_hash_insert(&servers_cache, (byte*)altered)) if (my_hash_insert(&servers_cache, (byte*)altered))
{ {
DBUG_PRINT("info", ("had a problem inserting server %s at %lx", DBUG_PRINT("info", ("had a problem inserting server %s at %lx",
altered->server_name, altered)); altered->server_name, (long unsigned int) altered));
error= 1; error= 1;
} }
...@@ -947,7 +947,6 @@ int delete_server_record(TABLE *table, ...@@ -947,7 +947,6 @@ int delete_server_record(TABLE *table,
table->file->print_error(error, MYF(0)); table->file->print_error(error, MYF(0));
} }
end:
DBUG_RETURN(error); DBUG_RETURN(error);
} }
...@@ -1208,7 +1207,7 @@ FOREIGN_SERVER *get_server_by_name(const char *server_name) ...@@ -1208,7 +1207,7 @@ FOREIGN_SERVER *get_server_by_name(const char *server_name)
{ {
ulong error_num=0; ulong error_num=0;
uint i, server_name_length; uint i, server_name_length;
FOREIGN_SERVER *server; FOREIGN_SERVER *server= 0;
DBUG_ENTER("get_server_by_name"); DBUG_ENTER("get_server_by_name");
DBUG_PRINT("info", ("server_name %s", server_name)); DBUG_PRINT("info", ("server_name %s", server_name));
......
...@@ -574,9 +574,9 @@ int get_connection(FEDERATED_SHARE *share) ...@@ -574,9 +574,9 @@ int get_connection(FEDERATED_SHARE *share)
int error_num= ER_FOREIGN_SERVER_DOESNT_EXIST; int error_num= ER_FOREIGN_SERVER_DOESNT_EXIST;
char error_buffer[FEDERATED_QUERY_BUFFER_SIZE]; char error_buffer[FEDERATED_QUERY_BUFFER_SIZE];
FOREIGN_SERVER *server; FOREIGN_SERVER *server;
MYSQL *mysql_conn; MYSQL *mysql_conn= 0;
MYSQL_RES *result= 0; MYSQL_RES *result= 0;
MYSQL_ROW row; MYSQL_ROW row= 0;
DBUG_ENTER("ha_federated::get_connection"); DBUG_ENTER("ha_federated::get_connection");
if (!(server= if (!(server=
...@@ -607,7 +607,7 @@ int get_connection(FEDERATED_SHARE *share) ...@@ -607,7 +607,7 @@ int get_connection(FEDERATED_SHARE *share)
if (server->db) if (server->db)
share->database= server->db; share->database= server->db;
share->port= server->port ? server->port : MYSQL_PORT; share->port= server->port ? (ushort) server->port : MYSQL_PORT;
if (server->host) if (server->host)
share->hostname= server->host; share->hostname= server->host;
...@@ -704,8 +704,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -704,8 +704,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
DBUG_PRINT("info", ("Length: %d", table->s->connect_string.length)); DBUG_PRINT("info", ("Length: %d", table->s->connect_string.length));
DBUG_PRINT("info", ("String: '%.*s'", table->s->connect_string.length, DBUG_PRINT("info", ("String: '%.*s'", table->s->connect_string.length,
table->s->connect_string.str)); table->s->connect_string.str));
share->connection_string= my_strndup((const byte*)table->s-> share->connection_string= my_strndup(table->s->connect_string.str,
connect_string.str,
table->s->connect_string.length, table->s->connect_string.length,
MYF(0)); MYF(0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment