Below is the list of changes that have just been committed into a local
5.1 repository of rafal. When rafal 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-08-28 10:14:45+02:00, rafal@quant.(none) +2 -0
BUG#21842: Exclude Rows_log_event members used in event application if
not compiled as a replication server - a fix from rpl clone now applied
to 5.1.22 tree.
sql/log_event.cc@stripped, 2007-08-28 10:14:42+02:00, rafal@quant.(none) +15 -10
Exclude Rows_log_event members used in event application if
not compiled as a replication server.
sql/log_event.h@stripped, 2007-08-28 10:14:42+02:00, rafal@quant.(none) +5 -5
Don't initialize Rows_log_event members used in event application if
not compiled as a replication server.
diff -Nrup a/sql/log_event.cc b/sql/log_event.cc
--- a/sql/log_event.cc 2007-08-27 20:22:01 +02:00
+++ b/sql/log_event.cc 2007-08-28 10:14:42 +02:00
@@ -5653,9 +5653,10 @@ Rows_log_event::Rows_log_event(THD *thd_
m_table(tbl_arg),
m_table_id(tid),
m_width(tbl_arg ? tbl_arg->s->fields : 1),
- m_rows_buf(0), m_rows_cur(0), m_rows_end(0),
- m_curr_row(NULL), m_curr_row_end(NULL),
- m_flags(0), m_key(NULL)
+ m_rows_buf(0), m_rows_cur(0), m_rows_end(0), m_flags(0)
+#ifdef HAVE_REPLICATION
+ ,m_key(NULL), m_curr_row(NULL), m_curr_row_end(NULL)
+#endif
{
/*
We allow a special form of dummy event when the table, and cols
@@ -5697,10 +5698,13 @@ Rows_log_event::Rows_log_event(const cha
*description_event)
: Log_event(buf, description_event),
m_row_count(0),
+#ifndef MYSQL_CLIENT
m_table(NULL),
- m_rows_buf(0), m_rows_cur(0), m_rows_end(0),
- m_curr_row(NULL), m_curr_row_end(NULL),
- m_key(NULL)
+#endif
+ m_table_id(0), m_rows_buf(0), m_rows_cur(0), m_rows_end(0)
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+ ,m_key(NULL), m_curr_row(NULL), m_curr_row_end(NULL)
+#endif
{
DBUG_ENTER("Rows_log_event::Rows_log_event(const char*,...)");
uint8 const common_header_len= description_event->common_header_len;
@@ -5789,7 +5793,9 @@ Rows_log_event::Rows_log_event(const cha
m_rows_buf= (uchar*) my_malloc(data_size, MYF(MY_WME));
if (likely((bool)m_rows_buf))
{
+#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
m_curr_row= m_rows_buf;
+#endif
m_rows_end= m_rows_buf + data_size;
m_rows_cur= m_rows_end;
memcpy(m_rows_buf, ptr_rows_data, data_size);
@@ -6187,8 +6193,8 @@ int Rows_log_event::do_apply_event(RELAY
} // if (table)
/*
- We need to delay this clear until the table def stored in m_table_def is no
- longer needed. It is used in unpack_current_row().
+ We need to delay this clear until here bacause unpack_current_row() uses
+ master-side table definitions stored in rli.
*/
if (rli->tables_to_lock && get_flags(STMT_END_F))
const_cast<RELAY_LOG_INFO*>(rli)->clear_tables_to_lock();
@@ -7825,8 +7831,7 @@ Delete_rows_log_event::do_before_row_ope
m_table->s->primary_key < MAX_KEY)
{
/*
- We don't need to allocate any memory for m_after_image and
- m_key since they are not used.
+ We don't need to allocate any memory for m_key since it is not used.
*/
return 0;
}
diff -Nrup a/sql/log_event.h b/sql/log_event.h
--- a/sql/log_event.h 2007-08-26 14:31:03 +02:00
+++ b/sql/log_event.h 2007-08-28 10:14:42 +02:00
@@ -2294,15 +2294,15 @@ protected:
uchar *m_rows_cur; /* One-after the end of the data */
uchar *m_rows_end; /* One-after the end of the allocated space */
- const uchar *m_curr_row; /* Start of the row being processed */
- const uchar *m_curr_row_end; /* One-after the end of the current row */
-
- flag_set m_flags; /* Flags for row-level events */
- uchar *m_key; /* Buffer to keep key value during searches */
+ flag_set m_flags; /* Flags for row-level events */
/* helper functions */
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+ const uchar *m_curr_row; /* Start of the row being processed */
+ const uchar *m_curr_row_end; /* One-after the end of the current row */
+ uchar *m_key; /* Buffer to keep key value during searches */
+
int find_row(const RELAY_LOG_INFO *const);
int write_row(const RELAY_LOG_INFO *const, const bool);
| Thread |
|---|
| • bk commit into 5.1 tree (rafal:1.2571) BUG#21842 | rsomla | 28 Aug |