[CP] Fix: fix the bug of not init the collation level for random_bytes function

This commit is contained in:
obdev
2022-12-15 04:11:38 +00:00
committed by ob-robot
parent 7f9e6c3b0b
commit 7ace1e4b05

View File

@ -42,6 +42,7 @@ int ObExprRandomBytes::calc_result_type1(ObExprResType &type,
static const int64_t MAX_RAND_BYTES = 1024; static const int64_t MAX_RAND_BYTES = 1024;
type.set_varbinary(); type.set_varbinary();
type.set_collation_type(CS_TYPE_BINARY); type.set_collation_type(CS_TYPE_BINARY);
type.set_collation_level(CS_LEVEL_COERCIBLE);
type.set_length(MAX_RAND_BYTES); type.set_length(MAX_RAND_BYTES);
return ret; return ret;
} }