diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-28 10:38:02 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-09-28 17:20:46 +0000 |
commit | 7354dc67737fdeb105656f5cec055da627bb9c29 (patch) | |
tree | 7cc2b5f975d5e32eb94cd1344b259ea1b24018d6 /sql/slave.cc | |
parent | 509928718d52a14739fcfb2ebf0e68b4c8e01be5 (diff) | |
download | mariadb-git-7354dc67737fdeb105656f5cec055da627bb9c29.tar.gz |
MDEV-13384 - misc Windows warnings fixed
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 3fb28b587a6..1b1a597fa2a 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -4526,12 +4526,12 @@ Stopping slave I/O thread due to out-of-memory error from master"); lastchecktime = currenttime; if(tokenamount < network_read_len) { - ulonglong micro_time = 1000*1000 * (network_read_len - tokenamount) / speed_limit_in_bytes ; - ulonglong second_time = micro_time / (1000 * 1000); - micro_time = micro_time % (1000 * 1000); + ulonglong duration =1000ULL*1000 * (network_read_len - tokenamount) / speed_limit_in_bytes; + time_t second_time = (time_t)(duration / (1000 * 1000)); + uint micro_time = duration % (1000 * 1000); // at least sleep 1000 micro second - my_sleep(micro_time > 1000 ? micro_time : 1000); + my_sleep(MY_MAX(micro_time,1000)); /* If it sleep more than one second, |