mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03: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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user