fix bug replace into core in copy_datum_memory

This commit is contained in:
yishenglanlingzui
2022-11-14 05:11:24 +00:00
committed by wangzelin.wzl
parent 27eb478a81
commit 8aa5f18458
2 changed files with 16 additions and 17 deletions

View File

@ -64,14 +64,14 @@ int ObExprToOutfileRow::calc_result_typeN(ObExprResType &type,
types[PARAM_LINE].set_calc_type(ObVarcharType);
types[PARAM_LINE].set_calc_collation_type(types[PARAM_LINE].get_collation_type());
// closed_cht
types[PARAM_ENCLOSED].set_calc_type(ObVarcharType);
types[PARAM_ENCLOSED].set_calc_collation_type(types[PARAM_ENCLOSED].get_collation_type());
// is_optional
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_ESCAPED].set_calc_type(ObVarcharType);
types[PARAM_ESCAPED].set_calc_collation_type(types[PARAM_ESCAPED].get_collation_type());
}
types[PARAM_ESCAPED].set_calc_type(ObVarcharType);
types[PARAM_ESCAPED].set_calc_collation_type(types[PARAM_ESCAPED].get_collation_type());
}
return ret;
}
@ -181,9 +181,9 @@ int ObExprToOutfileRow::to_outfile_str(const ObExpr &expr, ObEvalCtx &ctx, ObDat
ObObj obj;
OZ(v.to_obj(obj, obj_meta, expr.args_[i]->obj_datum_map_));
OZ(print_field(buf, buf_len, pos, obj, *out_info));
// 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_));
// 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_));