From 5f7f3b3133000900ad622e2931b966394ac6ab6e Mon Sep 17 00:00:00 2001 From: wangfeihuo Date: Tue, 15 Apr 2025 17:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9mysql=E7=9A=84unique=5Fchecks?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/gs_guc/cluster_guc.conf | 1 + src/common/backend/utils/misc/guc.cpp | 14 ++++++++++++++ src/include/knl/knl_guc/knl_session_attr_common.h | 1 + 3 files changed, 16 insertions(+) diff --git a/src/bin/gs_guc/cluster_guc.conf b/src/bin/gs_guc/cluster_guc.conf index e480e990f1..ea5f91cb24 100755 --- a/src/bin/gs_guc/cluster_guc.conf +++ b/src/bin/gs_guc/cluster_guc.conf @@ -594,6 +594,7 @@ enable_ustore|bool|0,0|NULL|Enable to create ustore table| enable_default_ustore_table|bool|0,0|NULL|Enable to create ustore table by default| enable_gtt_concurrent_truncate|bool|0,0|NULL|Enable concurrent truncate table for GTT| foreign_key_checks|bool|0,0|NULL|Enable foreign key check on insert, update or drop operation,only applicable to b-format db.| +unique_checks|bool|0,0|NULL|Enable unique check,only applicable to b-format db.| reserve_space_for_nullable_atts|bool|0,0|NULL|Enable reserve space for nullable attributes, only applicable to ustore| undo_space_limit_size|int|819200,17179869184|kB|Maximum physical space of the undo command| undo_limit_size_per_transaction|int|2048,17179869184|kB|Maximum space for allocating undo resources in a transaction| diff --git a/src/common/backend/utils/misc/guc.cpp b/src/common/backend/utils/misc/guc.cpp index f0653d8367..dcdec4b4df 100755 --- a/src/common/backend/utils/misc/guc.cpp +++ b/src/common/backend/utils/misc/guc.cpp @@ -2192,6 +2192,20 @@ static void InitConfigureNamesBool() NULL, NULL }, + {{"unique_checks", + PGC_USERSET, + NODE_ALL, + QUERY_TUNING, + gettext_noop("Enable unique check," + "only applicable to b-format db." + ), + NULL}, + &u_sess->attr.attr_common.unique_checks, + true, + NULL, + NULL, + NULL + }, {{"enable_dump_trigger_definer", PGC_USERSET, NODE_ALL, diff --git a/src/include/knl/knl_guc/knl_session_attr_common.h b/src/include/knl/knl_guc/knl_session_attr_common.h index a12c5c4ea3..de5d03e53b 100644 --- a/src/include/knl/knl_guc/knl_session_attr_common.h +++ b/src/include/knl/knl_guc/knl_session_attr_common.h @@ -253,6 +253,7 @@ typedef struct knl_session_attr_common { int time_record_level; bool enable_record_nettime; bool foreign_key_checks; + bool unique_checks; bool enable_dump_trigger_definer; #ifdef ENABLE_HTAP bool enable_parallel_populate; -- Gitee