diff options
Diffstat (limited to 'server-tools')
-rw-r--r-- | server-tools/instance-manager/IMService.cpp | 2 | ||||
-rw-r--r-- | server-tools/instance-manager/guardian.cc | 4 | ||||
-rw-r--r-- | server-tools/instance-manager/instance.cc | 2 | ||||
-rw-r--r-- | server-tools/instance-manager/mysql_connection.cc | 2 | ||||
-rw-r--r-- | server-tools/instance-manager/user_map.cc | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/server-tools/instance-manager/IMService.cpp b/server-tools/instance-manager/IMService.cpp index 892c4747c0d..feccaadbecc 100644 --- a/server-tools/instance-manager/IMService.cpp +++ b/server-tools/instance-manager/IMService.cpp @@ -13,7 +13,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <windows.h> +#include <winsock2.h> #include <signal.h> #include "IMService.h" diff --git a/server-tools/instance-manager/guardian.cc b/server-tools/instance-manager/guardian.cc index 9a5ae090300..e114496248e 100644 --- a/server-tools/instance-manager/guardian.cc +++ b/server-tools/instance-manager/guardian.cc @@ -212,8 +212,8 @@ void Guardian::process_instance(Instance *instance) return; case Instance::CRASHED: /* just regular restarts */ - if (current_time - instance->last_checked <= - Options::Main::monitoring_interval) + if ((ulong) (current_time - instance->last_checked) <= + (ulong) Options::Main::monitoring_interval) return; if (instance->restart_counter < restart_retry) diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc index 31e060e27fe..edc9c88fe9f 100644 --- a/server-tools/instance-manager/instance.cc +++ b/server-tools/instance-manager/instance.cc @@ -923,7 +923,7 @@ void Instance::remove_pid() bool Instance::wait_for_stop() { - int start_time= time(NULL); + int start_time= (int) time(NULL); int finish_time= start_time + options.get_shutdown_delay(); log_info("Instance '%s': waiting for mysqld to stop " diff --git a/server-tools/instance-manager/mysql_connection.cc b/server-tools/instance-manager/mysql_connection.cc index 8afa7fdc744..293d90420b1 100644 --- a/server-tools/instance-manager/mysql_connection.cc +++ b/server-tools/instance-manager/mysql_connection.cc @@ -87,7 +87,7 @@ bool Mysql_connection::init() /* Initialize random number generator */ { ulong seed1= (ulong) &rand_st + rand(); - ulong seed2= (ulong) rand() + time(0); + ulong seed2= (ulong) rand() + (ulong) time(0); randominit(&rand_st, seed1, seed2); } diff --git a/server-tools/instance-manager/user_map.cc b/server-tools/instance-manager/user_map.cc index 48cce142db6..832a8cee6b9 100644 --- a/server-tools/instance-manager/user_map.cc +++ b/server-tools/instance-manager/user_map.cc @@ -24,8 +24,8 @@ User::User(const LEX_STRING *user_name_arg, const char *password) { - user_length= strmake(user, user_name_arg->str, USERNAME_LENGTH + 1) - user; - + user_length= (uint8) (strmake(user, user_name_arg->str, + USERNAME_LENGTH + 1) - user); set_password(password); } @@ -59,7 +59,7 @@ int User::init(const char *line) password= name_end + 1; } - user_length= name_end - name_begin; + user_length= (uint8) (name_end - name_begin); if (user_length > USERNAME_LENGTH) { log_error("User name is too long (%d). Max length: %d. " @@ -70,7 +70,7 @@ int User::init(const char *line) return 1; } - password_length= strlen(password); + password_length= (int) strlen(password); if (password_length > SCRAMBLED_PASSWORD_CHAR_LENGTH) { log_error("Password is too long (%d). Max length: %d." |