[CP] fix ash report bug

This commit is contained in:
AntiTopQuark
2024-01-03 18:12:51 +00:00
committed by ob-robot
parent 0c1f5ac25e
commit 459f72fc51
2 changed files with 27 additions and 6 deletions

View File

@ -862,6 +862,27 @@
} \
}
#define EXTRACT_STRBUF_FIELD_MYSQL_SKIP_RET_AND_TRUNCATION(result, column_name, field, max_length, real_length) \
if (OB_SUCC(ret)) \
{ \
ObString str_value; \
if (OB_SUCCESS == (ret = (result).get_varchar(column_name, str_value))) \
{ \
real_length = MIN(str_value.length(), max_length); \
MEMCPY(field, str_value.ptr(), real_length); \
field[real_length] = '\0'; \
} \
else if (OB_ERR_NULL_VALUE == ret || OB_ERR_COLUMN_NOT_FOUND == ret) \
{ \
ret = OB_SUCCESS; \
real_length = 0; \
field[0] = '\0'; \
} \
else \
{ \
SQL_LOG(WARN, "fail to extract strbuf field mysql. ", K(ret)); \
} \
}
#define EXTRACT_STRBUF_FIELD_TO_CLASS_MYSQL_SKIP_RET(result, column_name, class_obj, max_length) \
if (OB_SUCC(ret)) \