summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorunknown <kaa@polly.local>2007-07-11 18:52:50 +0400
committerunknown <kaa@polly.local>2007-07-11 18:52:50 +0400
commit0f164c2c4c0e16f185b2fa845090e9295f24bce6 (patch)
tree8d6e74c9501a873d3e0eb2fb8ca1a073c0a3b182 /sql/slave.cc
parent55153730b2aadba899284b2862647edefaa44757 (diff)
parent8abc8b9dc7ce5cf7ef52b0dfa43deaf7e2e177f4 (diff)
downloadmariadb-git-0f164c2c4c0e16f185b2fa845090e9295f24bce6.tar.gz
Merge polly.local:/home/kaa/src/maint/bug24192/my50-bug24192
into polly.local:/home/kaa/src/maint/bug24192/my51-bug24192 sql/slave.cc: Manual merge.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index f1b9ea8476b..fb807716f8b 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -27,6 +27,7 @@
#include <my_dir.h>
#include <sql_common.h>
#include <errmsg.h>
+#include <mysys_err.h>
#ifdef HAVE_REPLICATION
@@ -2101,20 +2102,23 @@ after reconnect");
if (event_len == packet_error)
{
uint mysql_error_number= mysql_errno(mysql);
- if (mysql_error_number == CR_NET_PACKET_TOO_LARGE)
- {
+ switch (mysql_error_number) {
+ case CR_NET_PACKET_TOO_LARGE:
sql_print_error("\
Log entry on master is longer than max_allowed_packet (%ld) on \
slave. If the entry is correct, restart the server with a higher value of \
max_allowed_packet",
thd->variables.max_allowed_packet);
goto err;
- }
- if (mysql_error_number == ER_MASTER_FATAL_ERROR_READING_BINLOG)
- {
+ case ER_MASTER_FATAL_ERROR_READING_BINLOG:
sql_print_error(ER(mysql_error_number), mysql_error_number,
mysql_error(mysql));
goto err;
+ case EE_OUTOFMEMORY:
+ case ER_OUTOFMEMORY:
+ sql_print_error("\
+Stopping slave I/O thread due to out-of-memory error from master");
+ goto err;
}
mi->slave_running= MYSQL_SLAVE_RUN_NOT_CONNECT;
thd->proc_info = "Waiting to reconnect after a failed master event read";