mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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:
parent
29f9e679ad
commit
65f831d17c
32 changed files with 171 additions and 126 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue