Fix the memory leak bug of VectorHeader to_string
This commit is contained in:
parent
33600ef896
commit
2e35ef4490
@ -1350,9 +1350,9 @@ int ToStrVectorHeader::to_string_helper(char *buf, const int64_t buf_len) const
|
|||||||
ObLength length = vector->get_length(i);
|
ObLength length = vector->get_length(i);
|
||||||
BUF_PRINTF(", len: %d, ptr: %p, hex: ", length, vector->get_payload(i));
|
BUF_PRINTF(", len: %d, ptr: %p, hex: ", length, vector->get_payload(i));
|
||||||
hex_print(vector->get_payload(i), length, buf, buf_len, pos);
|
hex_print(vector->get_payload(i), length, buf, buf_len, pos);
|
||||||
|
ObDatum tmp_datum(vector->get_payload(i), length, vector->is_null(i));
|
||||||
ObObj tmp_obj;
|
ObObj tmp_obj;
|
||||||
ObDatum* tmp_datum = new ObDatum(vector->get_payload(i), length, vector->is_null(i));
|
if (OB_SUCCESS == tmp_datum.to_obj(tmp_obj, expr_.obj_meta_, expr_.obj_datum_map_)) {
|
||||||
if (OB_SUCCESS == tmp_datum->to_obj(tmp_obj, expr_.obj_meta_, expr_.obj_datum_map_)) {
|
|
||||||
BUF_PRINTF(", value: ");
|
BUF_PRINTF(", value: ");
|
||||||
pos += tmp_obj.to_string(buf + pos, buf_len - pos);
|
pos += tmp_obj.to_string(buf + pos, buf_len - pos);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user