ObBasicSessionInfo master placeholder

This commit is contained in:
shadowao 2023-11-14 09:10:36 +00:00 committed by ob-robot
parent f30d7b163a
commit d0a66f4900
2 changed files with 34 additions and 2 deletions

View File

@ -2661,6 +2661,12 @@ OB_INLINE int ObBasicSessionInfo::process_session_variable(ObSysVarClassType var
}
break;
}
case SYS_VAR_OB_DEFAULT_LOB_INROW_THRESHOLD: {
int64_t int_val = 0;
OZ (val.get_int(int_val), val);
OX (sys_vars_cache_.set_default_lob_inrow_threshold(int_val));
break;
}
default: {
//do nothing
}
@ -3094,6 +3100,12 @@ int ObBasicSessionInfo::fill_sys_vars_cache_base_value(
OX (sys_vars_cache.set_base_runtime_bloom_filter_max_size(int_val));
break;
}
case SYS_VAR_OB_DEFAULT_LOB_INROW_THRESHOLD: {
int64_t int_val = 0;
OZ (val.get_int(int_val), val);
OX (sys_vars_cache.set_base_default_lob_inrow_threshold(int_val));
break;
}
default: {
//do nothing
}

View File

@ -456,6 +456,7 @@ public:
inline const ObString &get_plsql_ccflags() const;
inline const ObString &get_iso_nls_currency() const;
inline const ObString &get_log_row_value_option() const;
int64_t get_default_lob_inrow_threshold() const;
bool get_local_autocommit() const;
uint64_t get_local_auto_increment_increment() const;
uint64_t get_local_auto_increment_offset() const;
@ -1518,6 +1519,7 @@ public:
iso_nls_currency_(),
ob_pl_block_timeout_(0),
log_row_value_option_(),
default_lob_inrow_threshold_(OB_DEFAULT_LOB_INROW_THRESHOLD),
autocommit_(false),
ob_enable_trace_log_(false),
ob_enable_sql_audit_(false),
@ -1600,6 +1602,7 @@ public:
runtime_filter_max_in_num_ = 0;
runtime_bloom_filter_max_size_ = INT32_MAX;
ncharacter_set_connection_ = ObCharsetType::CHARSET_INVALID;
default_lob_inrow_threshold_ = OB_DEFAULT_LOB_INROW_THRESHOLD;
}
inline bool operator==(const SysVarsCacheData &other) const {
@ -1643,7 +1646,8 @@ public:
ob_plsql_ccflags_ == other.ob_plsql_ccflags_ &&
log_row_value_option_ == other.log_row_value_option_ &&
ob_max_read_stale_time_ == other.ob_max_read_stale_time_ &&
ncharacter_set_connection_ == other.ncharacter_set_connection_;
ncharacter_set_connection_ == other.ncharacter_set_connection_ &&
default_lob_inrow_threshold_ == other.default_lob_inrow_threshold_;
bool equal2 = true;
for (int64_t i = 0; i < ObNLSFormatEnum::NLS_MAX; ++i) {
if (nls_formats_[i] != other.nls_formats_[i]) {
@ -1739,10 +1743,18 @@ public:
log_row_value_option_.assign_ptr(log_row_value_option_buf_, option.length());
}
}
void set_default_lob_inrow_threshold(const int64_t default_lob_inrow_threshold)
{
default_lob_inrow_threshold_ = default_lob_inrow_threshold;
}
const common::ObString &get_log_row_value_option() const
{
return log_row_value_option_;
}
int64_t get_default_lob_inrow_threshold() const
{
return default_lob_inrow_threshold_;
}
TO_STRING_KV(K(autocommit_), K(ob_enable_trace_log_), K(ob_enable_sql_audit_), K(nls_length_semantics_),
K(ob_org_cluster_id_), K(ob_query_timeout_), K(ob_trx_timeout_), K(collation_connection_),
@ -1752,7 +1764,7 @@ public:
K_(optimizer_use_sql_plan_baselines), K_(optimizer_capture_sql_plan_baselines),
K_(is_result_accurate), K_(character_set_results),
K_(character_set_connection), K_(ob_pl_block_timeout), K_(ob_plsql_ccflags),
K_(iso_nls_currency), K_(log_row_value_option), K_(ob_max_read_stale_time));
K_(iso_nls_currency), K_(log_row_value_option), K_(ob_max_read_stale_time), K_(default_lob_inrow_threshold));
public:
static const int64_t MAX_NLS_FORMAT_STR_LEN = 256;
@ -1786,6 +1798,7 @@ public:
common::ObString log_row_value_option_;
char log_row_value_option_buf_[OB_TMP_BUF_SIZE_256];
int64_t default_lob_inrow_threshold_;
//========== 需要序列化 ============
bool autocommit_;
@ -1925,6 +1938,7 @@ private:
DEF_SYS_VAR_CACHE_FUNCS(int64_t, runtime_filter_max_in_num);
DEF_SYS_VAR_CACHE_FUNCS(int64_t, runtime_bloom_filter_max_size);
DEF_SYS_VAR_CACHE_FUNCS(ObCharsetType, ncharacter_set_connection);
DEF_SYS_VAR_CACHE_FUNCS(int64_t, default_lob_inrow_threshold);
void set_autocommit_info(bool inc_value)
{
inc_data_.autocommit_ = inc_value;
@ -1993,6 +2007,7 @@ private:
bool inc_runtime_filter_max_in_num_:1;
bool inc_runtime_bloom_filter_max_size_:1;
bool inc_ncharacter_set_connection_:1;
bool inc_default_lob_inrow_threshold_:1;
};
};
};
@ -2275,6 +2290,11 @@ inline const ObString &ObBasicSessionInfo::get_log_row_value_option() const
return sys_vars_cache_.get_log_row_value_option();
}
inline int64_t ObBasicSessionInfo::get_default_lob_inrow_threshold() const
{
return sys_vars_cache_.get_default_lob_inrow_threshold();
}
inline bool ObBasicSessionInfo::get_local_autocommit() const
{
return sys_vars_cache_.get_autocommit();