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
99c7cbe9
Commit
99c7cbe9
authored
Sep 09, 2000
by
sasha@mysql.sashanet.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql
parents
3acf37e6
8c1fa4e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
sql/slave.cc
sql/slave.cc
+2
-2
sql/sql_parse.cc
sql/sql_parse.cc
+6
-2
No files found.
sql/slave.cc
View file @
99c7cbe9
...
@@ -40,7 +40,7 @@ extern bool opt_log_slave_updates ;
...
@@ -40,7 +40,7 @@ extern bool opt_log_slave_updates ;
static
inline
bool
slave_killed
(
THD
*
thd
);
static
inline
bool
slave_killed
(
THD
*
thd
);
static
int
init_slave_thread
(
THD
*
thd
);
static
int
init_slave_thread
(
THD
*
thd
);
static
int
init_master_info
(
MASTER_INFO
*
mi
);
int
init_master_info
(
MASTER_INFO
*
mi
);
static
void
safe_connect
(
THD
*
thd
,
MYSQL
*
mysql
,
MASTER_INFO
*
mi
);
static
void
safe_connect
(
THD
*
thd
,
MYSQL
*
mysql
,
MASTER_INFO
*
mi
);
static
void
safe_reconnect
(
THD
*
thd
,
MYSQL
*
mysql
,
MASTER_INFO
*
mi
);
static
void
safe_reconnect
(
THD
*
thd
,
MYSQL
*
mysql
,
MASTER_INFO
*
mi
);
static
int
safe_sleep
(
THD
*
thd
,
int
sec
);
static
int
safe_sleep
(
THD
*
thd
,
int
sec
);
...
@@ -249,7 +249,7 @@ int fetch_nx_table(THD* thd, MASTER_INFO* mi)
...
@@ -249,7 +249,7 @@ int fetch_nx_table(THD* thd, MASTER_INFO* mi)
return
error
;
return
error
;
}
}
static
int
init_master_info
(
MASTER_INFO
*
mi
)
int
init_master_info
(
MASTER_INFO
*
mi
)
{
{
FILE
*
file
;
FILE
*
file
;
MY_STAT
stat_area
;
MY_STAT
stat_area
;
...
...
sql/sql_parse.cc
View file @
99c7cbe9
...
@@ -52,6 +52,7 @@ static int change_master(THD* thd);
...
@@ -52,6 +52,7 @@ static int change_master(THD* thd);
static
void
reset_slave
();
static
void
reset_slave
();
static
void
reset_master
();
static
void
reset_master
();
extern
int
init_master_info
(
MASTER_INFO
*
mi
);
static
const
char
*
any_db
=
"*any*"
;
// Special symbol for check_access
static
const
char
*
any_db
=
"*any*"
;
// Special symbol for check_access
...
@@ -2462,7 +2463,7 @@ static int start_slave(THD* thd , bool net_report)
...
@@ -2462,7 +2463,7 @@ static int start_slave(THD* thd , bool net_report)
return
1
;
return
1
;
pthread_mutex_lock
(
&
LOCK_slave
);
pthread_mutex_lock
(
&
LOCK_slave
);
if
(
!
slave_running
)
if
(
!
slave_running
)
if
(
master_
host
)
if
(
glob_mi
.
inited
&&
glob_mi
.
host
)
{
{
pthread_t
hThread
;
pthread_t
hThread
;
if
(
pthread_create
(
&
hThread
,
&
connection_attrib
,
handle_slave
,
0
))
if
(
pthread_create
(
&
hThread
,
&
connection_attrib
,
handle_slave
,
0
))
...
@@ -2471,7 +2472,7 @@ static int start_slave(THD* thd , bool net_report)
...
@@ -2471,7 +2472,7 @@ static int start_slave(THD* thd , bool net_report)
}
}
}
}
else
else
err
=
"Master host not set"
;
err
=
"Master host not set
or master info not initialized
"
;
else
else
err
=
"Slave already running"
;
err
=
"Slave already running"
;
...
@@ -2557,6 +2558,9 @@ static int change_master(THD* thd)
...
@@ -2557,6 +2558,9 @@ static int change_master(THD* thd)
thd
->
proc_info
=
"changing master"
;
thd
->
proc_info
=
"changing master"
;
LEX_MASTER_INFO
*
lex_mi
=
&
thd
->
lex
.
mi
;
LEX_MASTER_INFO
*
lex_mi
=
&
thd
->
lex
.
mi
;
if
(
!
glob_mi
.
inited
)
init_master_info
(
&
glob_mi
);
pthread_mutex_lock
(
&
glob_mi
.
lock
);
pthread_mutex_lock
(
&
glob_mi
.
lock
);
if
((
lex_mi
->
host
||
lex_mi
->
port
)
&&
!
lex_mi
->
log_file_name
&&
!
lex_mi
->
pos
)
if
((
lex_mi
->
host
||
lex_mi
->
port
)
&&
!
lex_mi
->
log_file_name
&&
!
lex_mi
->
pos
)
{
{
...
...
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