diff options
author | unknown <nick@nick.leippe.com> | 2002-05-02 18:55:38 -0700 |
---|---|---|
committer | unknown <nick@nick.leippe.com> | 2002-05-02 18:55:38 -0700 |
commit | 10729adbf50768d371c955777622d1fc420a4fe1 (patch) | |
tree | 92567c5fa7bd4f7388197c3a59cccc045f8de455 | |
parent | c287af80c4c26748ce6038319d5f5b4b6d62b289 (diff) | |
download | mariadb-git-10729adbf50768d371c955777622d1fc420a4fe1.tar.gz |
Backport of Sasha's fix to 3.23 from 4.0
see dev-private email from sasha, subject:
URGENT: rpl_sporadic_master
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
-rw-r--r-- | BitKeeper/etc/logging_ok | 1 | ||||
-rw-r--r-- | sql/slave.cc | 23 |
2 files changed, 8 insertions, 16 deletions
diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index ebbe3a30696..2cdbf560ba4 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -17,3 +17,4 @@ miguel@hegel.local arjen@fred.bitbike.com sinisa@rhols221.adsl.netsonic.fi Sinisa@sinisa.nasamreza.org +nick@nick.leippe.com diff --git a/sql/slave.cc b/sql/slave.cc index cff3af42ce1..cb3d375f476 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -837,9 +837,6 @@ command"); static uint read_event(MYSQL* mysql, MASTER_INFO *mi) { uint len = packet_error; - // for convinience lets think we start by - // being in the interrupted state :-) - int read_errno = EINTR; // my_real_read() will time us out // we check if we were told to die, and if not, try reading again @@ -848,27 +845,21 @@ static uint read_event(MYSQL* mysql, MASTER_INFO *mi) return packet_error; #endif - while (!abort_loop && !abort_slave && len == packet_error && - read_errno == EINTR ) - { - len = mc_net_safe_read(mysql); - read_errno = errno; - } - if (abort_loop || abort_slave) - return packet_error; - if (len == packet_error || (int) len < 1) + len = mc_net_safe_read(mysql); + + if (len == packet_error || (long) len < 1) { - sql_print_error("Error reading packet from server: %s (read_errno %d,\ + sql_print_error("Error reading packet from server: %s (\ server_errno=%d)", - mc_mysql_error(mysql), read_errno, mc_mysql_errno(mysql)); + mc_mysql_error(mysql), mc_mysql_errno(mysql)); return packet_error; } if (len == 1) { sql_print_error("Slave: received 0 length packet from server, apparent\ - master shutdown: %s (%d)", - mc_mysql_error(mysql), read_errno); + master shutdown: %s", + mc_mysql_error(mysql)); return packet_error; } |