summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <patg@radha.patg.net>2006-12-20 13:40:58 -0500
committerunknown <patg@radha.patg.net>2006-12-20 13:40:58 -0500
commit4a08b64f56c55a6a2f371f20011b2297bf2f0b25 (patch)
treef826b17526b0b683fba4b8c3a85b0ba1feb6f667
parentb74c46110161a2599ea517954daff2cd53504697 (diff)
downloadmariadb-git-4a08b64f56c55a6a2f371f20011b2297bf2f0b25.tar.gz
WL #3031
fixing pushbuild warnings and errors sql/sql_servers.cc: WL# 3031 Cleaning up compile warnings on various platforms that I found with pushbuild storage/federated/ha_federated.cc: WL# 3031 Cleaning up compile warnings on various platforms that I found with pushbuild, error on windows
-rw-r--r--sql/sql_servers.cc17
-rw-r--r--storage/federated/ha_federated.cc9
2 files changed, 12 insertions, 14 deletions
diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc
index beffdc3f945..397ea88b033 100644
--- a/sql/sql_servers.cc
+++ b/sql/sql_servers.cc
@@ -300,7 +300,7 @@ my_bool get_server_from_table_to_cache(TABLE *table)
if (my_hash_insert(&servers_cache, (byte*) server))
{
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
DBUG_RETURN(TRUE);
}
@@ -329,7 +329,7 @@ my_bool server_exists_in_table(THD *thd, LEX_SERVER_OPTIONS *server_options)
{
byte server_key[MAX_KEY_LENGTH];
int result= 1;
- int error;
+ int error= 0;
TABLE_LIST tables;
TABLE *table;
@@ -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)
{
byte server_key[MAX_KEY_LENGTH];
- int error;
+ int error= 0;
TABLE_LIST tables;
TABLE *table;
@@ -451,12 +451,12 @@ int insert_server_record_into_cache(FOREIGN_SERVER *server)
the server to the cache
*/
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));
if (my_hash_insert(&servers_cache, (byte*) server))
{
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= 1;
}
@@ -607,7 +607,7 @@ int insert_server_record(TABLE *table, FOREIGN_SERVER *server)
int drop_server(THD *thd, LEX_SERVER_OPTIONS *server_options)
{
byte server_key[MAX_KEY_LENGTH];
- int error;
+ int error= 0;
TABLE_LIST tables;
TABLE *table;
@@ -791,7 +791,7 @@ int update_server_record_in_cache(FOREIGN_SERVER *existing,
if (my_hash_insert(&servers_cache, (byte*)altered))
{
DBUG_PRINT("info", ("had a problem inserting server %s at %lx",
- altered->server_name, altered));
+ altered->server_name, (long unsigned int) altered));
error= 1;
}
@@ -947,7 +947,6 @@ int delete_server_record(TABLE *table,
table->file->print_error(error, MYF(0));
}
-end:
DBUG_RETURN(error);
}
@@ -1208,7 +1207,7 @@ FOREIGN_SERVER *get_server_by_name(const char *server_name)
{
ulong error_num=0;
uint i, server_name_length;
- FOREIGN_SERVER *server;
+ FOREIGN_SERVER *server= 0;
DBUG_ENTER("get_server_by_name");
DBUG_PRINT("info", ("server_name %s", server_name));
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 397922e6e51..be8238f54b6 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -574,9 +574,9 @@ int get_connection(FEDERATED_SHARE *share)
int error_num= ER_FOREIGN_SERVER_DOESNT_EXIST;
char error_buffer[FEDERATED_QUERY_BUFFER_SIZE];
FOREIGN_SERVER *server;
- MYSQL *mysql_conn;
+ MYSQL *mysql_conn= 0;
MYSQL_RES *result= 0;
- MYSQL_ROW row;
+ MYSQL_ROW row= 0;
DBUG_ENTER("ha_federated::get_connection");
if (!(server=
@@ -607,7 +607,7 @@ int get_connection(FEDERATED_SHARE *share)
if (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)
share->hostname= server->host;
@@ -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", ("String: '%.*s'", table->s->connect_string.length,
table->s->connect_string.str));
- share->connection_string= my_strndup((const byte*)table->s->
- connect_string.str,
+ share->connection_string= my_strndup(table->s->connect_string.str,
table->s->connect_string.length,
MYF(0));