Accept SLAVE START and STOP, even if deprecated.

sql/log_event.cc:
  undoing a wrong change (the case is handled in Rotate_log_event::exec_event)
This commit is contained in:
unknown 2003-09-15 12:43:31 +02:00
parent 7385c4984e
commit cc17035d57
2 changed files with 16 additions and 8 deletions

View file

@ -1084,12 +1084,6 @@ int Start_log_event::exec_event(struct st_relay_log_info* rli)
This is 4.x, so a Start_log_event is only at master startup,
so we are sure the master has restarted and cleared his temp tables.
*/
/*
If the master died before writing the COMMIT to the binlog, rollback;
otherwise it does not hurt to rollback.
*/
ha_rollback(thd);
close_temporary_tables(thd);
cleanup_load_tmpdir();
break;

View file

@ -1751,7 +1751,8 @@ opt_to:
| AS {};
/*
The first two deprecate the last two--delete the last two for 4.1 release
SLAVE START and SLAVE STOP are deprecated. We keep them for compatibility.
To use UNTIL, one must use START SLAVE, not SLAVE START.
*/
slave:
@ -1771,7 +1772,20 @@ slave:
lex->sql_command = SQLCOM_SLAVE_STOP;
lex->type = 0;
}
;
| SLAVE START_SYM slave_thread_opts
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_START;
lex->type = 0;
}
| SLAVE STOP_SYM slave_thread_opts
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_STOP;
lex->type = 0;
}
;
start:
START_SYM TRANSACTION_SYM { Lex->sql_command = SQLCOM_BEGIN;}