Placeholder for error code, item type and system variable
This commit is contained in:
@ -115,6 +115,9 @@ enum ObSysVarClassType
|
||||
SYS_VAR_LOG_BIN = 91,
|
||||
SYS_VAR_SERVER_UUID = 92,
|
||||
SYS_VAR_DEFAULT_STORAGE_ENGINE = 93,
|
||||
SYS_VAR_CTE_MAX_RECURSION_DEPTH = 94,
|
||||
SYS_VAR_REGEXP_STACK_LIMIT = 95,
|
||||
SYS_VAR_REGEXP_TIME_LIMIT = 96,
|
||||
SYS_VAR_OB_INTERM_RESULT_MEM_LIMIT = 10001,
|
||||
SYS_VAR_OB_PROXY_PARTITION_HIT = 10002,
|
||||
SYS_VAR_OB_LOG_LEVEL = 10003,
|
||||
@ -236,6 +239,7 @@ enum ObSysVarClassType
|
||||
SYS_VAR_INNODB_STRICT_MODE = 10132,
|
||||
SYS_VAR__WINDOWFUNC_OPTIMIZATION_SETTINGS = 10133,
|
||||
SYS_VAR_OB_ENABLE_RICH_ERROR_MSG = 10134,
|
||||
SYS_VAR_OB_SQL_PLAN_MEMORY_PERCENTAGE = 10135,
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -110,6 +110,9 @@ namespace share
|
||||
static const char* const OB_SV_LOG_BIN = "log_bin";
|
||||
static const char* const OB_SV_SERVER_UUID = "server_uuid";
|
||||
static const char* const OB_SV_DEFAULT_STORAGE_ENGINE = "default_storage_engine";
|
||||
static const char* const OB_SV_CTE_MAX_RECURSION_DEPTH = "cte_max_recursion_depth";
|
||||
static const char* const OB_SV_REGEXP_STACK_LIMIT = "regexp_stack_limit";
|
||||
static const char* const OB_SV_REGEXP_TIME_LIMIT = "regexp_time_limit";
|
||||
static const char* const OB_SV_INTERM_RESULT_MEM_LIMIT = "ob_interm_result_mem_limit";
|
||||
static const char* const OB_SV_PROXY_PARTITION_HIT = "ob_proxy_partition_hit";
|
||||
static const char* const OB_SV_LOG_LEVEL = "ob_log_level";
|
||||
@ -231,6 +234,7 @@ namespace share
|
||||
static const char* const OB_SV_INNODB_STRICT_MODE = "innodb_strict_mode";
|
||||
static const char* const OB_SV__WINDOWFUNC_OPTIMIZATION_SETTINGS = "_windowfunc_optimization_settings";
|
||||
static const char* const OB_SV_ENABLE_RICH_ERROR_MSG = "ob_enable_rich_error_msg";
|
||||
static const char* const OB_SV_SQL_PLAN_MEMORY_PERCENTAGE = "ob_sql_plan_memory_percentage";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,6 +166,7 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME[] = {
|
||||
"collation_server",
|
||||
"concurrent_insert",
|
||||
"connect_timeout",
|
||||
"cte_max_recursion_depth",
|
||||
"cursor_sharing",
|
||||
"datadir",
|
||||
"debug_sync",
|
||||
@ -257,6 +258,7 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME[] = {
|
||||
"ob_route_policy",
|
||||
"ob_safe_weak_read_snapshot",
|
||||
"ob_sql_audit_percentage",
|
||||
"ob_sql_plan_memory_percentage",
|
||||
"ob_sql_work_area_percentage",
|
||||
"ob_statement_trace_id",
|
||||
"ob_tcp_invited_nodes",
|
||||
@ -280,6 +282,8 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_NAME[] = {
|
||||
"query_cache_wlock_invalidate",
|
||||
"read_only",
|
||||
"recyclebin",
|
||||
"regexp_stack_limit",
|
||||
"regexp_time_limit",
|
||||
"resource_manager_plan",
|
||||
"secure_file_priv",
|
||||
"server_id",
|
||||
@ -384,6 +388,7 @@ const ObSysVarClassType ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[] = {
|
||||
SYS_VAR_COLLATION_SERVER,
|
||||
SYS_VAR_CONCURRENT_INSERT,
|
||||
SYS_VAR_CONNECT_TIMEOUT,
|
||||
SYS_VAR_CTE_MAX_RECURSION_DEPTH,
|
||||
SYS_VAR_CURSOR_SHARING,
|
||||
SYS_VAR_DATADIR,
|
||||
SYS_VAR_DEBUG_SYNC,
|
||||
@ -475,6 +480,7 @@ const ObSysVarClassType ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[] = {
|
||||
SYS_VAR_OB_ROUTE_POLICY,
|
||||
SYS_VAR_OB_SAFE_WEAK_READ_SNAPSHOT,
|
||||
SYS_VAR_OB_SQL_AUDIT_PERCENTAGE,
|
||||
SYS_VAR_OB_SQL_PLAN_MEMORY_PERCENTAGE,
|
||||
SYS_VAR_OB_SQL_WORK_AREA_PERCENTAGE,
|
||||
SYS_VAR_OB_STATEMENT_TRACE_ID,
|
||||
SYS_VAR_OB_TCP_INVITED_NODES,
|
||||
@ -498,6 +504,8 @@ const ObSysVarClassType ObSysVarFactory::SYS_VAR_IDS_SORTED_BY_NAME[] = {
|
||||
SYS_VAR_QUERY_CACHE_WLOCK_INVALIDATE,
|
||||
SYS_VAR_READ_ONLY,
|
||||
SYS_VAR_RECYCLEBIN,
|
||||
SYS_VAR_REGEXP_STACK_LIMIT,
|
||||
SYS_VAR_REGEXP_TIME_LIMIT,
|
||||
SYS_VAR_RESOURCE_MANAGER_PLAN,
|
||||
SYS_VAR_SECURE_FILE_PRIV,
|
||||
SYS_VAR_SERVER_ID,
|
||||
@ -648,6 +656,9 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_ID[] = {
|
||||
"log_bin",
|
||||
"server_uuid",
|
||||
"default_storage_engine",
|
||||
"cte_max_recursion_depth",
|
||||
"regexp_stack_limit",
|
||||
"regexp_time_limit",
|
||||
"ob_interm_result_mem_limit",
|
||||
"ob_proxy_partition_hit",
|
||||
"ob_log_level",
|
||||
@ -768,7 +779,8 @@ const char *ObSysVarFactory::SYS_VAR_NAMES_SORTED_BY_ID[] = {
|
||||
"sql_notes",
|
||||
"innodb_strict_mode",
|
||||
"_windowfunc_optimization_settings",
|
||||
"ob_enable_rich_error_msg"
|
||||
"ob_enable_rich_error_msg",
|
||||
"ob_sql_plan_memory_percentage"
|
||||
};
|
||||
|
||||
bool ObSysVarFactory::sys_var_name_case_cmp(const char *name1, const ObString &name2)
|
||||
@ -1030,6 +1042,9 @@ int ObSysVarFactory::create_all_sys_vars()
|
||||
+ sizeof(ObSysVarLogBin)
|
||||
+ sizeof(ObSysVarServerUuid)
|
||||
+ sizeof(ObSysVarDefaultStorageEngine)
|
||||
+ sizeof(ObSysVarCteMaxRecursionDepth)
|
||||
+ sizeof(ObSysVarRegexpStackLimit)
|
||||
+ sizeof(ObSysVarRegexpTimeLimit)
|
||||
+ sizeof(ObSysVarObIntermResultMemLimit)
|
||||
+ sizeof(ObSysVarObProxyPartitionHit)
|
||||
+ sizeof(ObSysVarObLogLevel)
|
||||
@ -1151,6 +1166,7 @@ int ObSysVarFactory::create_all_sys_vars()
|
||||
+ sizeof(ObSysVarInnodbStrictMode)
|
||||
+ sizeof(ObSysVarWindowfuncOptimizationSettings)
|
||||
+ sizeof(ObSysVarObEnableRichErrorMsg)
|
||||
+ sizeof(ObSysVarObSqlPlanMemoryPercentage)
|
||||
;
|
||||
void *ptr = NULL;
|
||||
if (OB_ISNULL(ptr = allocator_.alloc(total_mem_size))) {
|
||||
@ -2005,6 +2021,33 @@ int ObSysVarFactory::create_all_sys_vars()
|
||||
ptr = (void *)((char *)ptr + sizeof(ObSysVarDefaultStorageEngine));
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarCteMaxRecursionDepth())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarCteMaxRecursionDepth", K(ret));
|
||||
} else {
|
||||
store_buf_[ObSysVarsToIdxMap::get_store_idx(static_cast<int64_t>(SYS_VAR_CTE_MAX_RECURSION_DEPTH))] = sys_var_ptr;
|
||||
ptr = (void *)((char *)ptr + sizeof(ObSysVarCteMaxRecursionDepth));
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarRegexpStackLimit())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarRegexpStackLimit", K(ret));
|
||||
} else {
|
||||
store_buf_[ObSysVarsToIdxMap::get_store_idx(static_cast<int64_t>(SYS_VAR_REGEXP_STACK_LIMIT))] = sys_var_ptr;
|
||||
ptr = (void *)((char *)ptr + sizeof(ObSysVarRegexpStackLimit));
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarRegexpTimeLimit())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarRegexpTimeLimit", K(ret));
|
||||
} else {
|
||||
store_buf_[ObSysVarsToIdxMap::get_store_idx(static_cast<int64_t>(SYS_VAR_REGEXP_TIME_LIMIT))] = sys_var_ptr;
|
||||
ptr = (void *)((char *)ptr + sizeof(ObSysVarRegexpTimeLimit));
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarObIntermResultMemLimit())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
@ -3094,6 +3137,15 @@ int ObSysVarFactory::create_all_sys_vars()
|
||||
ptr = (void *)((char *)ptr + sizeof(ObSysVarObEnableRichErrorMsg));
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarObSqlPlanMemoryPercentage())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarObSqlPlanMemoryPercentage", K(ret));
|
||||
} else {
|
||||
store_buf_[ObSysVarsToIdxMap::get_store_idx(static_cast<int64_t>(SYS_VAR_OB_SQL_PLAN_MEMORY_PERCENTAGE))] = sys_var_ptr;
|
||||
ptr = (void *)((char *)ptr + sizeof(ObSysVarObSqlPlanMemoryPercentage));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return ret;
|
||||
@ -4154,6 +4206,39 @@ int ObSysVarFactory::create_sys_var(ObSysVarClassType sys_var_id, ObBasicSysVar
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SYS_VAR_CTE_MAX_RECURSION_DEPTH: {
|
||||
void *ptr = NULL;
|
||||
if (OB_ISNULL(ptr = allocator_.alloc(sizeof(ObSysVarCteMaxRecursionDepth)))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to alloc memory", K(ret), K(sizeof(ObSysVarCteMaxRecursionDepth)));
|
||||
} else if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarCteMaxRecursionDepth())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarCteMaxRecursionDepth", K(ret));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SYS_VAR_REGEXP_STACK_LIMIT: {
|
||||
void *ptr = NULL;
|
||||
if (OB_ISNULL(ptr = allocator_.alloc(sizeof(ObSysVarRegexpStackLimit)))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to alloc memory", K(ret), K(sizeof(ObSysVarRegexpStackLimit)));
|
||||
} else if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarRegexpStackLimit())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarRegexpStackLimit", K(ret));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SYS_VAR_REGEXP_TIME_LIMIT: {
|
||||
void *ptr = NULL;
|
||||
if (OB_ISNULL(ptr = allocator_.alloc(sizeof(ObSysVarRegexpTimeLimit)))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to alloc memory", K(ret), K(sizeof(ObSysVarRegexpTimeLimit)));
|
||||
} else if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarRegexpTimeLimit())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarRegexpTimeLimit", K(ret));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SYS_VAR_OB_INTERM_RESULT_MEM_LIMIT: {
|
||||
void *ptr = NULL;
|
||||
if (OB_ISNULL(ptr = allocator_.alloc(sizeof(ObSysVarObIntermResultMemLimit)))) {
|
||||
@ -5485,6 +5570,17 @@ int ObSysVarFactory::create_sys_var(ObSysVarClassType sys_var_id, ObBasicSysVar
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SYS_VAR_OB_SQL_PLAN_MEMORY_PERCENTAGE: {
|
||||
void *ptr = NULL;
|
||||
if (OB_ISNULL(ptr = allocator_.alloc(sizeof(ObSysVarObSqlPlanMemoryPercentage)))) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to alloc memory", K(ret), K(sizeof(ObSysVarObSqlPlanMemoryPercentage)));
|
||||
} else if (OB_ISNULL(sys_var_ptr = new (ptr)ObSysVarObSqlPlanMemoryPercentage())) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
LOG_ERROR("fail to new ObSysVarObSqlPlanMemoryPercentage", K(ret));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1265,6 +1265,48 @@
|
||||
"background_cn": "",
|
||||
"ref_url": ""
|
||||
},
|
||||
"cte_max_recursion_depth": {
|
||||
"id": 94,
|
||||
"name": "cte_max_recursion_depth",
|
||||
"value": "1000",
|
||||
"data_type": "uint",
|
||||
"info": "Abort a recursive common table expression if it does more than this number of iterations.",
|
||||
"flags": "GLOBAL | SESSION | MYSQL_ONLY",
|
||||
"min_val": "0",
|
||||
"max_val": "4294967295",
|
||||
"publish_version": "400",
|
||||
"info_cn": "",
|
||||
"background_cn": "",
|
||||
"ref_url": "https://aone.alibaba-inc.com/task/45803397"
|
||||
},
|
||||
"regexp_stack_limit": {
|
||||
"id": 95,
|
||||
"name": "regexp_stack_limit",
|
||||
"value": "8000000",
|
||||
"data_type": "int",
|
||||
"info": "The maximum available memory in bytes for the internal stack used for regular expression matching operations",
|
||||
"flags": "GLOBAL",
|
||||
"min_val": "0",
|
||||
"max_val": "2147483647",
|
||||
"publish_version": "410",
|
||||
"info_cn": "",
|
||||
"background_cn": "",
|
||||
"ref_url": ""
|
||||
},
|
||||
"regexp_time_limit": {
|
||||
"id": 96,
|
||||
"name": "regexp_time_limit",
|
||||
"value": "32",
|
||||
"data_type": "int",
|
||||
"info": "The time limit for regular expression matching operations, default unit is milliseconds",
|
||||
"flags": "GLOBAL",
|
||||
"min_val": "0",
|
||||
"max_val": "2147483647",
|
||||
"publish_version": "410",
|
||||
"info_cn": "",
|
||||
"background_cn": "",
|
||||
"ref_url": ""
|
||||
},
|
||||
"ob_interm_result_mem_limit": {
|
||||
"id": 10001,
|
||||
"name": "ob_interm_result_mem_limit",
|
||||
@ -2852,5 +2894,19 @@
|
||||
"info_cn": "",
|
||||
"background_cn": "",
|
||||
"ref_url": "https://yuque.antfin-inc.com/ob/product_functionality_review/zst4cy"
|
||||
},
|
||||
"ob_sql_plan_memory_percentage": {
|
||||
"id": 10135,
|
||||
"name": "ob_sql_plan_memory_percentage",
|
||||
"value": "5",
|
||||
"data_type": "int",
|
||||
"info": "The limited percentage of tenant memory for sql plan",
|
||||
"flags": "GLOBAL | NEED_SERIALIZE",
|
||||
"min_val": "0",
|
||||
"max_val": "80",
|
||||
"publish_version": "",
|
||||
"info_cn": "",
|
||||
"background_cn": "",
|
||||
"ref_url": ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user