mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 10:15:29 +02:00
slave start <options> to be able to do
slave start io_thread slave start sql_thread same for stop sql/lex.h: slave start <options> sql/sql_lex.cc: slave start <options> sql/sql_lex.h: slave start <options> sql/sql_repl.cc: slave start <options> sql/sql_yacc.yy: slave start <options>
This commit is contained in:
parent
594ba4a270
commit
b8a9ea66ba
5 changed files with 26 additions and 3 deletions
|
|
@ -562,6 +562,8 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report)
|
|||
return 1;
|
||||
lock_slave_threads(mi); // this allows us to cleanly read slave_running
|
||||
init_thread_mask(&thread_mask,mi,1 /* inverse */);
|
||||
if (thd->lex.slave_thd_opt)
|
||||
thread_mask &= thd->lex.slave_thd_opt;
|
||||
if (thread_mask)
|
||||
{
|
||||
if (server_id_supplied && (!mi->inited || (mi->inited && *mi->host)))
|
||||
|
|
@ -602,6 +604,8 @@ int stop_slave(THD* thd, MASTER_INFO* mi, bool net_report )
|
|||
int thread_mask;
|
||||
lock_slave_threads(mi);
|
||||
init_thread_mask(&thread_mask,mi,0 /* not inverse*/);
|
||||
if (thd->lex.slave_thd_opt)
|
||||
thread_mask &= thd->lex.slave_thd_opt;
|
||||
slave_errno = (thread_mask) ?
|
||||
terminate_slave_threads(mi,thread_mask,
|
||||
1 /*skip lock */) : ER_SLAVE_NOT_RUNNING;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue