Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0fa39ffb
Commit
0fa39ffb
authored
Oct 17, 2016
by
vinchen
Committed by
Kristian Nielsen
Oct 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix code style..
parent
c334f4fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
sql/net_serv.cc
sql/net_serv.cc
+1
-1
sql/slave.cc
sql/slave.cc
+7
-5
No files found.
sql/net_serv.cc
View file @
0fa39ffb
...
...
@@ -1165,7 +1165,7 @@ my_net_read_packet(NET *net, my_bool read_from_server)
}
net
->
read_pos
=
net
->
buff
+
net
->
where_b
;
if
(
len
!=
packet_error
)
{
{
net
->
read_pos
[
len
]
=
0
;
/* Safeguard for mysql_use_result */
net
->
real_network_read_len
=
len
;
}
...
...
sql/slave.cc
View file @
0fa39ffb
...
...
@@ -4482,7 +4482,8 @@ Stopping slave I/O thread due to out-of-memory error from master");
/* Control the binlog read speed of master when read_binlog_speed_limit is non-zero
*/
ulonglong
read_binlog_speed_limit_in_bytes
=
opt_read_binlog_speed_limit
*
1024
;
if
(
read_binlog_speed_limit_in_bytes
)
{
if
(
read_binlog_speed_limit_in_bytes
)
{
/* prevent the tokenamount become a large value,
for example, the IO thread doesn't work for a long time
*/
...
...
@@ -4492,13 +4493,14 @@ Stopping slave I/O thread due to out-of-memory error from master");
tokenamount
=
read_binlog_speed_limit_in_bytes
*
2
;
}
do
{
do
{
ulonglong
currenttime
=
my_hrtime
().
val
;
tokenamount
+=
(
currenttime
-
lastchecktime
)
*
read_binlog_speed_limit_in_bytes
/
(
1000
*
1000
);
tokenamount
+=
(
currenttime
-
lastchecktime
)
*
read_binlog_speed_limit_in_bytes
/
(
1000
*
1000
);
lastchecktime
=
currenttime
;
if
(
tokenamount
<
network_read_len
)
{
ulonglong
micro_sleeptime
=
1000
*
1000
*
(
network_read_len
-
tokenamount
)
/
read_binlog_speed_limit_in_bytes
;
ulonglong
micro_sleeptime
=
1000
*
1000
*
(
network_read_len
-
tokenamount
)
/
read_binlog_speed_limit_in_bytes
;
my_sleep
(
micro_sleeptime
>
1000
?
micro_sleeptime
:
1000
);
// at least sleep 1000 micro second
}
}
while
(
tokenamount
<
network_read_len
);
...
...
@@ -4506,7 +4508,7 @@ Stopping slave I/O thread due to out-of-memory error from master");
}
/* XXX: 'synced' should be updated by queue_event to indicate
whether event has been synced to disk */
whether event has been synced to disk */
bool
synced
=
0
;
if
(
queue_event
(
mi
,
event_buf
,
event_len
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment