fix create stmt loss err code
This commit is contained in:
@ -120,6 +120,7 @@ public:
|
|||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
SQL_RESV_LOG(WARN, "query ctx is null", K(ret));
|
SQL_RESV_LOG(WARN, "query ctx is null", K(ret));
|
||||||
} else if (OB_FAIL(params_.stmt_factory_->create_stmt(stmt))) {
|
} else if (OB_FAIL(params_.stmt_factory_->create_stmt(stmt))) {
|
||||||
|
stmt = NULL;
|
||||||
SQL_RESV_LOG(WARN, "create stmt failed", K(ret));
|
SQL_RESV_LOG(WARN, "create stmt failed", K(ret));
|
||||||
} else if (OB_ISNULL(stmt)) {
|
} else if (OB_ISNULL(stmt)) {
|
||||||
ret = common::OB_ERR_UNEXPECTED;
|
ret = common::OB_ERR_UNEXPECTED;
|
||||||
@ -128,10 +129,12 @@ public:
|
|||||||
stmt_ = stmt;
|
stmt_ = stmt;
|
||||||
stmt_->set_query_ctx(params_.query_ctx_);
|
stmt_->set_query_ctx(params_.query_ctx_);
|
||||||
//mark prepare stmt
|
//mark prepare stmt
|
||||||
stmt_->get_query_ctx()->set_is_prepare_stmt(params_.is_prepare_protocol_ && params_.is_prepare_stage_);
|
stmt_->get_query_ctx()->set_is_prepare_stmt(params_.is_prepare_protocol_ && params_.is_prepare_stage_);
|
||||||
stmt_->get_query_ctx()->set_timezone_info(get_timezone_info(params_.session_info_));
|
stmt_->get_query_ctx()->set_timezone_info(get_timezone_info(params_.session_info_));
|
||||||
stmt_->get_query_ctx()->set_sql_stmt_coll_type(get_obj_print_params(params_.session_info_).cs_type_);
|
stmt_->get_query_ctx()->set_sql_stmt_coll_type(get_obj_print_params(params_.session_info_).cs_type_);
|
||||||
if (OB_FAIL(stmt_->set_stmt_id())) {
|
if (OB_FAIL(stmt_->set_stmt_id())) {
|
||||||
|
stmt = NULL;
|
||||||
|
stmt_ = NULL;
|
||||||
SQL_RESV_LOG(WARN, "fail to set stmt id", K(ret));
|
SQL_RESV_LOG(WARN, "fail to set stmt id", K(ret));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user