[CP] [to #50196630]fix bug select for update in PL dyamic sql
This commit is contained in:
@ -2644,10 +2644,14 @@ int ObSPIService::spi_execute_immediate(ObPLExecCtx *ctx,
|
|||||||
OX (retry_ctrl.set_sys_local_schema_version(sys_version));
|
OX (retry_ctrl.set_sys_local_schema_version(sys_version));
|
||||||
OX (spi_result.get_sql_ctx().schema_guard_ = &spi_result.get_scheme_guard());
|
OX (spi_result.get_sql_ctx().schema_guard_ = &spi_result.get_scheme_guard());
|
||||||
|
|
||||||
|
bool old_client_return_rowid = session->is_client_return_rowid();
|
||||||
bool is_inner_session = session->is_inner();
|
bool is_inner_session = session->is_inner();
|
||||||
ObSQLSessionInfo::SessionType old_session_type = session->get_session_type();
|
ObSQLSessionInfo::SessionType old_session_type = session->get_session_type();
|
||||||
!is_inner_session ? session->set_inner_session() : (void)NULL;
|
!is_inner_session ? session->set_inner_session() : (void)NULL;
|
||||||
session->set_session_type(ObSQLSessionInfo::USER_SESSION);
|
session->set_session_type(ObSQLSessionInfo::USER_SESSION);
|
||||||
|
if (NULL != ctx->pl_ctx_) {
|
||||||
|
session->set_client_return_rowid(false);
|
||||||
|
}
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
WITH_CONTEXT(spi_result.get_memory_ctx()) {
|
WITH_CONTEXT(spi_result.get_memory_ctx()) {
|
||||||
if (OB_FAIL(ret)) {
|
if (OB_FAIL(ret)) {
|
||||||
@ -2696,6 +2700,7 @@ int ObSPIService::spi_execute_immediate(ObPLExecCtx *ctx,
|
|||||||
// todo:@hr351303 确认session标记是否还需要
|
// todo:@hr351303 确认session标记是否还需要
|
||||||
!is_inner_session ? session->set_user_session() : (void)NULL;
|
!is_inner_session ? session->set_user_session() : (void)NULL;
|
||||||
session->set_session_type(old_session_type);
|
session->set_session_type(old_session_type);
|
||||||
|
session->set_client_return_rowid(old_client_return_rowid);
|
||||||
LOG_TRACE("execute dynamic sql", K(ret), K(sql), K(sql_str), K(ps_sql));
|
LOG_TRACE("execute dynamic sql", K(ret), K(sql), K(sql_str), K(ps_sql));
|
||||||
|
|
||||||
int64_t row_count = 0;
|
int64_t row_count = 0;
|
||||||
|
|||||||
@ -87,7 +87,7 @@ bool ObMdsTableMergeDag::operator==(const share::ObIDag &other) const
|
|||||||
is_same = false;
|
is_same = false;
|
||||||
} else {
|
} else {
|
||||||
const ObMdsTableMergeDag &other_dag = static_cast<const ObMdsTableMergeDag&>(other);
|
const ObMdsTableMergeDag &other_dag = static_cast<const ObMdsTableMergeDag&>(other);
|
||||||
is_same = (param_ == other_dag.param_);
|
is_same = (param_.ls_id_ == other_dag.param_.ls_id_ && param_.tablet_id_ == other_dag.param_.tablet_id_);
|
||||||
}
|
}
|
||||||
|
|
||||||
return is_same;
|
return is_same;
|
||||||
|
|||||||
Reference in New Issue
Block a user