Fix forgot to switch status and errcode overwrite

This commit is contained in:
Hongqin-Li
2022-11-14 05:13:58 +00:00
committed by wangzelin.wzl
parent 8aa5f18458
commit 9875d0330c
3 changed files with 56 additions and 40 deletions

View File

@ -67,8 +67,8 @@ int ObExprToOutfileRow::calc_result_typeN(ObExprResType &type,
types[PARAM_ENCLOSED].set_calc_type(ObVarcharType);
types[PARAM_ENCLOSED].set_calc_collation_type(types[PARAM_ENCLOSED].get_collation_type());
// is_optional
types[PARAM_OPTIONAL].set_calc_type(ObTinyIntType);
// escaped_cht
types[PARAM_OPTIONAL].set_calc_type(ObTinyIntType);
// escaped_cht
types[PARAM_ESCAPED].set_calc_type(ObVarcharType);
types[PARAM_ESCAPED].set_calc_collation_type(types[PARAM_ESCAPED].get_collation_type());
}
@ -184,9 +184,9 @@ int ObExprToOutfileRow::to_outfile_str(const ObExpr &expr, ObEvalCtx &ctx, ObDat
// print field terminator
if (OB_SUCC(ret) && i != expr.arg_cnt_ - 1) {
OZ(out_info->field_.print_plain_str_literal(buf, buf_len, pos, out_info->print_params_));
}
}
OZ(out_info->line_.print_plain_str_literal(buf, buf_len, pos, out_info->print_params_));
}
}
OZ(out_info->line_.print_plain_str_literal(buf, buf_len, pos, out_info->print_params_));
if (OB_SUCC(ret)) {
char *res_buf = NULL;
if (OB_ISNULL(res_buf = expr.get_str_res_mem(ctx, pos))) {