Below is the list of changes that have just been committed into a
4.0 repository of sasha. When sasha does a push, they will be propogated to
the main repository and within 24 hours after the push to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet@stripped, 2002-03-09 21:48:06-07:00, sasha@stripped
slave start <options> to be able to do
slave start io_thread
slave start sql_thread
same for stop
sql/lex.h
1.67 02/03/09 21:48:05 sasha@stripped +2 -0
slave start <options>
sql/sql_lex.cc
1.31 02/03/09 21:48:05 sasha@stripped +1 -0
slave start <options>
sql/sql_lex.h
1.65 02/03/09 21:48:05 sasha@stripped +1 -1
slave start <options>
sql/sql_repl.cc
1.72 02/03/09 21:48:05 sasha@stripped +4 -0
slave start <options>
sql/sql_yacc.yy
1.149 02/03/09 21:48:05 sasha@stripped +18 -2
slave start <options>
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: sasha
# Host: mysql.sashanet.com
# Root: /reiser-data/mysql-4.0
--- 1.66/sql/lex.h Sat Jan 19 19:22:43 2002
+++ 1.67/sql/lex.h Sat Mar 9 21:48:05 2002
@@ -191,6 +191,7 @@
{ "INT4", SYM(INT_SYM),0,0},
{ "INT8", SYM(BIGINT),0,0},
{ "INTO", SYM(INTO),0,0},
+ { "IO_THREAD", SYM(IO_THREAD),0,0},
{ "IF", SYM(IF),0,0},
{ "IS", SYM(IS),0,0},
{ "ISOLATION", SYM(ISOLATION),0,0},
@@ -327,6 +328,7 @@
{ "SQL_SELECT_LIMIT", SYM(SQL_SELECT_LIMIT),0,0},
{ "SQL_SLAVE_SKIP_COUNTER", SYM(SQL_SLAVE_SKIP_COUNTER),0,0},
{ "SQL_SMALL_RESULT", SYM(SQL_SMALL_RESULT),0,0},
+ { "SQL_THREAD", SYM(SQL_THREAD),0,0},
{ "SQL_WARNINGS", SYM(SQL_WARNINGS),0,0},
{ "SSL", SYM(SSL_SYM),0,0},
{ "STRAIGHT_JOIN", SYM(STRAIGHT_JOIN),0,0},
--- 1.30/sql/sql_lex.cc Thu Feb 14 17:49:02 2002
+++ 1.31/sql/sql_lex.cc Sat Mar 9 21:48:05 2002
@@ -150,6 +150,7 @@
lex->convert_set=(lex->thd=thd)->convert_set;
lex->yacc_yyss=lex->yacc_yyvs=0;
lex->ignore_space=test(thd->sql_mode & MODE_IGNORE_SPACE);
+ lex->slave_thd_opt=0;
return lex;
}
--- 1.64/sql/sql_lex.h Thu Feb 14 09:58:23 2002
+++ 1.65/sql/sql_lex.h Sat Mar 9 21:48:05 2002
@@ -186,7 +186,7 @@
thr_lock_type lock_option;
bool drop_primary,drop_if_exists,local_file;
bool in_comment,ignore_space,verbose,simple_alter, option_type;
-
+ uint slave_thd_opt;
} LEX;
--- 1.148/sql/sql_yacc.yy Thu Mar 7 05:01:18 2002
+++ 1.149/sql/sql_yacc.yy Sat Mar 9 21:48:05 2002
@@ -123,6 +123,8 @@
%token RESET_SYM
%token PURGE
%token SLAVE
+%token IO_THREAD
+%token SQL_THREAD
%token START_SYM
%token STOP_SYM
%token TRUNCATE_SYM
@@ -1256,20 +1258,34 @@
| AS {}
slave:
- SLAVE START_SYM
+ SLAVE START_SYM slave_thread_opts
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_START;
lex->type = 0;
}
|
- SLAVE STOP_SYM
+ SLAVE STOP_SYM slave_thread_opts
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_STOP;
lex->type = 0;
};
+slave_thread_opts: slave_thread_opt
+ | slave_thread_opts ',' slave_thread_opt
+
+slave_thread_opt:
+ /*empty*/ {}
+ | SQL_THREAD
+ {
+ Lex->slave_thd_opt|=SLAVE_SQL;
+ }
+ | IO_THREAD
+ {
+ Lex->slave_thd_opt|=SLAVE_IO;
+ }
+
restore:
RESTORE_SYM table_or_tables
{
--- 1.71/sql/sql_repl.cc Tue Jan 29 09:32:15 2002
+++ 1.72/sql/sql_repl.cc Sat Mar 9 21:48:05 2002
@@ -562,6 +562,8 @@
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 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;
| Thread |
|---|
| • bk commit into 4.0 tree | sasha | 10 Mar |