Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats 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-11-21 13:57:52+01:00, mats@romeo.(none) +3 -0
BUG#24403 (valgrind complaint on uninited st_table for innodb + rbr):
Removing DBUG_DUMP printouts for valgrind builds since they trigger warnings.
Removing valgrind memory checks completely.
Removing bzero() of record when opening table that was added earlier.
sql/log_event.cc@stripped, 2006-11-21 13:57:46+01:00, mats@romeo.(none) +53 -20
Removing DBUG_DUMP of records for valgrind builds since they trigger false valgrind
warnings.
Removing valgrind checks completely, since they can trigger false valgrind warnings.
sql/sql_class.cc@stripped, 2006-11-21 13:57:46+01:00, mats@romeo.(none) +7 -1
Removing DBUG_DUMP of records for valgrind builds since they trigger false valgrind
warnings.
sql/table.cc@stripped, 2006-11-21 13:57:46+01:00, mats@romeo.(none) +1 -3
Removing extreneous bzero() that were added previously.
# 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: mats
# Host: romeo.(none)
# Root: /home/bk/memcheck-mysql-5.1
--- 1.253/sql/log_event.cc 2006-11-21 13:58:01 +01:00
+++ 1.254/sql/log_event.cc 2006-11-21 13:58:01 +01:00
@@ -5417,7 +5417,13 @@
DBUG_ENTER("Rows_log_event::do_add_row_data");
DBUG_PRINT("enter", ("row_data: 0x%lx length: %lu", (ulong) row_data,
length));
+ /*
+ Don't print debug messages when running valgrind since they can
+ trigger false warnings.
+ */
+#ifndef HAVE_purify
DBUG_DUMP("row_data", (const char*)row_data, min(length, 32));
+#endif
DBUG_ASSERT(m_rows_buf <= m_rows_cur);
DBUG_ASSERT(!m_rows_buf || m_rows_end && m_rows_buf < m_rows_end);
@@ -5504,7 +5510,9 @@
char const **row_end, ulong *master_reclength,
MY_BITMAP* const rw_set, Log_event_type const event_type)
{
+ DBUG_ENTER("unpack_row");
DBUG_ASSERT(record && row);
+ DBUG_PRINT("enter", ("row=0x%lx; record=0x%lx", row, record));
my_ptrdiff_t const offset= record - (byte*) table->record[0];
my_size_t master_null_bytes= table->s->null_bytes;
@@ -5548,6 +5556,8 @@
DBUG_ASSERT(table->record[0] <= f->ptr);
DBUG_ASSERT(f->ptr < table->record[0] + table->s->reclength +
(f->pack_length_in_rec() == 0));
f->move_field_offset(offset);
+
+ DBUG_PRINT("info", ("unpacking column '%s' to 0x%lx", f->field_name,
f->ptr));
ptr= f->unpack(f->ptr, ptr);
f->move_field_offset(-offset);
/* Field...::unpack() cannot return 0 */
@@ -5595,7 +5605,7 @@
(*field_ptr)->set_default();
}
- return error;
+ DBUG_RETURN(error);
}
int Rows_log_event::exec_event(st_relay_log_info *rli)
@@ -6060,7 +6070,13 @@
DBUG_PRINT("info",("event_len=%ld, common_header_len=%d, post_header_len=%d",
event_len, common_header_len, post_header_len));
+ /*
+ Don't print debug messages when running valgrind since they can
+ trigger false warnings.
+ */
+#ifndef HAVE_purify
DBUG_DUMP("event buffer", buf, event_len);
+#endif
/* Read the post-header */
const char *post_start= buf + common_header_len;
@@ -6784,6 +6800,17 @@
row reference using the position() member function (it will be
stored in table->file->ref) and the use rnd_pos() to position
the "cursor" (i.e., record[0] in this case) at the correct row.
+
+ TODO: Add a check that the correct record has been fetched by
+ comparing with the original record. Take into account that the
+ record on the master and slave can be of different
+ length. Something along these lines should work:
+
+ ADD>>> store_record(table,record[1]);
+ int error= table->file->rnd_pos(table->record[0],
table->file->ref);
+ ADD>>> DBUG_ASSERT(memcmp(table->record[1], table->record[0],
+ table->s->reclength) == 0);
+
*/
table->file->position(table->record[0]);
int error= table->file->rnd_pos(table->record[0], table->file->ref);
@@ -6792,15 +6819,9 @@
move it to table->record[1].
*/
bmove_align(table->record[1], table->record[0], table->s->reclength);
-#ifdef HAVE_purify
- if (error == 0)
- valgrind_check_mem(table->record[1], table->s->reclength);
-#endif
DBUG_RETURN(error);
}
- DBUG_ASSERT(table->record[1]);
-
/* We need to retrieve all fields */
/* TODO: Move this out from this function to main loop */
table->use_all_columns();
@@ -6812,6 +6833,15 @@
if (!table->file->inited && (error= table->file->ha_index_init(0,
FALSE)))
DBUG_RETURN(error);
+ /*
+ Don't print debug messages when running valgrind since they can
+ trigger false warnings.
+ */
+#ifndef HAVE_purify
+ DBUG_DUMP("table->record[0]", table->record[0], table->s->reclength);
+ DBUG_DUMP("table->record[1]", table->record[1], table->s->reclength);
+#endif
+
/*
We need to set the null bytes to ensure that the filler bit are
all set when returning. There are storage engines that just set
@@ -6830,6 +6860,14 @@
DBUG_RETURN(error);
}
+ /*
+ Don't print debug messages when running valgrind since they can
+ trigger false warnings.
+ */
+#ifndef HAVE_purify
+ DBUG_DUMP("table->record[0]", table->record[0], table->s->reclength);
+ DBUG_DUMP("table->record[1]", table->record[1], table->s->reclength);
+#endif
/*
Below is a minor "optimization". If the key (i.e., key number
0) has the HA_NOSAME flag set, we know that we have found the
@@ -6847,9 +6885,6 @@
if (table->key_info->flags & HA_NOSAME)
{
table->file->ha_index_end();
-#ifdef HAVE_purify
- valgrind_check_mem(table->record[1], table->s->reclength);
-#endif
DBUG_RETURN(0);
}
@@ -6926,16 +6961,9 @@
table->file->ha_rnd_end();
DBUG_ASSERT(error == HA_ERR_END_OF_FILE || error == 0);
-#ifdef HAVE_purify
- if (error == 0)
- valgrind_check_mem(table->record[1], table->s->reclength);
-#endif
DBUG_RETURN(error);
}
-#ifdef HAVE_purify
- valgrind_check_mem(table->record[1], table->s->reclength);
-#endif
DBUG_RETURN(0);
}
#endif
@@ -7184,9 +7212,14 @@
next_start, &m_cols, row_end, &m_master_reclength,
table->write_set, UPDATE_ROWS_EVENT);
- DBUG_DUMP("record[0]", (const char *)table->record[0], table->s->reclength);
- DBUG_DUMP("m_after_image", (const char *)m_after_image, table->s->reclength);
-
+ /*
+ Don't print debug messages when running valgrind since they can
+ trigger false warnings.
+ */
+#ifndef HAVE_purify
+ DBUG_DUMP("record[0]", (const char *)table->record[0], m_master_reclength);
+ DBUG_DUMP("m_after_image", (const char *)m_after_image, m_master_reclength);
+#endif
/*
If we will access rows using the random access method, m_key will
--- 1.297/sql/sql_class.cc 2006-11-21 13:58:01 +01:00
+++ 1.298/sql/sql_class.cc 2006-11-21 13:58:01 +01:00
@@ -2727,11 +2727,17 @@
before_record);
my_size_t const after_size= pack_row(table, cols, after_row,
after_record);
-
+
+ /*
+ Don't print debug messages when running valgrind since they can
+ trigger false warnings.
+ */
+#ifndef HAVE_purify
DBUG_DUMP("before_record", (const char *)before_record, table->s->reclength);
DBUG_DUMP("after_record", (const char *)after_record, table->s->reclength);
DBUG_DUMP("before_row", (const char *)before_row, before_size);
DBUG_DUMP("after_row", (const char *)after_row, after_size);
+#endif
Rows_log_event* const ev=
binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
--- 1.253/sql/table.cc 2006-11-21 13:58:01 +01:00
+++ 1.254/sql/table.cc 2006-11-21 13:58:01 +01:00
@@ -1377,9 +1377,7 @@
if (!(record= (byte*) alloc_root(&outparam->mem_root,
share->rec_buff_length * records)))
goto err; /* purecov: inspected */
-#ifdef HAVE_purify
- bzero(record, share->rec_buff_length * records);
-#endif
+
if (records == 0)
{
/* We are probably in hard repair, and the buffers should not be used */
| Thread |
|---|
| • bk commit into 5.1 tree (mats:1.2370) BUG#24403 | Mats Kindahl | 21 Nov |