@@ -4482,7 +4482,8 @@ Stopping slave I/O thread due to out-of-memory error from master");
4482
4482
/* Control the binlog read speed of master when read_binlog_speed_limit is non-zero
4483
4483
*/
4484
4484
ulonglong read_binlog_speed_limit_in_bytes = opt_read_binlog_speed_limit * 1024 ;
4485
- if (read_binlog_speed_limit_in_bytes) {
4485
+ if (read_binlog_speed_limit_in_bytes)
4486
+ {
4486
4487
/* prevent the tokenamount become a large value,
4487
4488
for example, the IO thread doesn't work for a long time
4488
4489
*/
@@ -4492,21 +4493,22 @@ Stopping slave I/O thread due to out-of-memory error from master");
4492
4493
tokenamount = read_binlog_speed_limit_in_bytes * 2 ;
4493
4494
}
4494
4495
4495
- do {
4496
+ do
4497
+ {
4496
4498
ulonglong currenttime = my_hrtime ().val ;
4497
- tokenamount += (currenttime - lastchecktime)* read_binlog_speed_limit_in_bytes/ (1000 *1000 );
4499
+ tokenamount += (currenttime - lastchecktime) * read_binlog_speed_limit_in_bytes / (1000 *1000 );
4498
4500
lastchecktime = currenttime;
4499
4501
if (tokenamount < network_read_len)
4500
4502
{
4501
- ulonglong micro_sleeptime = 1000 *1000 * (network_read_len - tokenamount) / read_binlog_speed_limit_in_bytes ;
4503
+ ulonglong micro_sleeptime = 1000 *1000 * (network_read_len - tokenamount) / read_binlog_speed_limit_in_bytes ;
4502
4504
my_sleep (micro_sleeptime > 1000 ? micro_sleeptime : 1000 ); // at least sleep 1000 micro second
4503
4505
}
4504
4506
}while (tokenamount < network_read_len);
4505
4507
tokenamount -= network_read_len;
4506
4508
}
4507
4509
4508
4510
/* XXX: 'synced' should be updated by queue_event to indicate
4509
- whether event has been synced to disk */
4511
+ whether event has been synced to disk */
4510
4512
bool synced= 0 ;
4511
4513
if (queue_event (mi, event_buf, event_len))
4512
4514
{
0 commit comments