diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-03 14:49:17 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-03 14:49:17 +0200 |
commit | 533a13af069d8c9e6c5f4e1a72851497185ade03 (patch) | |
tree | 4623752e0c114e582fbbc0afcc02b67dede26b50 /include/my_sys.h | |
parent | 4b3690b50433a169d9feed5dc45044a8934b5582 (diff) | |
parent | e6290a8270daf884f551230307225b358939bfab (diff) | |
download | mariadb-git-533a13af069d8c9e6c5f4e1a72851497185ade03.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'include/my_sys.h')
-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 505f3a056a5..d8101057f7c 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -538,8 +538,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); |