Commit 4a08f392 authored by unknown's avatar unknown

BUG#31702 (Missing row on slave causes assertion failure under row-based

replication):

Incremental patch to enable idempotency support for update events again.
The final handling of errors will be done in BUG#31609, and until then
the handling of errors should be consistent between the different types
of changes.


mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
  Result change.
mysql-test/suite/rpl/r/rpl_temporary_errors.result:
  Result change.
mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test:
  Changing test to assume idempotency handling of update event.
mysql-test/suite/rpl/t/rpl_temporary_errors.test:
  Changing test to assume idempotency handling of update event.
sql/log_event.cc:
  Incremental patch to enable idempotency support for the update events again.
  The real error handling will be implemented in BUG#31609.
parent 219e6a64
......@@ -265,7 +265,7 @@ a b
5 master
**** On Slave ****
Last_SQL_Error
Error in Update_rows event: error during transaction execution on table test.t1. Can't find record in 't1'
SELECT * FROM t1 ORDER BY a;
a b
2 master,slave
......
......@@ -30,7 +30,7 @@ a b
**** On Slave ****
SHOW STATUS LIKE 'Slave_retried_transactions';
Variable_name Value
Slave_retried_transactions 2
Slave_retried_transactions 0
SELECT * FROM t1;
a b
5 47
......@@ -49,17 +49,17 @@ Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running No
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1032
Last_Error Error in Update_rows event: error during transaction execution on table test.t1. Can't find record in 't1'
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 318
Exec_Master_Log_Pos 408
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -74,8 +74,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1032
Last_SQL_Error Error in Update_rows event: error during transaction execution on table test.t1. Can't find record in 't1'
Last_SQL_Errno 0
Last_SQL_Error
DROP TABLE t1;
**** On Master ****
DROP TABLE t1;
......@@ -245,11 +245,9 @@ SELECT * FROM t1 ORDER BY a;
--echo **** On Master ****
connection master;
UPDATE t1 SET a = 5, b = 'master' WHERE a = 1;
save_master_pos;
SELECT * FROM t1 ORDER BY a;
--echo **** On Slave ****
connection slave;
source include/wait_for_slave_sql_error.inc;
sync_slave_with_master;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
disable_query_log;
eval SELECT "$last_error" AS Last_SQL_Error;
......
......@@ -13,12 +13,10 @@ SELECT * FROM t1;
--echo **** On Master ****
connection master;
UPDATE t1 SET a = 5, b = 5 WHERE a = 1;
save_master_pos;
SELECT * FROM t1;
#SHOW BINLOG EVENTS;
--echo **** On Slave ****
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
sync_slave_with_master;
SHOW STATUS LIKE 'Slave_retried_transactions';
SELECT * FROM t1;
source include/show_slave_status.inc;
......
......@@ -6180,12 +6180,9 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
case HA_ERR_RECORD_CHANGED:
case HA_ERR_KEY_NOT_FOUND: /* Idempotency support: OK if
tuple does not exist */
if (get_type_code() != UPDATE_ROWS_EVENT)
{
error= 0;
break;
}
/* Fall through in the event that we have an update event */
error= 0;
break;
default:
rli->report(ERROR_LEVEL, thd->net.last_errno,
"Error in %s event: row application failed. %s",
......
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