From 262a9e41e164b1ddbb1763622bf5617d3685f74a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 24 Jan 2001 09:15:34 -0700 Subject: Added last_errno and last_error to show slave status slave will skip the first SQL_SLAVE_SKIP_COUNTER events on start - this is needed to recover from broken replication when the next log event(s) should just be skipped. Rotate binlogs when max_binlog_size is reached include/my_sys.h: added my_snprintf() include/mysqld_error.h: more error messages mysql-test/r/rpl000014.result: updated results for new SHOW SLAVE STATUS format mysql-test/r/rpl000015.result: update for SHOW SLAVE STATUS mysql-test/r/rpl000016.result: update for additions to the test mysql-test/t/rpl000016.test: test max_binlog_size and slave_skip_counter mysys/my_vsnprintf.c: added my_snprintf() sql/gen_lex_hash.cc: old values could not do it sql/lex.h: updates for SQL_SLAVE_SKIP_COUNTER sql/log.cc: rotate binlogs when max_binlog_size is reached sql/mysqld.cc: added max_binlog_size sql/share/czech/errmsg.txt: new errors sql/share/danish/errmsg.txt: new errors sql/share/dutch/errmsg.txt: new errors sql/share/english/errmsg.txt: new errors sql/share/estonian/errmsg.txt: new errors sql/share/french/errmsg.txt: new errors sql/share/german/errmsg.txt: new errors sql/share/greek/errmsg.txt: new errors sql/share/hungarian/errmsg.txt: new errors sql/share/italian/errmsg.txt: new errors sql/share/japanese/errmsg.txt: new errors sql/share/korean/errmsg.txt: new errors sql/share/norwegian-ny/errmsg.txt: new errors sql/share/norwegian/errmsg.txt: new errors sql/share/polish/errmsg.txt: new errors sql/share/portuguese/errmsg.txt: new errors sql/share/romanian/errmsg.txt: new errors sql/share/russian/errmsg.txt: new errors, translated untranslated messages sql/share/slovak/errmsg.txt: new errors sql/share/spanish/errmsg.txt: new errors sql/share/swedish/errmsg.txt: new errors sql/slave.cc: updates for slave_skip_counter and extension to show slave status sql/slave.h: slave_skip_counter sql/sql_repl.cc: use error messages from errmsg.txt sql/sql_yacc.yy: skip_slave_counter --- sql/sql_yacc.yy | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sql/sql_yacc.yy') diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index dd1fb916bad..fa4edf23a5f 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -22,6 +22,7 @@ #define YYMAXDEPTH 3200 /* Because of 64K stack */ #define Lex current_lex #include "mysql_priv.h" +#include "slave.h" #include "sql_acl.h" #include "lex_symbol.h" #include @@ -408,6 +409,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize); %token SQL_AUTO_IS_NULL %token SQL_SAFE_UPDATES %token SQL_QUOTE_SHOW_CREATE +%token SQL_SLAVE_SKIP_COUNTER %left SET_VAR %left OR_OR_CONCAT OR @@ -2662,6 +2664,15 @@ option_value: if (item->fix_fields(current_thd,0) || item->update()) YYABORT; } + | SQL_SLAVE_SKIP_COUNTER equal ULONG_NUM + { + pthread_mutex_lock(&LOCK_slave); + if(slave_running) + send_error(¤t_thd->net, ER_SLAVE_MUST_STOP); + else + slave_skip_counter = $3; + pthread_mutex_unlock(&LOCK_slave); + } text_or_password: TEXT_STRING { $$=$1.str;} -- cgit v1.2.1