diff options
author | Monty <monty@mariadb.org> | 2020-06-28 20:07:32 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-07-02 17:57:34 +0300 |
commit | 65f831d17c84900c1faea49164688e2f5ce59563 (patch) | |
tree | c7c576c77fbee59de6b2a1c7d8ac5041e0e06f8d /storage/innobase/row/row0sel.cc | |
parent | 29f9e679adc90adf5d3c6e08da947789c9c2ac8b (diff) | |
download | mariadb-git-65f831d17c84900c1faea49164688e2f5ce59563.tar.gz |
Fixed bugs found by valgrind
- Some of the bug fixes are backports from 10.5!
- The fix in innobase/fil/fil0fil.cc is just a backport to get less
error messages in mysqld.1.err when running with valgrind.
- Renamed HAVE_valgrind_or_MSAN to HAVE_valgrind
Diffstat (limited to 'storage/innobase/row/row0sel.cc')
-rw-r--r-- | storage/innobase/row/row0sel.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index c3dc4e14094..c4c05888eb8 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -982,11 +982,11 @@ row_sel_get_clust_rec( switch (err) { case DB_SUCCESS: case DB_SUCCESS_LOCKED_REC: -#ifdef HAVE_valgrind_or_MSAN +#ifdef HAVE_valgrind /* Declare the variable uninitialized. It should be set to DB_SUCCESS at func_exit. */ MEM_UNDEFINED(&err, sizeof err); -#endif /* HAVE_valgrind_or_MSAN */ +#endif /* HAVE_valgrind */ break; default: goto err_exit; @@ -2742,9 +2742,9 @@ row_sel_field_store_in_mysql_format_func( ut_ad(len != UNIV_SQL_NULL); MEM_CHECK_DEFINED(data, len); MEM_CHECK_ADDRESSABLE(dest, templ->mysql_col_len); -#ifdef HAVE_valgrind_or_MSAN +#ifdef HAVE_valgrind MEM_UNDEFINED(dest, templ->mysql_col_len); -#endif /* HAVE_valgrind_or_MSAN */ +#endif /* HAVE_valgrind */ switch (templ->type) { const byte* field_end; @@ -3653,9 +3653,9 @@ row_sel_copy_cached_field_for_mysql( row_mysql_read_true_varchar( &len, cache, templ->mysql_length_bytes); len += templ->mysql_length_bytes; -#ifdef HAVE_valgrind_or_MSAN +#ifdef HAVE_valgrind MEM_UNDEFINED(buf, templ->mysql_col_len); -#endif /* HAVE_valgrind_or_MSAN */ +#endif /* HAVE_valgrind */ } else { len = templ->mysql_col_len; } @@ -3724,9 +3724,9 @@ row_sel_dequeue_cached_row_for_mysql( /* The record is long. Copy it field by field, in case there are some long VARCHAR column of which only a small length is being used. */ -#ifdef HAVE_valgrind_or_MSAN +#ifdef HAVE_valgrind MEM_UNDEFINED(buf, prebuilt->mysql_prefix_len); -#endif /* HAVE_valgrind_or_MSAN */ +#endif /* HAVE_valgrind */ /* First copy the NULL bits. */ ut_memcpy(buf, cached_rec, prebuilt->null_bitmap_len); @@ -3810,10 +3810,10 @@ row_sel_fetch_last_buf( } ut_ad(prebuilt->fetch_cache_first == 0); -#ifdef HAVE_valgrind_or_MSAN +#ifdef HAVE_valgrind MEM_UNDEFINED(prebuilt->fetch_cache[prebuilt->n_fetch_cached], prebuilt->mysql_row_len); -#endif /* HAVE_valgrind_or_MSAN */ +#endif /* HAVE_valgrind */ return(prebuilt->fetch_cache[prebuilt->n_fetch_cached]); } |