reset spm ctx before batched multi stmt fallback to execute one by one

This commit is contained in:
obdev
2023-02-09 17:10:53 +00:00
committed by ob-robot
parent 7edc366131
commit 65769df1a6
3 changed files with 3 additions and 0 deletions

View File

@ -498,6 +498,7 @@ int ObMPQuery::process_single_stmt(const ObMultiStmtItem &multi_stmt_item,
{
int ret = OB_SUCCESS;
FLTSpanGuard(mpquery_single_stmt);
ctx_.spm_ctx_.reset();
bool need_response_error = true;
const bool enable_trace_log = lib::is_trace_log_enabled();
session.get_raw_audit_record().request_memory_used_ = 0;

View File

@ -416,6 +416,7 @@ struct ObSpmCacheCtx
ObSpmCacheCtx()
: bl_key_()
{}
inline void reset() { bl_key_.reset(); }
ObBaselineKey bl_key_;
};

View File

@ -297,6 +297,7 @@ struct ObSpmCacheCtx : public ObILibCacheCtx
BASELINE_PLAN,
MAX_TYPE
};
void reset();
void set_get_normal_mode(uint64_t v) { plan_hash_value_ = v; handle_cache_mode_ = MODE_GET_NORMAL; }
void set_get_offset_mode() { handle_cache_mode_ = MODE_GET_OFFSET; }
void set_get_for_update_mode(uint64_t v) { plan_hash_value_ = v; handle_cache_mode_ = MODE_GET_FOR_UPDATE; }