diff --git a/src/common/ob_obj_cast.cpp b/src/common/ob_obj_cast.cpp index 31d2f591ca3622802e382b5a209d611b4f4676a7..253e93916c50ac141177a8971d82ca1f53351c21 100644 --- a/src/common/ob_obj_cast.cpp +++ b/src/common/ob_obj_cast.cpp @@ -107,7 +107,7 @@ static int copy_string(const ObObjCastParams ¶ms, } else { int64_t zf = params.zf_info_->max_length_ - len; if (zf > 0) { - MEMSET(buf, 0, zf); + MEMSET(buf, '0', zf); MEMCPY(buf + zf, str, len); len = str_len; // set string length } else {