Commit 727ffbf3 authored by unknown's avatar unknown

ndb - fixed for BUG#19896 Last_Errno: 4294967295, Error in Write_rows event:...

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:
  don't set -1 to last_slave_errno.
sql/protocol.h:
  added function store(int from) to return last_slave_errno.
sql/slave.cc:
  should use int instead of uint32 type to return last_slave_errno.
parent 479ffe15
......@@ -5484,10 +5484,27 @@ int Rows_log_event::exec_event(st_relay_log_info *rli)
rli->tables_to_lock_count, &need_reopen)))
{
if (!need_reopen)
{
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);
}
......
......@@ -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)
......
......@@ -2237,7 +2237,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment