summaryrefslogtreecommitdiff
path: root/sql/sql_binlog.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2012-03-01 12:41:49 +0100
committerunknown <knielsen@knielsen-hq.org>2012-03-01 12:41:49 +0100
commit22a504f89794f6517bc091b8d1f945b9aece7c18 (patch)
tree6c2bb074e63c752293c83176d894bfc3d57fb3b9 /sql/sql_binlog.cc
parent4e8bb265fef04c0e331dc78bdfdda6b41e918dfd (diff)
parent9313032283f1650d11fb36066f31d966e8492bdc (diff)
downloadmariadb-git-22a504f89794f6517bc091b8d1f945b9aece7c18.tar.gz
Merge MWL#234: @@skip_replication feature to MariaDB 5.5.
Diffstat (limited to 'sql/sql_binlog.cc')
-rw-r--r--sql/sql_binlog.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc
index 664590c34ac..0ac92859365 100644
--- a/sql/sql_binlog.cc
+++ b/sql/sql_binlog.cc
@@ -44,6 +44,7 @@
void mysql_client_binlog_statement(THD* thd)
{
+ ulonglong save_skip_replication;
DBUG_ENTER("mysql_client_binlog_statement");
DBUG_PRINT("info",("binlog base64: '%*s'",
(int) (thd->lex->comment.length < 2048 ?
@@ -225,7 +226,17 @@ void mysql_client_binlog_statement(THD* thd)
reporting.
*/
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+ save_skip_replication= thd->variables.option_bits&OPTION_SKIP_REPLICATION;
+ thd->variables.option_bits=
+ (thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) |
+ (ev->flags & LOG_EVENT_SKIP_REPLICATION_F ?
+ OPTION_SKIP_REPLICATION : 0);
+
err= ev->apply_event(rli);
+
+ thd->variables.option_bits=
+ (thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) |
+ save_skip_replication;
#else
err= 0;
#endif