From be9c6071df21efea7f268af4be2b02c00e5a2cda Mon Sep 17 00:00:00 2001 From: doubleMocha <1085615789@qq.com> Date: Tue, 11 Mar 2025 10:46:09 +0000 Subject: [PATCH] [diagnosis] add placeholder for diagnosis --- src/objit/include/objit/common/ob_item_type.h | 2 +- src/sql/engine/ob_physical_plan_ctx.cpp | 6 +++++- src/sql/engine/ob_physical_plan_ctx.h | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/objit/include/objit/common/ob_item_type.h b/src/objit/include/objit/common/ob_item_type.h index 12a8eea71d..a6f6471d2c 100644 --- a/src/objit/include/objit/common/ob_item_type.h +++ b/src/objit/include/objit/common/ob_item_type.h @@ -2788,7 +2788,7 @@ typedef enum ObItemType // optimizer hint T_PUSH_SUBQ = 4823, T_NO_PUSH_SUBQ = 4824, - + T_ON_ERROR = 4825, T_MAX //Attention: add a new type before T_MAX } ObItemType; diff --git a/src/sql/engine/ob_physical_plan_ctx.cpp b/src/sql/engine/ob_physical_plan_ctx.cpp index 20b7be43ab..46b066397f 100644 --- a/src/sql/engine/ob_physical_plan_ctx.cpp +++ b/src/sql/engine/ob_physical_plan_ctx.cpp @@ -117,7 +117,8 @@ ObPhysicalPlanCtx::ObPhysicalPlanCtx(common::ObIAllocator &allocator) total_memstore_read_row_count_(0), total_ssstore_read_row_count_(0), is_direct_insert_plan_(false), - check_pdml_affected_rows_(false) + check_pdml_affected_rows_(false), + is_diagnosis_(false) { } @@ -789,6 +790,7 @@ OB_DEF_SERIALIZE(ObPhysicalPlanCtx) OB_UNIS_ENCODE(last_refresh_scns_); OB_UNIS_ENCODE(is_direct_insert_plan_); OB_UNIS_ENCODE(check_pdml_affected_rows_); + OB_UNIS_ENCODE(is_diagnosis_); return ret; } @@ -890,6 +892,7 @@ OB_DEF_SERIALIZE_SIZE(ObPhysicalPlanCtx) OB_UNIS_ADD_LEN(last_refresh_scns_); OB_UNIS_ADD_LEN(is_direct_insert_plan_); OB_UNIS_ADD_LEN(check_pdml_affected_rows_); + OB_UNIS_ADD_LEN(is_diagnosis_); return len; } @@ -1016,6 +1019,7 @@ OB_DEF_DESERIALIZE(ObPhysicalPlanCtx) OB_UNIS_DECODE(last_refresh_scns_); OB_UNIS_DECODE(is_direct_insert_plan_); OB_UNIS_DECODE(check_pdml_affected_rows_); + OB_UNIS_DECODE(is_diagnosis_); return ret; } diff --git a/src/sql/engine/ob_physical_plan_ctx.h b/src/sql/engine/ob_physical_plan_ctx.h index 55725f93c4..a3bc118d5e 100644 --- a/src/sql/engine/ob_physical_plan_ctx.h +++ b/src/sql/engine/ob_physical_plan_ctx.h @@ -444,6 +444,8 @@ public: bool is_error_ignored() const { return is_error_ignored_; } void set_select_into(bool is_select_into) { is_select_into_ = is_select_into; } bool is_select_into() const { return is_select_into_; } + void set_diagnosis(bool is_diagnosis) { is_diagnosis_ = is_diagnosis; } + bool is_diagnosis() const { return is_diagnosis_; } void set_is_result_accurate(bool is_accurate) { is_result_accurate_ = is_accurate; } bool is_result_accurate() const { return is_result_accurate_; } void set_foreign_key_checks(bool foreign_key_checks) { foreign_key_checks_ = foreign_key_checks; } @@ -711,6 +713,7 @@ private: int64_t total_ssstore_read_row_count_; bool is_direct_insert_plan_; // for direct load: insert into/overwrite select bool check_pdml_affected_rows_; // now only worked for pdml checking affected_rows + bool is_diagnosis_; }; }