Commit 643738ee authored by unknown's avatar unknown

MDEV-6180: Error 1590 is not autoskippable

The INCIDENT_EVENT always caused slave error and abort, without checking
--slave-skip-errors.

Now, if error 1590, ER_SLAVE_INCIDENT is included in the --slave-skip-errors
list, incident events will be ignored.

This is a merge of this MySQL 5.6 patch:

revision-id: frazer@mysql.com-20110314170916-ypgin17otj3ucx95
committer: Frazer Clement <frazer@mysql.com>
timestamp: Mon 2011-03-14 17:09:16 +0000
message:
  Bug#11799671 NOT POSSIBLE TO SKIP INCIDENT ERRORS
parent da808ae0
include/master-slave.inc
[connection master]
**** On Master ****
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM t1;
a
1
2
3
REPLACE INTO t1 VALUES (4);
SELECT * FROM t1;
a
1
2
3
4
include/check_slave_is_running.inc
Should have two binary logs here
show binary logs;
Log_name File_size
master-bin.000001 #
master-bin.000002 #
DROP TABLE t1;
include/rpl_end.inc
--loose-debug=+d,incident_database_resync_on_replace
--source include/master-slave.inc
--source include/have_debug.inc
--echo **** On Master ****
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM t1;
# This will generate an incident log event and store it in the binary
# log before the replace statement.
REPLACE INTO t1 VALUES (4);
--sync_slave_with_master
# Now, we should have inserted the row into the table and the slave
# should be running. We should also have rotated to a new binary log.
SELECT * FROM t1;
source include/check_slave_is_running.inc;
connection master;
--echo Should have two binary logs here
--source include/show_binary_logs.inc
DROP TABLE t1;
--sync_slave_with_master
--source include/rpl_end.inc
...@@ -12529,6 +12529,13 @@ Incident_log_event::do_apply_event(rpl_group_info *rgi) ...@@ -12529,6 +12529,13 @@ Incident_log_event::do_apply_event(rpl_group_info *rgi)
{ {
Relay_log_info const *rli= rgi->rli; Relay_log_info const *rli= rgi->rli;
DBUG_ENTER("Incident_log_event::do_apply_event"); DBUG_ENTER("Incident_log_event::do_apply_event");
if (ignored_error_code(ER_SLAVE_INCIDENT))
{
DBUG_PRINT("info", ("Ignoring Incident"));
DBUG_RETURN(0);
}
rli->report(ERROR_LEVEL, ER_SLAVE_INCIDENT, rli->report(ERROR_LEVEL, ER_SLAVE_INCIDENT,
ER(ER_SLAVE_INCIDENT), ER(ER_SLAVE_INCIDENT),
description(), description(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment