Unfortunately, this code is filling 0s at the beginning of the short-read
buffer.
Fixes: https://tracker.ceph.com/issues/62492
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
d94684c1ee3d1436c878fe5d33ea27b2eb1144d5)
auto end = ceph::coarse_mono_clock::now();
getdata(f->vfs).logger->tinc(P_OPF_READ, end-start);
if (rc < len) {
- memset(buf, 0, len-rc);
+ memset((unsigned char*)buf+rc, 0, len-rc);
return SQLITE_IOERR_SHORT_READ;
} else {
return SQLITE_OK;