summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorSven Sandberg <sven.sandberg@oracle.com>2010-07-26 12:52:59 +0200
committerSven Sandberg <sven.sandberg@oracle.com>2010-07-26 12:52:59 +0200
commit4e7fa5c4d5eadfdb8ad8b69bb18a02bc897a7052 (patch)
tree7fa259332cc1f81dd33eafe3454136ac9fec7fb9 /sql/sql_repl.cc
parentfc74792a6bc85a41fe4bbe134b1f16ce66d2896f (diff)
parentd7c1b752cd14061b83a94adbc2dabbe21d22e1ad (diff)
downloadmariadb-git-4e7fa5c4d5eadfdb8ad8b69bb18a02bc897a7052.tar.gz
merged BUG#55322 from 5.1-bugteam to trunk-merge
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index d528dc64b5e..ab6c6e738b2 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -452,6 +452,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos,
#ifndef DBUG_OFF
int left_events = max_binlog_dump_events;
#endif
+ int old_max_allowed_packet= thd->variables.max_allowed_packet;
DBUG_ENTER("mysql_binlog_send");
DBUG_PRINT("enter",("log_ident: '%s' pos: %ld", log_ident, (long) pos));
@@ -975,6 +976,7 @@ end:
mysql_mutex_lock(&LOCK_thread_count);
thd->current_linfo = 0;
mysql_mutex_unlock(&LOCK_thread_count);
+ thd->variables.max_allowed_packet= old_max_allowed_packet;
DBUG_VOID_RETURN;
err:
@@ -993,6 +995,7 @@ err:
mysql_mutex_unlock(&LOCK_thread_count);
if (file >= 0)
mysql_file_close(file, MYF(MY_WME));
+ thd->variables.max_allowed_packet= old_max_allowed_packet;
my_message(my_errno, errmsg, MYF(0));
DBUG_VOID_RETURN;
@@ -1687,6 +1690,7 @@ bool mysql_show_binlog_events(THD* thd)
IO_CACHE log;
File file = -1;
MYSQL_BIN_LOG *binary_log= NULL;
+ int old_max_allowed_packet= thd->variables.max_allowed_packet;
DBUG_ENTER("mysql_show_binlog_events");
Log_event::init_show_field_list(&field_list);
@@ -1841,6 +1845,7 @@ err:
mysql_mutex_lock(&LOCK_thread_count);
thd->current_linfo = 0;
mysql_mutex_unlock(&LOCK_thread_count);
+ thd->variables.max_allowed_packet= old_max_allowed_packet;
DBUG_RETURN(ret);
}