diff options
Diffstat (limited to 'sql/sql_binlog.cc')
-rw-r--r-- | sql/sql_binlog.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index 76c6e0e058a..f08125ca22f 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2006 MySQL AB +/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -61,6 +61,13 @@ void mysql_client_binlog_statement(THD* thd) size_t decoded_len= base64_needed_decoded_length(coded_len); /* + option_bits will be changed when applying the event. But we don't expect + it be changed permanently after BINLOG statement, so backup it first. + It will be restored at the end of this function. + */ + ulonglong thd_options= thd->variables.option_bits; + + /* Allocation */ @@ -235,7 +242,7 @@ void mysql_client_binlog_statement(THD* thd) TODO: Maybe a better error message since the BINLOG statement now contains several events. */ - my_error(ER_UNKNOWN_ERROR, MYF(0), "Error executing BINLOG statement"); + my_error(ER_UNKNOWN_ERROR, MYF(0)); goto end; } } @@ -246,6 +253,7 @@ void mysql_client_binlog_statement(THD* thd) my_ok(thd); end: + thd->variables.option_bits= thd_options; rli->slave_close_thread_tables(thd); my_free(buf); DBUG_VOID_RETURN; |