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
This commit is contained in:
Monty 2020-06-28 20:07:32 +03:00
commit 65f831d17c
32 changed files with 171 additions and 126 deletions

View file

@ -535,6 +535,7 @@ static inline int my_b_read(IO_CACHE *info, uchar *Buffer, size_t Count)
static inline int my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
MEM_CHECK_DEFINED(Buffer, Count);
if (info->write_pos + Count <= info->write_end)
{
memcpy(info->write_pos, Buffer, Count);
@ -556,6 +557,7 @@ static inline int my_b_get(IO_CACHE *info)
static inline my_bool my_b_write_byte(IO_CACHE *info, uchar chr)
{
MEM_CHECK_DEFINED(&chr, 1);
if (info->write_pos >= info->write_end)
if (my_b_flush_io_cache(info, 1))
return 1;