diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-02 15:48:47 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-11-02 15:48:47 +0200 |
commit | c7f322c91faf97a9f758c288b38e1385fd89b32d (patch) | |
tree | cf2a4cf562acffdf5b4b96d84e34f29c7f428458 /include | |
parent | d5ce7824444b7491f420061076ae5087d4829428 (diff) | |
parent | 8036d0a3590dddf4d51ba02bc74ba3a5a96674f7 (diff) | |
download | mariadb-git-c7f322c91faf97a9f758c288b38e1385fd89b32d.tar.gz |
Merge 10.2 into 10.3
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 70dc12cc28f..020f20926ff 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -539,8 +539,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); |