Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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-03-22 13:10:38+01:00, tomas@stripped +3 -0
BUG#26286 (row-based logging scales worse than statement-based logging):
Submitting patch on Guilhem's behalf (he found the solution).
Correcting a typo that caused very big increases in memory usage when
more memory needed to be allocated for row-based events. Also correcting
a border case check when more memory needed to be allocated.
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.
(recommit telco 6.1)
sql/log_event.cc@stripped, 2007-03-22 13:10:35+01:00, tomas@stripped +23 -6
don't set -1 to last_slave_errno.
sql/protocol.h@stripped, 2007-03-22 13:10:35+01:00, tomas@stripped +2 -0
added function store(int from) to return last_slave_errno.
sql/slave.cc@stripped, 2007-03-22 13:10:35+01:00, tomas@stripped +1 -1
Correcting typo that caused very big increases in memory allocation.
Correcting border case for when more memory should be allocated.
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: tomas
# Host: whalegate.ndb.mysql.com
# Root: /home/tomas/mysql-5.1-telco-6.1
--- 1.263/sql/log_event.cc 2007-01-18 18:18:57 +01:00
+++ 1.264/sql/log_event.cc 2007-03-22 13:10:35 +01:00
@@ -5478,13 +5478,13 @@
DBUG_ASSERT(m_rows_cur <= m_rows_end);
/* The cast will always work since m_rows_cur <= m_rows_end */
- if (static_cast<my_size_t>(m_rows_end - m_rows_cur) < length)
+ if (static_cast<my_size_t>(m_rows_end - m_rows_cur) <= length)
{
my_size_t const block_size= 1024;
my_ptrdiff_t const old_alloc= m_rows_end - m_rows_buf;
my_ptrdiff_t const cur_size= m_rows_cur - m_rows_buf;
my_ptrdiff_t const new_alloc=
- block_size * ((cur_size + length) / block_size + block_size - 1);
+ block_size * ((cur_size + length + block_size - 1) / block_size);
byte* const new_buf= (byte*)my_realloc((gptr)m_rows_buf, new_alloc,
MYF(MY_ALLOW_ZERO_PTR|MY_WME));
@@ -5505,7 +5505,7 @@
m_rows_end= m_rows_buf + new_alloc;
}
- DBUG_ASSERT(m_rows_cur + length < m_rows_end);
+ DBUG_ASSERT(m_rows_cur + length <= m_rows_end);
memcpy(m_rows_cur, row_data, length);
m_rows_cur+= length;
m_row_count++;
@@ -5717,9 +5717,26 @@
{
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.302/sql/slave.cc 2007-01-12 12:24:34 +01:00
+++ 1.303/sql/slave.cc 2007-03-22 13:10:35 +01:00
@@ -1295,7 +1295,7 @@
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.37/sql/protocol.h 2006-12-31 01:06:35 +01:00
+++ 1.38/sql/protocol.h 2007-03-22 13:10:35 +01:00
@@ -58,6 +58,8 @@
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)
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2470) BUG#26286 | tomas | 22 Mar |