[FEAT MERGE] Merge syslog user experience improvement to master
Co-authored-by: Charles0429 <xiezhenjiang@gmail.com> Co-authored-by: tino247 <tino247@126.com> Co-authored-by: chaser-ch <chaser.ch@antgroup.com>
This commit is contained in:
@ -456,7 +456,7 @@ public:
|
||||
len = 0;
|
||||
int64_t idx = batch_idx_mask_ & datum_idx;
|
||||
if (OB_UNLIKELY(!ObDynReserveBuf::supported(datum_meta_.type_))) {
|
||||
SQL_ENG_LOG(ERROR, "unexpected alloc string result memory called", K(*this));
|
||||
SQL_ENG_LOG_RET(ERROR, common::OB_ERR_UNEXPECTED, "unexpected alloc string result memory called", K(*this));
|
||||
} else {
|
||||
ObDynReserveBuf *drb = reinterpret_cast<ObDynReserveBuf *>(
|
||||
ctx.frames_[frame_idx_] + dyn_buf_header_offset_ + sizeof(ObDynReserveBuf) * idx);
|
||||
@ -1080,7 +1080,7 @@ inline const char *get_vectorized_row_str(ObEvalCtx &eval_ctx,
|
||||
mgr->inc_level();
|
||||
CStringBufMgr::BufNode *node = mgr->acquire();
|
||||
if (OB_ISNULL(node)) {
|
||||
LIB_LOG(ERROR, "buffer is NULL");
|
||||
LIB_LOG_RET(ERROR, OB_ALLOCATE_MEMORY_FAILED, "buffer is NULL");
|
||||
} else {
|
||||
buffer = node->buf_;
|
||||
databuff_printf(buffer, CStringBufMgr::BUF_SIZE, pos, "vectorized_rows(%ld)=", index);
|
||||
|
||||
@ -228,7 +228,7 @@ OB_DEF_SERIALIZE_SIZE(ObExprDllUdf)
|
||||
const ObUdfConstArgs &args = calculable_results_.at(j);
|
||||
const ObSqlExpression *expr = args.sql_calc_;
|
||||
if (OB_ISNULL(expr)) {
|
||||
LOG_ERROR("udf normal expr is null");
|
||||
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "udf normal expr is null");
|
||||
} else {
|
||||
len += expr->get_serialize_size();
|
||||
}
|
||||
|
||||
@ -791,7 +791,7 @@ int64_t ObExprLike::match_with_instr_mode(const ObString &text, const InstrInfo
|
||||
text_len -= new_text != NULL ? new_text - text_ptr + instr_len[idx] : 0;
|
||||
if (OB_UNLIKELY(text_len < 0)) {
|
||||
match = false;
|
||||
LOG_ERROR("unexpected result of memmem", K(text),
|
||||
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "unexpected result of memmem", K(text),
|
||||
K(ObString(instr_len[idx], instr_pos[idx])));
|
||||
} else {
|
||||
match = new_text != NULL;
|
||||
|
||||
@ -220,7 +220,7 @@ int32_t ObExprLower::get_case_mutiply(const ObCollationType cs_type) const
|
||||
{
|
||||
int32_t mutiply_num = 0;
|
||||
if (OB_UNLIKELY(!ObCharset::is_valid_collation(cs_type))) {
|
||||
LOG_WARN("invalid charset", K(cs_type));
|
||||
LOG_WARN_RET(OB_INVALID_ARGUMENT, "invalid charset", K(cs_type));
|
||||
} else {
|
||||
mutiply_num = ObCharset::get_charset(cs_type)->casedn_multiply;
|
||||
}
|
||||
@ -245,7 +245,7 @@ int32_t ObExprUpper::get_case_mutiply(const ObCollationType cs_type) const
|
||||
{
|
||||
int32_t mutiply_num = 0;
|
||||
if (OB_UNLIKELY(!ObCharset::is_valid_collation(cs_type))) {
|
||||
LOG_WARN("invalid charset", K(cs_type));
|
||||
LOG_WARN_RET(OB_INVALID_ARGUMENT, "invalid charset", K(cs_type));
|
||||
} else {
|
||||
mutiply_num = ObCharset::get_charset(cs_type)->caseup_multiply;
|
||||
}
|
||||
@ -537,7 +537,7 @@ int32_t ObExprNlsLower::get_case_mutiply(const ObCollationType cs_type) const
|
||||
{
|
||||
int32_t mutiply_num = 0;
|
||||
if (OB_UNLIKELY(!ObCharset::is_valid_collation(cs_type))) {
|
||||
LOG_WARN("invalid charset", K(cs_type));
|
||||
LOG_WARN_RET(OB_INVALID_ARGUMENT, "invalid charset", K(cs_type));
|
||||
} else {
|
||||
mutiply_num = ObCharset::get_charset(cs_type)->casedn_multiply;
|
||||
}
|
||||
@ -579,7 +579,7 @@ int32_t ObExprNlsUpper::get_case_mutiply(const ObCollationType cs_type) const
|
||||
{
|
||||
int32_t mutiply_num = 0;
|
||||
if (OB_UNLIKELY(!ObCharset::is_valid_collation(cs_type))) {
|
||||
LOG_WARN("invalid charset", K(cs_type));
|
||||
LOG_WARN_RET(OB_INVALID_ARGUMENT, "invalid charset", K(cs_type));
|
||||
} else {
|
||||
mutiply_num = ObCharset::get_charset(cs_type)->casedn_multiply;
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ public:
|
||||
calc_meta_(calc_meta), max_length_(max_length), flag_(flag)
|
||||
{
|
||||
if (OB_UNLIKELY(calc_meta.get_type() >= common::ObMaxType)) {
|
||||
SQL_LOG(ERROR, "the wrong type");
|
||||
SQL_LOG_RET(ERROR, common::OB_ERR_UNEXPECTED, "the wrong type");
|
||||
}
|
||||
}
|
||||
virtual ~ObFuncInputType() {}
|
||||
@ -712,7 +712,7 @@ inline int ObExprOperator::calc_result_type0(ObExprResType &type,
|
||||
UNUSED(type);
|
||||
UNUSED(type_ctx);
|
||||
UNUSED(arg_arrs);
|
||||
SQL_LOG(WARN, "not implement");
|
||||
SQL_LOG_RET(WARN, common::OB_NOT_IMPLEMENT, "not implement");
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -725,7 +725,7 @@ inline int ObExprOperator::calc_result_type1(ObExprResType &type,
|
||||
UNUSED(type1);
|
||||
UNUSED(type_ctx);
|
||||
UNUSED(arg_arrs);
|
||||
SQL_LOG(WARN, "not implement");
|
||||
SQL_LOG_RET(WARN, common::OB_NOT_IMPLEMENT, "not implement");
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -740,7 +740,7 @@ inline int ObExprOperator::calc_result_type2(ObExprResType &type,
|
||||
UNUSED(type2);
|
||||
UNUSED(type_ctx);
|
||||
UNUSED(arg_arrs);
|
||||
SQL_LOG(WARN, "not implement");
|
||||
SQL_LOG_RET(WARN, common::OB_NOT_IMPLEMENT, "not implement");
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -757,7 +757,7 @@ inline int ObExprOperator::calc_result_type3(ObExprResType &type,
|
||||
UNUSED(type3);
|
||||
UNUSED(type_ctx);
|
||||
UNUSED(arg_arrs);
|
||||
SQL_LOG(WARN, "not implement");
|
||||
SQL_LOG_RET(WARN, common::OB_NOT_IMPLEMENT, "not implement");
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -772,7 +772,7 @@ inline int ObExprOperator::calc_result_typeN(ObExprResType &type,
|
||||
UNUSED(param_num);
|
||||
UNUSED(type_ctx);
|
||||
UNUSED(arg_arrs);
|
||||
SQL_LOG(ERROR, "not implement", K(type_), K(get_type_name(type_)));
|
||||
SQL_LOG_RET(ERROR, common::OB_NOT_IMPLEMENT, "not implement", K(type_), K(get_type_name(type_)));
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -781,7 +781,7 @@ inline int ObExprOperator::calc_result_type0(ObExprResType &type,
|
||||
{
|
||||
UNUSED(type);
|
||||
UNUSED(type_ctx);
|
||||
SQL_LOG(WARN, "not implement");
|
||||
SQL_LOG_RET(WARN, common::OB_NOT_IMPLEMENT, "not implement");
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -792,7 +792,7 @@ inline int ObExprOperator::calc_result_type1(ObExprResType &type,
|
||||
UNUSED(type);
|
||||
UNUSED(type1);
|
||||
UNUSED(type_ctx);
|
||||
SQL_LOG(WARN, "not implement");
|
||||
SQL_LOG_RET(WARN, common::OB_NOT_IMPLEMENT, "not implement");
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -805,7 +805,7 @@ inline int ObExprOperator::calc_result_type2(ObExprResType &type,
|
||||
UNUSED(type1);
|
||||
UNUSED(type2);
|
||||
UNUSED(type_ctx);
|
||||
SQL_LOG(WARN, "not implement");
|
||||
SQL_LOG_RET(WARN, common::OB_NOT_IMPLEMENT, "not implement");
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -820,7 +820,7 @@ inline int ObExprOperator::calc_result_type3(ObExprResType &type,
|
||||
UNUSED(type2);
|
||||
UNUSED(type3);
|
||||
UNUSED(type_ctx);
|
||||
SQL_LOG(WARN, "not implement");
|
||||
SQL_LOG_RET(WARN, common::OB_NOT_IMPLEMENT, "not implement");
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -833,7 +833,7 @@ inline int ObExprOperator::calc_result_typeN(ObExprResType &type,
|
||||
UNUSED(types);
|
||||
UNUSED(param_num);
|
||||
UNUSED(type_ctx);
|
||||
SQL_LOG(ERROR, "not implement", K(type_), K(get_type_name(type_)));
|
||||
SQL_LOG_RET(ERROR, common::OB_NOT_IMPLEMENT, "not implement", K(type_), K(get_type_name(type_)));
|
||||
return common::OB_NOT_IMPLEMENT;
|
||||
}
|
||||
|
||||
@ -945,7 +945,7 @@ inline void ObExprOperator::calc_result_flagN(ObExprResType &type,
|
||||
|
||||
bool not_null = true;
|
||||
if (OB_ISNULL(types) || OB_UNLIKELY(param_num < 0)) {
|
||||
SQL_LOG(ERROR, "null types or the wrong param_num");
|
||||
SQL_LOG_RET(ERROR, common::OB_INVALID_ARGUMENT, "null types or the wrong param_num");
|
||||
} else {
|
||||
for (int64_t i = 0; i < param_num; ++i) {
|
||||
if (!types[i].has_result_flag(NOT_NULL_FLAG)) {
|
||||
@ -2162,14 +2162,14 @@ private:
|
||||
if (lib::is_oracle_mode()) { \
|
||||
if (common::OB_SUCCESS != (expr_ctx).my_session_-> \
|
||||
get_collation_server(cast_coll_type)) { \
|
||||
SQL_LOG(ERROR, "fail to get server collation"); \
|
||||
SQL_LOG_RET(ERROR, common::OB_ERR_UNEXPECTED, "fail to get server collation"); \
|
||||
cast_coll_type = ObCharset::get_default_collation( \
|
||||
ObCharset::get_default_charset()); \
|
||||
} \
|
||||
} else if (lib::is_mysql_mode()) { \
|
||||
if (common::OB_SUCCESS != (expr_ctx).my_session_-> \
|
||||
get_collation_connection(cast_coll_type)) { \
|
||||
SQL_LOG(ERROR, "fail to get collation_connection, " \
|
||||
SQL_LOG_RET(ERROR, common::OB_ERR_UNEXPECTED, "fail to get collation_connection, " \
|
||||
"set it to default collation"); \
|
||||
cast_coll_type = ObCharset::get_default_collation( \
|
||||
ObCharset::get_default_charset()); \
|
||||
@ -2177,10 +2177,10 @@ private:
|
||||
} \
|
||||
if (common::OB_SUCCESS != ObSQLUtils::set_compatible_cast_mode( \
|
||||
(expr_ctx).my_session_, cp_cast_mode_)) { \
|
||||
SQL_LOG(ERROR, "fail to get compatible mode for cast_mode"); \
|
||||
SQL_LOG_RET(ERROR, common::OB_ERR_UNEXPECTED, "fail to get compatible mode for cast_mode"); \
|
||||
} \
|
||||
} else { \
|
||||
SQL_LOG(WARN, "session is null"); \
|
||||
SQL_LOG_RET(WARN, common::OB_ERR_UNEXPECTED, "session is null"); \
|
||||
cast_coll_type = ObCharset::get_system_collation(); \
|
||||
} \
|
||||
const ObDataTypeCastParams dtc_params = ObBasicSessionInfo::create_dtc_params((expr_ctx).my_session_);\
|
||||
|
||||
@ -396,7 +396,7 @@ static AllocFunc OP_ALLOC_ORCL[T_MAX_OP];
|
||||
[&]() { \
|
||||
OpClass op(alloc); \
|
||||
if (OB_UNLIKELY(i >= EXPR_OP_NUM)) { \
|
||||
LOG_ERROR("out of the max expr"); \
|
||||
LOG_ERROR_RET(common::OB_ERR_UNEXPECTED, "out of the max expr"); \
|
||||
} else { \
|
||||
NAME_TYPES[i].name_ = op.get_name(); \
|
||||
NAME_TYPES[i].type_ = op.get_type(); \
|
||||
@ -414,9 +414,9 @@ static AllocFunc OP_ALLOC_ORCL[T_MAX_OP];
|
||||
do { \
|
||||
[&]() { \
|
||||
if (OB_UNLIKELY((idx_mysql) >= EXPR_OP_NUM)) { \
|
||||
LOG_ERROR("out of the max expr"); \
|
||||
LOG_ERROR_RET(common::OB_ERR_UNEXPECTED, "out of the max expr"); \
|
||||
} else if (OB_ISNULL(OP_ALLOC[OriOpType])) { \
|
||||
LOG_ERROR("OriOp is not registered yet", K(OriOpType), K(NewOpType)); \
|
||||
LOG_ERROR_RET(common::OB_ERR_UNEXPECTED, "OriOp is not registered yet", K(OriOpType), K(NewOpType)); \
|
||||
} else { \
|
||||
NAME_TYPES[(idx_mysql)].name_ = NewOpName; \
|
||||
NAME_TYPES[(idx_mysql)].type_ = NewOpType; \
|
||||
@ -431,7 +431,7 @@ static AllocFunc OP_ALLOC_ORCL[T_MAX_OP];
|
||||
[&]() { \
|
||||
OpClass op(alloc); \
|
||||
if (OB_UNLIKELY(j >= EXPR_OP_NUM)) { \
|
||||
LOG_ERROR("out of the max expr"); \
|
||||
LOG_ERROR_RET(common::OB_ERR_UNEXPECTED, "out of the max expr"); \
|
||||
} else { \
|
||||
NAME_TYPES_ORCL[j].name_ = op.get_name(); \
|
||||
NAME_TYPES_ORCL[j].type_ = op.get_type(); \
|
||||
@ -447,9 +447,9 @@ static AllocFunc OP_ALLOC_ORCL[T_MAX_OP];
|
||||
do { \
|
||||
[&]() { \
|
||||
if (OB_UNLIKELY((idx_oracle) >= EXPR_OP_NUM)) { \
|
||||
LOG_ERROR("out of the max expr"); \
|
||||
LOG_ERROR_RET(common::OB_ERR_UNEXPECTED, "out of the max expr"); \
|
||||
} else if (OB_ISNULL(OP_ALLOC_ORCL[OriOpType])) { \
|
||||
LOG_ERROR("OriOp is not registered yet", K(OriOpType), K(NewOpType)); \
|
||||
LOG_ERROR_RET(common::OB_ERR_UNEXPECTED, "OriOp is not registered yet", K(OriOpType), K(NewOpType)); \
|
||||
} else { \
|
||||
NAME_TYPES_ORCL[(idx_oracle)].name_ = NewOpName; \
|
||||
NAME_TYPES_ORCL[(idx_oracle)].type_ = NewOpType; \
|
||||
|
||||
@ -33,7 +33,7 @@ struct MyIntegrityChecker3
|
||||
for (int tc1 = ObNullTC; tc1 < ObMaxTC; tc1++) {
|
||||
for (int tc2 = ObNullTC; tc2 < tc1; tc2++) {
|
||||
if (DIV_TYPE_PROMOTION[tc1][tc2] != DIV_TYPE_PROMOTION[tc2][tc1]) {
|
||||
LOG_ERROR("DIV_TYPE_PROMOTION is wrong", "ret", OB_ERR_UNEXPECTED,
|
||||
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "DIV_TYPE_PROMOTION is wrong", "ret", OB_ERR_UNEXPECTED,
|
||||
K(tc1), K(tc2),
|
||||
"tc1 => tc2", DIV_TYPE_PROMOTION[tc1][tc2],
|
||||
"tc2 => tc1", DIV_TYPE_PROMOTION[tc2][tc1]);
|
||||
|
||||
@ -153,7 +153,7 @@ void ObPostExprItem::set_op(ObIAllocator &alloc, const char *op_name, int32_t re
|
||||
{
|
||||
ObExprOperatorType type = ObExprOperatorFactory::get_type_by_name(ObString::make_string(op_name));
|
||||
if (T_INVALID == type) {
|
||||
LOG_ERROR("invaid op type", K(type));
|
||||
LOG_ERROR_RET(OB_INVALID_ARGUMENT, "invaid op type", K(type));
|
||||
right_to_die_or_duty_to_live();
|
||||
} else {
|
||||
ObExprOperator *op = NULL;
|
||||
@ -189,7 +189,7 @@ int64_t ObPostExprItem::to_string(char *buf, const int64_t buf_len) const
|
||||
if (IS_EXPR_OP(item_type_)) {
|
||||
J_OW(J_KV(N_OP, *get_expr_operator()));
|
||||
} else {
|
||||
LOG_WARN("unknown item", K_(item_type));
|
||||
LOG_WARN_RET(OB_ERR_UNEXPECTED, "unknown item", K_(item_type));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -274,7 +274,7 @@ DEFINE_GET_SERIALIZE_SIZE(ObPostExprItem)
|
||||
} else if (IS_EXPR_OP(item_type_)) {
|
||||
OB_UNIS_ADD_LEN(*v2_.op_);
|
||||
} else {
|
||||
LOG_ERROR("Unknown expr item to serialize", K_(item_type));
|
||||
LOG_ERROR_RET(OB_ERR_UNEXPECTED, "Unknown expr item to serialize", K_(item_type));
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user