summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <dli@dev3-164.dev.cn.tlan>2006-12-22 10:08:11 +0800
committerunknown <dli@dev3-164.dev.cn.tlan>2006-12-22 10:08:11 +0800
commitb391a52284d4aa8f5eff9d253e042eb572ffbf56 (patch)
tree26924823fbf08ef576095f9f14b007b10bcd3b72
parenta75003287d9f3b7ad5141f8f04525d98ac87a18b (diff)
parent727ffbf37613c516cdb78d32b4ebd23cec4c83aa (diff)
downloadmariadb-git-b391a52284d4aa8f5eff9d253e042eb572ffbf56.tar.gz
Merge dli@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb-bj
into dev3-164.dev.cn.tlan:/home/dli/mysql/mysql-5.1/mysql-5.1-bug-19896 sql/log_event.cc: Auto merged sql/protocol.h: Auto merged sql/slave.cc: Auto merged
-rw-r--r--sql/log_event.cc23
-rw-r--r--sql/protocol.h2
-rw-r--r--sql/slave.cc2
3 files changed, 23 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 112f4aee135..a0a203fa9e8 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -5670,9 +5670,26 @@ int Rows_log_event::exec_event(st_relay_log_info *rli)
{
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);
}
diff --git a/sql/protocol.h b/sql/protocol.h
index 7e2bc1516ec..c3a2dae4b6f 100644
--- a/sql/protocol.h
+++ b/sql/protocol.h
@@ -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)
diff --git a/sql/slave.cc b/sql/slave.cc
index 4c5f0fc4764..f0f86ceb6c9 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1295,7 +1295,7 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
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);