diff --git a/src/storage/tx/ob_tx_log.h b/src/storage/tx/ob_tx_log.h index 0909da82c..35d8c850a 100644 --- a/src/storage/tx/ob_tx_log.h +++ b/src/storage/tx/ob_tx_log.h @@ -411,11 +411,12 @@ public: is_alloc_ = true; dli_buf_size_ = ddl_log->get_serialize_size(); submit_buf_ = static_cast(share::mtl_malloc(dli_buf_size_, "DLI_TMP_BUF")); - memset(submit_buf_, 0, dli_buf_size_); int64_t pos = 0; if (OB_ISNULL(submit_buf_)) { ret = OB_ALLOCATE_MEMORY_FAILED; TRANS_LOG(WARN, "alloc memory failed", K(ret), KPC(this), KPC(ddl_log)); + } else if (OB_FALSE_IT(memset(submit_buf_, 0, dli_buf_size_))) { + // do nothing } else if (ddl_log->serialize(static_cast(submit_buf_), dli_buf_size_, pos)) { TRANS_LOG(WARN, "serialize ddl log buf failed", K(ret), KPC(this), KPC(ddl_log)); }