[CP] add ObSqlBitSet init check when create ObRawExpr
This commit is contained in:
@ -321,6 +321,7 @@ public:
|
|||||||
int64_t bit_count() const { return static_cast<int64_t>(desc_.len_) * PER_BITSETWORD_BITS; }
|
int64_t bit_count() const { return static_cast<int64_t>(desc_.len_) * PER_BITSETWORD_BITS; }
|
||||||
bool is_empty() const { return 0 == num_members(); }
|
bool is_empty() const { return 0 == num_members(); }
|
||||||
bool is_valid() const { return desc_.inited_; }
|
bool is_valid() const { return desc_.inited_; }
|
||||||
|
int get_init_err() const { return desc_.inited_ ? OB_SUCCESS : desc_.init_errcode_; }
|
||||||
void clear_all()
|
void clear_all()
|
||||||
{
|
{
|
||||||
if (!is_valid()) {
|
if (!is_valid()) {
|
||||||
@ -4663,7 +4664,12 @@ public:
|
|||||||
raw_expr->set_allocator(allocator_);
|
raw_expr->set_allocator(allocator_);
|
||||||
raw_expr->set_expr_factory(*this);
|
raw_expr->set_expr_factory(*this);
|
||||||
raw_expr->set_expr_type(expr_type);
|
raw_expr->set_expr_type(expr_type);
|
||||||
if (OB_FAIL(expr_store_.store_obj(raw_expr))) {
|
if (OB_FAIL(raw_expr->get_expr_info().get_init_err()) ||
|
||||||
|
OB_FAIL(raw_expr->get_relation_ids().get_init_err())) {
|
||||||
|
SQL_RESV_LOG(WARN, "failed to init ObSqlBitSet", K(ret));
|
||||||
|
raw_expr->~ExprType();
|
||||||
|
raw_expr = NULL;
|
||||||
|
} else if (OB_FAIL(expr_store_.store_obj(raw_expr))) {
|
||||||
SQL_RESV_LOG(WARN, "store raw expr failed", K(ret));
|
SQL_RESV_LOG(WARN, "store raw expr failed", K(ret));
|
||||||
raw_expr->~ExprType();
|
raw_expr->~ExprType();
|
||||||
raw_expr = NULL;
|
raw_expr = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user