diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2010-05-05 12:53:28 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2010-05-05 12:53:28 +0300 |
commit | 264942661b5181c670a62fc7be1e7f4e54df7a62 (patch) | |
tree | ed12d17224a17e6b0bad045ebdf4b2c90eb344e6 /storage | |
parent | 6bc1a96b31cd9d931bb5a8515c82e75520db8388 (diff) | |
download | mariadb-git-264942661b5181c670a62fc7be1e7f4e54df7a62.tar.gz |
Add Valgrind diagnostics to track down Bug #38999.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/row/row0sel.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index 1d30249c53e..6912a489f75 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -2452,6 +2452,7 @@ row_sel_field_store_in_mysql_format( byte* pad_ptr; ut_ad(len != UNIV_SQL_NULL); + UNIV_MEM_ASSERT_RW(data, len); if (templ->type == DATA_INT) { /* Convert integer data from Innobase to a little-endian @@ -2687,6 +2688,9 @@ row_sel_store_mysql_rec( /* MySQL assumes that the field for an SQL NULL value is set to the default value. */ + UNIV_MEM_ASSERT_RW(prebuilt->default_rec + + templ->mysql_col_offset, + templ->mysql_col_len); mysql_rec[templ->mysql_null_byte_offset] |= (byte) templ->mysql_null_bit_mask; memcpy(mysql_rec + templ->mysql_col_offset, @@ -3007,6 +3011,11 @@ row_sel_pop_cached_row_for_mysql( for (i = 0; i < prebuilt->n_template; i++) { templ = prebuilt->mysql_template + i; +#if 0 /* Some of the cached_rec may legitimately be uninitialized. */ + UNIV_MEM_ASSERT_RW(cached_rec + + templ->mysql_col_offset, + templ->mysql_col_len); +#endif ut_memcpy(buf + templ->mysql_col_offset, cached_rec + templ->mysql_col_offset, templ->mysql_col_len); @@ -3021,6 +3030,11 @@ row_sel_pop_cached_row_for_mysql( } } else { +#if 0 /* Some of the cached_rec may legitimately be uninitialized. */ + UNIV_MEM_ASSERT_RW(prebuilt->fetch_cache + [prebuilt->fetch_cache_first], + prebuilt->mysql_prefix_len); +#endif ut_memcpy(buf, prebuilt->fetch_cache[prebuilt->fetch_cache_first], prebuilt->mysql_prefix_len); @@ -3070,6 +3084,8 @@ row_sel_push_cache_row_for_mysql( } ut_ad(prebuilt->fetch_cache_first == 0); + UNIV_MEM_INVALID(prebuilt->fetch_cache[prebuilt->n_fetch_cached], + prebuilt->mysql_row_len); if (UNIV_UNLIKELY(!row_sel_store_mysql_rec( prebuilt->fetch_cache[ |