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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
516d26ae
Commit
516d26ae
authored
Nov 23, 2007
by
kaa@polly.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge polly.(none):/home/kaa/src/opt/bug29976/my51-bug28550
into polly.(none):/home/kaa/src/opt/mysql-5.1-opt
parents
b2e23abc
218a2196
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
sql/slave.cc
sql/slave.cc
+13
-8
No files found.
sql/slave.cc
View file @
516d26ae
...
...
@@ -137,6 +137,7 @@ static int terminate_slave_thread(THD *thd,
pthread_cond_t
*
term_cond
,
volatile
uint
*
slave_running
,
bool
skip_lock
);
static
bool
check_io_slave_killed
(
THD
*
thd
,
Master_info
*
mi
,
const
char
*
info
);
/*
Find out which replications threads are running
...
...
@@ -821,7 +822,7 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
mi
->
clock_diff_with_master
=
(
long
)
(
time
((
time_t
*
)
0
)
-
strtoul
(
master_row
[
0
],
0
,
10
));
}
else
else
if
(
!
check_io_slave_killed
(
mi
->
io_thd
,
mi
,
NULL
))
{
mi
->
clock_diff_with_master
=
0
;
/* The "most sensible" value */
sql_print_warning
(
"
\"
SELECT UNIX_TIMESTAMP()
\"
failed on master, "
...
...
@@ -1223,7 +1224,7 @@ int register_slave_on_master(MYSQL* mysql, Master_info *mi,
{
*
suppress_warnings
=
TRUE
;
// Suppress reconnect warning
}
else
else
if
(
!
check_io_slave_killed
(
mi
->
io_thd
,
mi
,
NULL
))
{
char
buf
[
256
];
my_snprintf
(
buf
,
sizeof
(
buf
),
"%s (Errno: %d)"
,
mysql_error
(
mysql
),
...
...
@@ -1986,7 +1987,7 @@ static bool check_io_slave_killed(THD *thd, Master_info *mi, const char *info)
{
if
(
io_slave_killed
(
thd
,
mi
))
{
if
(
global_system_variables
.
log_warnings
)
if
(
info
&&
global_system_variables
.
log_warnings
)
sql_print_information
(
info
);
return
TRUE
;
}
...
...
@@ -2171,11 +2172,15 @@ connected:
thd
->
proc_info
=
"Registering slave on master"
;
if
(
register_slave_on_master
(
mysql
,
mi
,
&
suppress_warnings
))
{
sql_print_error
(
"Slave I/O thread couldn't register on master"
);
if
(
check_io_slave_killed
(
thd
,
mi
,
"Slave I/O thread killed while \
registering slave on master"
)
||
try_to_reconnect
(
thd
,
mysql
,
mi
,
&
retry_count
,
suppress_warnings
,
reconnect_messages
[
SLAVE_RECON_ACT_REG
]))
if
(
!
check_io_slave_killed
(
thd
,
mi
,
"Slave I/O thread killed "
"while registering slave on master"
))
{
sql_print_error
(
"Slave I/O thread couldn't register on master"
);
if
(
try_to_reconnect
(
thd
,
mysql
,
mi
,
&
retry_count
,
suppress_warnings
,
reconnect_messages
[
SLAVE_RECON_ACT_REG
]))
goto
err
;
}
else
goto
err
;
goto
connected
;
}
...
...
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