to issue<54750206>:select udf donot open transaction if udf has no dml stmt

This commit is contained in:
hanr881
2024-02-19 13:46:54 +00:00
committed by ob-robot
parent b6cdfaef1c
commit eb4ce0dc71
7 changed files with 32 additions and 16 deletions

View File

@ -686,9 +686,8 @@ public:
res_map_rule_id_(common::OB_INVALID_ID),
res_map_rule_param_idx_(common::OB_INVALID_INDEX),
root_stmt_(NULL),
udf_has_select_stmt_(false),
has_pl_udf_(false),
optimizer_features_enable_version_(0)
optimizer_features_enable_version_(0),
udf_flag_(0)
{
}
TO_STRING_KV(N_PARAM_NUM, question_marks_count_,
@ -732,8 +731,7 @@ public:
res_map_rule_id_ = common::OB_INVALID_ID;
res_map_rule_param_idx_ = common::OB_INVALID_INDEX;
root_stmt_ = NULL;
udf_has_select_stmt_ = false;
has_pl_udf_ = false;
udf_flag_ = 0;
optimizer_features_enable_version_ = 0;
}
@ -817,9 +815,16 @@ public:
uint64_t res_map_rule_id_;
int64_t res_map_rule_param_idx_;
ObDMLStmt *root_stmt_;
bool udf_has_select_stmt_; // udf has select stmt, not contain other dml stmt
bool has_pl_udf_; // used to mark sql contain pl udf
uint64_t optimizer_features_enable_version_;
union {
int8_t udf_flag_;
struct {
int8_t has_pl_udf_ : 1; // used to mark sql contain pl udf
int8_t udf_has_select_stmt_ : 1; // udf has select stmt, not contain other dml stmt
int8_t udf_has_dml_stmt_ : 1; // udf has dml stmt
int8_t reserved_:5;
};
};
};
} /* ns sql*/
} /* ns oceanbase */