Placeholder for table-level auto_increment_cache_size configuration
This commit is contained in:
parent
5b88653ed2
commit
90aa44cf2d
@ -2408,6 +2408,7 @@ typedef enum ObItemType
|
||||
T_CANCEL_LS_REPLICA_TASK,
|
||||
T_COALESCE_AGGR,
|
||||
T_NO_COALESCE_AGGR,
|
||||
T_AUTO_INCREMENT_CACHE_SIZE,
|
||||
T_MAX //Attention: add a new type before T_MAX
|
||||
} ObItemType;
|
||||
|
||||
|
@ -6731,6 +6731,25 @@ int ObInnerTableSchema::all_table_history_schema(ObTableSchema &table_schema)
|
||||
column_store_default,
|
||||
column_store_default); //default_value
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj auto_increment_cache_size_default;
|
||||
auto_increment_cache_size_default.set_int(0);
|
||||
ADD_COLUMN_SCHEMA_T("auto_increment_cache_size", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObIntType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(int64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false, //is_autoincrement
|
||||
auto_increment_cache_size_default,
|
||||
auto_increment_cache_size_default); //default_value
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
|
@ -14374,6 +14374,25 @@ int ObInnerTableSchema::all_virtual_core_all_table_schema(ObTableSchema &table_s
|
||||
column_store_default,
|
||||
column_store_default); //default_value
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj auto_increment_cache_size_default;
|
||||
auto_increment_cache_size_default.set_int(0);
|
||||
ADD_COLUMN_SCHEMA_T("auto_increment_cache_size", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObIntType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(int64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false, //is_autoincrement
|
||||
auto_increment_cache_size_default,
|
||||
auto_increment_cache_size_default); //default_value
|
||||
}
|
||||
table_schema.set_index_using_type(USING_HASH);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
|
@ -6679,6 +6679,25 @@ int ObInnerTableSchema::all_virtual_table_schema(ObTableSchema &table_schema)
|
||||
column_store_default,
|
||||
column_store_default); //default_value
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj auto_increment_cache_size_default;
|
||||
auto_increment_cache_size_default.set_int(0);
|
||||
ADD_COLUMN_SCHEMA_T("auto_increment_cache_size", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObIntType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(int64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false, //is_autoincrement
|
||||
auto_increment_cache_size_default,
|
||||
auto_increment_cache_size_default); //default_value
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
@ -8141,6 +8160,25 @@ int ObInnerTableSchema::all_virtual_table_history_schema(ObTableSchema &table_sc
|
||||
column_store_default,
|
||||
column_store_default); //default_value
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj auto_increment_cache_size_default;
|
||||
auto_increment_cache_size_default.set_int(0);
|
||||
ADD_COLUMN_SCHEMA_T("auto_increment_cache_size", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObIntType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(int64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
true, //is_nullable
|
||||
false, //is_autoincrement
|
||||
auto_increment_cache_size_default,
|
||||
auto_increment_cache_size_default); //default_value
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
|
@ -6398,6 +6398,21 @@ int ObInnerTableSchema::all_virtual_table_real_agent_ora_schema(ObTableSchema &t
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("AUTO_INCREMENT_CACHE_SIZE", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("GMT_CREATE", //column_name
|
||||
++column_id, //column_id
|
||||
|
@ -6391,6 +6391,21 @@ int ObInnerTableSchema::all_virtual_core_all_table_ora_schema(ObTableSchema &tab
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("AUTO_INCREMENT_CACHE_SIZE", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObNumberType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
38, //column_length
|
||||
38, //column_precision
|
||||
0, //column_scale
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
table_schema.set_index_using_type(USING_HASH);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
|
@ -1625,6 +1625,25 @@ int ObInnerTableSchema::all_table_schema(ObTableSchema &table_schema)
|
||||
column_store_default,
|
||||
column_store_default); //default_value
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj auto_increment_cache_size_default;
|
||||
auto_increment_cache_size_default.set_int(0);
|
||||
ADD_COLUMN_SCHEMA_T("auto_increment_cache_size", //column_name
|
||||
++column_id, //column_id
|
||||
0, //rowkey_id
|
||||
0, //index_id
|
||||
0, //part_key_pos
|
||||
ObIntType, //column_type
|
||||
CS_TYPE_INVALID, //column_collation_type
|
||||
sizeof(int64_t), //column_length
|
||||
-1, //column_precision
|
||||
-1, //column_scale
|
||||
false, //is_nullable
|
||||
false, //is_autoincrement
|
||||
auto_increment_cache_size_default,
|
||||
auto_increment_cache_size_default); //default_value
|
||||
}
|
||||
table_schema.set_index_using_type(USING_BTREE);
|
||||
table_schema.set_row_store_type(ENCODING_ROW_STORE);
|
||||
table_schema.set_store_format(OB_STORE_FORMAT_DYNAMIC_MYSQL);
|
||||
|
@ -312,6 +312,7 @@ all_table_def = dict(
|
||||
('lob_inrow_threshold', 'int', 'false', 'OB_DEFAULT_LOB_INROW_THRESHOLD'),
|
||||
('max_used_column_group_id', 'int', 'false', '1000'),
|
||||
('column_store', 'int', 'false', '0'),
|
||||
('auto_increment_cache_size', 'int', 'false', '0')
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -2079,6 +2079,7 @@ public:
|
||||
TTL_DEFINITION,
|
||||
KV_ATTRIBUTES,
|
||||
LOB_INROW_THRESHOLD,
|
||||
INCREMENT_CACHE_SIZE,
|
||||
MAX_OPTION = 1000
|
||||
};
|
||||
enum AlterPartitionType
|
||||
|
@ -1523,6 +1523,7 @@ int ObTableSchema::assign(const ObTableSchema &src_schema)
|
||||
table_flags_ = src_schema.table_flags_;
|
||||
name_generated_type_ = src_schema.name_generated_type_;
|
||||
lob_inrow_threshold_ = src_schema.lob_inrow_threshold_;
|
||||
auto_increment_cache_size_ = src_schema.auto_increment_cache_size_;
|
||||
is_column_store_supported_ = src_schema.is_column_store_supported_;
|
||||
max_used_column_group_id_ = src_schema.max_used_column_group_id_;
|
||||
mlog_tid_ = src_schema.mlog_tid_;
|
||||
@ -3337,6 +3338,7 @@ void ObTableSchema::reset()
|
||||
kv_attributes_.reset();
|
||||
name_generated_type_ = GENERATED_TYPE_UNKNOWN;
|
||||
lob_inrow_threshold_ = OB_DEFAULT_LOB_INROW_THRESHOLD;
|
||||
auto_increment_cache_size_ = 0;
|
||||
|
||||
is_column_store_supported_ = false;
|
||||
max_used_column_group_id_ = COLUMN_GROUP_START_ID;
|
||||
@ -6365,7 +6367,8 @@ int64_t ObTableSchema::to_string(char *buf, const int64_t buf_len) const
|
||||
K_(max_used_column_group_id),
|
||||
K_(column_group_cnt),
|
||||
"column_group_array", ObArrayWrap<ObColumnGroupSchema* >(column_group_arr_, column_group_cnt_),
|
||||
K_(mlog_tid));
|
||||
K_(mlog_tid),
|
||||
K_(auto_increment_cache_size));
|
||||
J_OBJ_END();
|
||||
|
||||
return pos;
|
||||
@ -6645,6 +6648,7 @@ OB_DEF_SERIALIZE(ObTableSchema)
|
||||
}();
|
||||
|
||||
OB_UNIS_ENCODE(mlog_tid_);
|
||||
OB_UNIS_ENCODE(auto_increment_cache_size_);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -7073,6 +7077,7 @@ OB_DEF_DESERIALIZE(ObTableSchema)
|
||||
}();
|
||||
|
||||
OB_UNIS_DECODE(mlog_tid_);
|
||||
OB_UNIS_DECODE(auto_increment_cache_size_);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -7222,6 +7227,7 @@ OB_DEF_SERIALIZE_SIZE(ObTableSchema)
|
||||
OB_UNIS_ADD_LEN(is_column_store_supported_);
|
||||
OB_UNIS_ADD_LEN(max_used_column_group_id_);
|
||||
OB_UNIS_ADD_LEN(mlog_tid_);
|
||||
OB_UNIS_ADD_LEN(auto_increment_cache_size_);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
@ -1125,6 +1125,8 @@ public:
|
||||
int set_ttl_definition(const common::ObString &ttl_definition) { return deep_copy_str(ttl_definition, ttl_definition_); }
|
||||
int set_kv_attributes(const common::ObString &kv_attributes) { return deep_copy_str(kv_attributes, kv_attributes_); }
|
||||
void set_lob_inrow_threshold(const int64_t lob_inrow_threshold) { lob_inrow_threshold_ = lob_inrow_threshold;}
|
||||
inline void set_auto_increment_cache_size(const int64_t auto_increment_cache_size)
|
||||
{ auto_increment_cache_size_ = auto_increment_cache_size; }
|
||||
//get methods
|
||||
bool is_valid() const;
|
||||
|
||||
@ -1215,6 +1217,7 @@ public:
|
||||
inline const common::ObString &get_ttl_definition() const { return ttl_definition_; }
|
||||
inline const common::ObString &get_kv_attributes() const { return kv_attributes_; }
|
||||
inline int64_t get_lob_inrow_threshold() const { return lob_inrow_threshold_; }
|
||||
inline int64_t get_auto_increment_cache_size() const { return auto_increment_cache_size_; }
|
||||
bool has_check_constraint() const;
|
||||
inline bool has_constraint() const { return cst_cnt_ > 0; }
|
||||
bool is_column_in_check_constraint(const uint64_t col_id) const;
|
||||
@ -1802,6 +1805,7 @@ protected:
|
||||
|
||||
ObNameGeneratedType name_generated_type_;
|
||||
int64_t lob_inrow_threshold_;
|
||||
int64_t auto_increment_cache_size_;
|
||||
|
||||
// column group
|
||||
bool is_column_store_supported_;
|
||||
|
@ -874,6 +874,7 @@ name_generated_type bigint(20) NO 0
|
||||
lob_inrow_threshold bigint(20) NO 4096
|
||||
max_used_column_group_id bigint(20) NO 1000
|
||||
column_store bigint(20) NO 0
|
||||
auto_increment_cache_size bigint(20) NO 0
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_core_all_table;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
@ -1749,6 +1750,7 @@ name_generated_type bigint(20) NO 0
|
||||
lob_inrow_threshold bigint(20) NO 4096
|
||||
max_used_column_group_id bigint(20) NO 1000
|
||||
column_store bigint(20) NO 0
|
||||
auto_increment_cache_size bigint(20) NO 0
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_table;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
@ -947,6 +947,7 @@ name_generated_type bigint(20) NO 0
|
||||
lob_inrow_threshold bigint(20) NO 4096
|
||||
max_used_column_group_id bigint(20) NO 1000
|
||||
column_store bigint(20) NO 0
|
||||
auto_increment_cache_size bigint(20) NO 0
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_core_all_table;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
@ -2666,6 +2667,7 @@ name_generated_type bigint(20) NO 0
|
||||
lob_inrow_threshold bigint(20) NO 4096
|
||||
max_used_column_group_id bigint(20) NO 1000
|
||||
column_store bigint(20) NO 0
|
||||
auto_increment_cache_size bigint(20) NO 0
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_table;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
@ -2755,6 +2757,7 @@ name_generated_type bigint(20) YES 0
|
||||
lob_inrow_threshold bigint(20) YES 4096
|
||||
max_used_column_group_id bigint(20) YES 1000
|
||||
column_store bigint(20) YES 0
|
||||
auto_increment_cache_size bigint(20) YES 0
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_table_history;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
Loading…
x
Reference in New Issue
Block a user