[CP] fix log print core

This commit is contained in:
chaser-ch
2023-10-08 13:09:32 +00:00
committed by ob-robot
parent 0452bc3468
commit bc06686c8f

View File

@ -526,6 +526,7 @@ OB_INLINE int ObStorageDatum::deep_copy(const ObStorageDatum &src, common::ObIAl
if (OB_ISNULL(buf)) { if (OB_ISNULL(buf)) {
ret = OB_ALLOCATE_MEMORY_FAILED; ret = OB_ALLOCATE_MEMORY_FAILED;
COMMON_LOG(WARN, "allocate memory failed", K(ret), K(src)); COMMON_LOG(WARN, "allocate memory failed", K(ret), K(src));
pack_ = 0;
} else { } else {
MEMCPY(buf, src.ptr_, src.len_); MEMCPY(buf, src.ptr_, src.len_);
// need set ptr_ after memory copy, if this == &src // need set ptr_ after memory copy, if this == &src
@ -550,6 +551,7 @@ OB_INLINE int ObStorageDatum::deep_copy(const ObStorageDatum &src, char * buf, c
} else if (OB_UNLIKELY(nullptr == buf || buf_len < pos + src.len_)) { } else if (OB_UNLIKELY(nullptr == buf || buf_len < pos + src.len_)) {
ret = OB_INVALID_ARGUMENT; ret = OB_INVALID_ARGUMENT;
STORAGE_LOG(WARN, "Invalid argument to deep copy datum", K(ret), K(src), KP(buf), K(buf_len), K(pos)); STORAGE_LOG(WARN, "Invalid argument to deep copy datum", K(ret), K(src), KP(buf), K(buf_len), K(pos));
pack_ = 0;
} else { } else {
MEMCPY(buf + pos, src.ptr_, src.len_); MEMCPY(buf + pos, src.ptr_, src.len_);
// need set ptr_ after memory copy, if this == &src // need set ptr_ after memory copy, if this == &src