From: Date: June 15 2007 2:15pm Subject: bk commit into 5.0 tree (kaa:1.2470) BUG#24192 List-Archive: http://lists.mysql.com/commits/28864 X-Bug: 24192 Message-Id: <20070615121523.D118FBA46@polly.local> Below is the list of changes that have just been committed into a local 5.0 repository of kaa. When kaa does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-06-15 16:15:15+04:00, kaa@stripped +1 -0 Fix for bug #24192 "MySQL replication does not exit server when running out of memory" In case of out-of-memory error received from the master, print the corresponding message to the error log and stop slave I/O thread to avoid reconnecting with a wrong binary log position. sql/slave.cc@stripped, 2007-06-15 16:15:08+04:00, kaa@stripped +9 -0 In case of out-of-memory error received from the master, print the corresponding message to the error log and stop slave I/O thread to avoid reconnecting with a wrong binary log position. # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: kaa # Host: polly.local # Root: /home/kaa/src/maint/bug24192/my50-bug24192 --- 1.298/sql/slave.cc 2007-04-20 12:35:22 +04:00 +++ 1.299/sql/slave.cc 2007-06-15 16:15:08 +04:00 @@ -26,6 +26,7 @@ #include #include #include +#include #define MAX_SLAVE_RETRY_PAUSE 5 bool use_slave_mask = 0; @@ -3626,6 +3627,14 @@ max_allowed_packet", mysql_error(mysql)); goto err; } + if (mysql_error_number == EE_OUTOFMEMORY || + mysql_error_number == 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