summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy20
1 files changed, 18 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 90c16daf407..850a8ad7ee8 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -123,6 +123,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
%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 @@ opt_to:
| 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
{