Skip to content

Commit 0fa39ff

Browse files
vinchenknielsen
authored andcommitted
fix code style..
1 parent c334f4f commit 0fa39ff

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

sql/net_serv.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ my_net_read_packet(NET *net, my_bool read_from_server)
11651165
}
11661166
net->read_pos = net->buff + net->where_b;
11671167
if (len != packet_error)
1168-
{
1168+
{
11691169
net->read_pos[len]=0; /* Safeguard for mysql_use_result */
11701170
net->real_network_read_len = len;
11711171
}

sql/slave.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4482,7 +4482,8 @@ Stopping slave I/O thread due to out-of-memory error from master");
44824482
/* Control the binlog read speed of master when read_binlog_speed_limit is non-zero
44834483
*/
44844484
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+
{
44864487
/* prevent the tokenamount become a large value,
44874488
for example, the IO thread doesn't work for a long time
44884489
*/
@@ -4492,21 +4493,22 @@ Stopping slave I/O thread due to out-of-memory error from master");
44924493
tokenamount = read_binlog_speed_limit_in_bytes * 2;
44934494
}
44944495

4495-
do{
4496+
do
4497+
{
44964498
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);
44984500
lastchecktime = currenttime;
44994501
if(tokenamount < network_read_len)
45004502
{
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 ;
45024504
my_sleep(micro_sleeptime > 1000 ? micro_sleeptime : 1000); // at least sleep 1000 micro second
45034505
}
45044506
}while(tokenamount < network_read_len);
45054507
tokenamount -= network_read_len;
45064508
}
45074509

45084510
/* 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 */
45104512
bool synced= 0;
45114513
if (queue_event(mi, event_buf, event_len))
45124514
{

0 commit comments

Comments
 (0)