From: Mats Kindahl Date: June 9 2007 5:14am Subject: bk commit into 5.1 tree (mats:1.2363) BUG#24954 List-Archive: http://lists.mysql.com/commits/28448 X-Bug: 24954 Message-Id: <20070609051402.0969E12CFA6@romeo.kindahl.net> Below is the list of changes that have just been committed into a local 5.1 repository of mats. When mats 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-09 07:13:53+02:00, mats@stripped +1 -0 BUG#24954 (Last_errno and Last_error not set after master_retry_count has been reached): Minor changes based on comments from the review. sql/log_event.cc@stripped, 2007-06-09 07:13:50+02:00, mats@stripped +5 -21 Removing checks for the number of bytes written (these changes will not be visible in the final patch). # 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: mats # Host: kindahl-laptop.dnsalias.net # Root: /home/bk/b24954-mysql-5.1-new-rpl --- 1.258/sql/log_event.cc 2007-06-09 07:14:01 +02:00 +++ 1.259/sql/log_event.cc 2007-06-09 07:14:01 +02:00 @@ -3310,27 +3310,11 @@ if (thd->is_fatal_error) { char buf[256]; - size_t const bytes_written= - my_snprintf(buf, sizeof(buf), - "Running LOAD DATA INFILE on table '%s'." - " Default database: '%s'", - (char*)table_name, - print_slave_db_safe(remember_db)); - - /* - Here bytes_written can be more than the size of buf, in the - event that the string was truncated. This is still safe since - there is a trailing NUL appended, and it is important to - generate a sensible error that can be used to debug the problem, - so we print the truncated string even though it was truncated. - We add three trailing dots to emphasize that the string was - truncated. - */ - if (bytes_written > sizeof(buf)) - { - char *ptr = buf + sizeof(buf) - 4; - ptr[0]= ptr[1]= ptr[2]= '.'; - } + my_snprintf(buf, sizeof(buf), + "Running LOAD DATA INFILE on table '%-.64s'." + " Default database: '%-.64s'", + (char*)table_name, + print_slave_db_safe(remember_db)); rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, ER(ER_SLAVE_FATAL_ERROR), buf);