Fix some prepared statement bug

This commit is contained in:
obdev
2023-05-17 14:22:00 +00:00
committed by ob-robot
parent 088e14bdc0
commit e556c2117c
4 changed files with 26 additions and 21 deletions

View File

@ -78,6 +78,8 @@ int ObExprLeft::calc_result_type2(ObExprResType &type,
} else if (exec_ctx->is_ps_prepare_stage()) {
// the ps prepare stage does not do type deduction, and directly gives a default type.
type.set_char();
type.set_default_collation_type();
type.set_collation_level(CS_LEVEL_IMPLICIT);
type.set_length(0);
} else {
type2.set_calc_type(ObIntType);