summaryrefslogtreecommitdiff
path: root/sql/rpl_rli.cc
diff options
context:
space:
mode:
authoraelkin/elkin@koti.dsl.inet.fi <>2007-12-12 12:14:59 +0200
committeraelkin/elkin@koti.dsl.inet.fi <>2007-12-12 12:14:59 +0200
commitd8d6db6f78f115900167b7ded5ed84fa6f1d806b (patch)
tree84a421ca8e0f200a6b9023670d25f4572cf6a40d /sql/rpl_rli.cc
parentcf56c586b7406ec0a9d26bc4c3b39585acc7b22e (diff)
downloadmariadb-git-d8d6db6f78f115900167b7ded5ed84fa6f1d806b.tar.gz
Bug#31552 Replication breaks when deleting rows from out-of-sync table
without PK Bug#31609 Not all RBR slave errors reported as errors bug#32468 delete rows event on a table with foreign key constraint fails The first two bugs comprise idempotency issues. First, there was no error code reported under conditions of the bug description although the slave sql thread halted. Second, executions were different with and without presence of prim key in the table. Third, there was no way to instruct the slave whether to ignore an error and skip to the following event or to halt. Fourth, there are handler errors which might happen due to idempotent applying of binlog but those were not listed among the "idempotent" error list. All the named issues are addressed. Wrt to the 3rd, there is the new global system variable, changeble at run time, which controls the slave sql thread behaviour. The new variable allows further extensions to mimic the sql_mode session/global variable. To address the 4th, the new bug#32468 had to be fixed as it was staying in the way.
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r--sql/rpl_rli.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index 15d7d97affd..c28d1ba97f7 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -1160,6 +1160,11 @@ void Relay_log_info::cleanup_context(THD *thd, bool error)
close_thread_tables(thd);
clear_tables_to_lock();
clear_flag(IN_STMT);
+ /*
+ Cleanup for the flags that have been set at do_apply_event.
+ */
+ thd->options&= ~OPTION_NO_FOREIGN_KEY_CHECKS;
+ thd->options&= ~OPTION_RELAXED_UNIQUE_CHECKS;
last_event_start_time= 0;
DBUG_VOID_RETURN;
}