diff options
author | unknown <kaa@polly.local> | 2007-07-11 19:29:11 +0400 |
---|---|---|
committer | unknown <kaa@polly.local> | 2007-07-11 19:29:11 +0400 |
commit | b2bf1ddfc0ba31cb8f68eec78c623a85466ef2ea (patch) | |
tree | 9be34680c8c4067c7e0ff5a26527efcd5109fb73 /sql/slave.cc | |
parent | 3d9841622e57c9267ad32bf2c0ab37c9353b2ba3 (diff) | |
parent | 8abc8b9dc7ce5cf7ef52b0dfa43deaf7e2e177f4 (diff) | |
download | mariadb-git-b2bf1ddfc0ba31cb8f68eec78c623a85466ef2ea.tar.gz |
Merge polly.local:/home/kaa/src/maint/bug24192/my50-bug24192
into polly.local:/home/kaa/src/maint/mysql-5.0-maint
sql/slave.cc:
Auto merged
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 84f409d7f34..c1b0d655bea 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -26,6 +26,7 @@ #include <my_dir.h> #include <sql_common.h> #include <errmsg.h> +#include <mysys_err.h> #define MAX_SLAVE_RETRY_PAUSE 5 bool use_slave_mask = 0; @@ -3611,22 +3612,25 @@ after reconnect"); if (event_len == packet_error) { - uint mysql_error_number= mysql_errno(mysql); - if (mysql_error_number == CR_NET_PACKET_TOO_LARGE) - { - sql_print_error("\ + uint mysql_error_number= mysql_errno(mysql); + 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) - { - sql_print_error(ER(mysql_error_number), mysql_error_number, - mysql_error(mysql)); - goto err; - } + thd->variables.max_allowed_packet); + goto err; + 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"; #ifdef SIGNAL_WITH_VIO_CLOSE |