From: Date: December 22 2006 2:59am Subject: bk commit into 5.1 tree (dli:1.2320) BUG#19896 List-Archive: http://lists.mysql.com/commits/17299 X-Bug: 19896 Message-Id: <200612220159.kBM1xbTS022663@dev3-164.dev.cn.tlan> Below is the list of changes that have just been committed into a local 5.1 repository of dli. When dli 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, 2006-12-22 09:59:27+08:00, dli@stripped +3 -0 ndb - fixed for BUG#19896 Last_Errno: 4294967295, Error in Write_rows event: (error number 4 billion ?) fixed to use int instead of uint32 type to return last_slave_errno. sql/log_event.cc@stripped, 2006-12-22 09:59:24+08:00, dli@stripped +20 -3 don't set -1 to last_slave_errno. sql/protocol.h@stripped, 2006-12-22 09:59:24+08:00, dli@stripped +2 -0 added function store(int from) to return last_slave_errno. sql/slave.cc@stripped, 2006-12-22 09:59:25+08:00, dli@stripped +1 -1 should use int instead of uint32 type to return last_slave_errno. # 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: dli # Host: dev3-164.dev.cn.tlan # Root: /home/dli/mysql/mysql-5.1/mysql-5.1-bug-19896 --- 1.245/sql/log_event.cc 2006-12-22 09:59:37 +08:00 +++ 1.246/sql/log_event.cc 2006-12-22 09:59:37 +08:00 @@ -5485,9 +5485,26 @@ int Rows_log_event::exec_event(st_relay_ { if (!need_reopen) { - slave_print_msg(ERROR_LEVEL, rli, error, - "Error in %s event: when locking tables", - get_type_str()); + if (thd->query_error || thd->is_fatal_error) + { + /* + Error reporting borrowed from Query_log_event with many excessive + simplifications (we don't honour --slave-skip-errors) + */ + uint actual_error= thd->net.last_errno; + slave_print_msg(ERROR_LEVEL, rli, actual_error, + "Error '%s' in %s event: when locking tables", + (actual_error ? thd->net.last_error : + "unexpected success or fatal error"), + get_type_str()); + thd->is_fatal_error= 1; + } + else + { + slave_print_msg(ERROR_LEVEL, rli, error, + "Error in %s event: when locking tables", + get_type_str()); + } rli->clear_tables_to_lock(); DBUG_RETURN(error); } --- 1.287/sql/slave.cc 2006-12-22 09:59:37 +08:00 +++ 1.288/sql/slave.cc 2006-12-22 09:59:37 +08:00 @@ -2237,7 +2237,7 @@ bool show_master_info(THD* thd, MASTER_I rpl_filter->get_wild_ignore_table(&tmp); protocol->store(&tmp); - protocol->store((uint32) mi->rli.last_slave_errno); + protocol->store(mi->rli.last_slave_errno); protocol->store(mi->rli.last_slave_error, &my_charset_bin); protocol->store((uint32) mi->rli.slave_skip_counter); protocol->store((ulonglong) mi->rli.group_master_log_pos); --- 1.33/sql/protocol.h 2006-12-22 09:59:37 +08:00 +++ 1.34/sql/protocol.h 2006-12-22 09:59:37 +08:00 @@ -59,6 +59,8 @@ public: String *storage_packet() { return packet; } inline void free() { packet->free(); } virtual bool write(); + inline bool store(int from) + { return store_long((longlong) from); } inline bool store(uint32 from) { return store_long((longlong) from); } inline bool store(longlong from)