diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-03 19:11:36 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-03 19:11:36 +0200 |
commit | c498250888ec126fddda2867d1239b2a7734482f (patch) | |
tree | e308174c977c0981d8e36f6f9b791b1b266d0cb0 /include | |
parent | 09a1f0075a8d5752dd7b2940a20d86a040af1741 (diff) | |
parent | 1418439d3823fe059b41092af72ab32d5e7cd7ab (diff) | |
download | mariadb-git-c498250888ec126fddda2867d1239b2a7734482f.tar.gz |
Merge 10.5 into 10.6mariadb-10.5.7bb-10.6-georg10.6-vatu
Diffstat (limited to 'include')
-rw-r--r-- | include/my_sys.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 2ad4e131b3f..8507ec7a1eb 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -515,8 +515,11 @@ 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); - info->write_pos+= Count; + if (Count) + { + memcpy(info->write_pos, Buffer, Count); + info->write_pos+= Count; + } return 0; } return _my_b_write(info, Buffer, Count); |