placeholder for mview refresh_dop
This commit is contained in:
parent
319471fa36
commit
29771fdd61
@ -1886,6 +1886,25 @@ int ObInnerTableSchema::all_virtual_mview_schema(ObTableSchema &table_schema)
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj refresh_dop_default;
|
||||
refresh_dop_default.set_int(0);
|
||||
ADD_COLUMN_SCHEMA_T("refresh_dop", //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
|
||||
refresh_dop_default,
|
||||
refresh_dop_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);
|
||||
|
@ -3539,6 +3539,21 @@ int ObInnerTableSchema::all_virtual_mview_real_agent_ora_schema(ObTableSchema &t
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ADD_COLUMN_SCHEMA("REFRESH_DOP", //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
|
||||
|
@ -3914,6 +3914,25 @@ int ObInnerTableSchema::all_mview_schema(ObTableSchema &table_schema)
|
||||
false, //is_nullable
|
||||
false); //is_autoincrement
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
ObObj refresh_dop_default;
|
||||
refresh_dop_default.set_int(0);
|
||||
ADD_COLUMN_SCHEMA_T("refresh_dop", //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
|
||||
refresh_dop_default,
|
||||
refresh_dop_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);
|
||||
|
@ -6289,7 +6289,8 @@ def_table_schema(
|
||||
('last_refresh_date', 'timestamp', 'true'),
|
||||
('last_refresh_time', 'int', 'true'),
|
||||
('last_refresh_trace_id', 'varchar:OB_MAX_TRACE_ID_BUFFER_SIZE', 'true'),
|
||||
('schema_version', 'int')
|
||||
('schema_version', 'int'),
|
||||
('refresh_dop', 'int', 'false', '0')
|
||||
]
|
||||
)
|
||||
|
||||
|
@ -53,6 +53,7 @@ ObMViewInfo &ObMViewInfo::operator=(const ObMViewInfo &src_schema)
|
||||
last_refresh_date_ = src_schema.last_refresh_date_;
|
||||
last_refresh_time_ = src_schema.last_refresh_time_;
|
||||
schema_version_ = src_schema.schema_version_;
|
||||
refresh_dop_ = src_schema.refresh_dop_;
|
||||
if (OB_FAIL(deep_copy_str(src_schema.refresh_next_, refresh_next_))) {
|
||||
LOG_WARN("deep copy refresh next failed", KR(ret), K(src_schema.refresh_next_));
|
||||
} else if (OB_FAIL(deep_copy_str(src_schema.refresh_job_, refresh_job_))) {
|
||||
@ -100,6 +101,7 @@ void ObMViewInfo::reset()
|
||||
last_refresh_time_ = OB_INVALID_COUNT;
|
||||
reset_string(last_refresh_trace_id_);
|
||||
schema_version_ = OB_INVALID_VERSION;
|
||||
refresh_dop_ = 0;
|
||||
ObSchema::reset();
|
||||
}
|
||||
|
||||
@ -127,7 +129,8 @@ OB_SERIALIZE_MEMBER(ObMViewInfo,
|
||||
last_refresh_date_,
|
||||
last_refresh_time_,
|
||||
last_refresh_trace_id_,
|
||||
schema_version_);
|
||||
schema_version_,
|
||||
refresh_dop_);
|
||||
|
||||
int ObMViewInfo::gen_insert_mview_dml(const uint64_t exec_tenant_id, ObDMLSqlSplicer &dml) const
|
||||
{
|
||||
|
@ -110,7 +110,8 @@ public:
|
||||
K_(last_refresh_date),
|
||||
K_(last_refresh_time),
|
||||
K_(last_refresh_trace_id),
|
||||
K_(schema_version));
|
||||
K_(schema_version),
|
||||
K_(refresh_dop));
|
||||
|
||||
public:
|
||||
static constexpr char *MVIEW_REFRESH_JOB_PREFIX = const_cast<char *>("MVIEW_REFRESH$J_");
|
||||
@ -130,6 +131,7 @@ private:
|
||||
int64_t last_refresh_time_;
|
||||
ObString last_refresh_trace_id_;
|
||||
int64_t schema_version_;
|
||||
int64_t refresh_dop_;
|
||||
};
|
||||
|
||||
} // namespace schema
|
||||
|
@ -7850,7 +7850,8 @@ OB_SERIALIZE_MEMBER(ObMVRefreshInfo,
|
||||
start_time_,
|
||||
next_time_expr_,
|
||||
exec_env_,
|
||||
parallel_);
|
||||
parallel_,
|
||||
refresh_dop_);
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------
|
||||
* ------------------------------ObViewSchema-------------------------------------------
|
||||
|
@ -3664,6 +3664,7 @@ public:
|
||||
ObString next_time_expr_;
|
||||
ObString exec_env_;
|
||||
int64_t parallel_;
|
||||
int64_t refresh_dop_;
|
||||
|
||||
ObMVRefreshInfo() :
|
||||
refresh_method_(ObMVRefreshMethod::NEVER),
|
||||
@ -3671,7 +3672,8 @@ public:
|
||||
start_time_(),
|
||||
next_time_expr_(),
|
||||
exec_env_(),
|
||||
parallel_(OB_INVALID_COUNT) {}
|
||||
parallel_(OB_INVALID_COUNT),
|
||||
refresh_dop_(0) {}
|
||||
|
||||
void reset() {
|
||||
refresh_method_ = ObMVRefreshMethod::NEVER;
|
||||
@ -3680,6 +3682,7 @@ public:
|
||||
next_time_expr_.reset();
|
||||
exec_env_.reset();
|
||||
parallel_ = OB_INVALID_COUNT;
|
||||
refresh_dop_ = 0;
|
||||
}
|
||||
|
||||
bool operator == (const ObMVRefreshInfo &other) const {
|
||||
@ -3688,7 +3691,8 @@ public:
|
||||
&& start_time_ == other.start_time_
|
||||
&& next_time_expr_ == other.next_time_expr_
|
||||
&& exec_env_ == other.exec_env_
|
||||
&& parallel_ == other.parallel_;
|
||||
&& parallel_ == other.parallel_
|
||||
&& refresh_dop_ == other.refresh_dop_;
|
||||
}
|
||||
|
||||
|
||||
@ -3697,7 +3701,8 @@ public:
|
||||
K_(start_time),
|
||||
K_(next_time_expr),
|
||||
K_(exec_env),
|
||||
K_(parallel));
|
||||
K_(parallel),
|
||||
K_(refresh_dop));
|
||||
};
|
||||
|
||||
class ObViewSchema : public ObSchema
|
||||
|
@ -11910,9 +11910,9 @@
|
||||
"ref_url": "https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html",
|
||||
"placeholder": true
|
||||
},
|
||||
"materialized_view_parallelism": {
|
||||
"mview_refresh_dop": {
|
||||
"id": 10746,
|
||||
"name": "materialized_view_parallelism",
|
||||
"name": "mview_refresh_dop",
|
||||
"default_value": "0",
|
||||
"base_value": "0",
|
||||
"data_type": "int",
|
||||
|
@ -4295,6 +4295,7 @@ last_refresh_date timestamp(6) YES NULL
|
||||
last_refresh_time bigint(20) YES NULL
|
||||
last_refresh_trace_id varchar(64) YES NULL
|
||||
schema_version bigint(20) NO NULL
|
||||
refresh_dop bigint(20) NO 0
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_mview;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
@ -8986,6 +8986,7 @@ last_refresh_date timestamp(6) YES NULL
|
||||
last_refresh_time bigint(20) YES NULL
|
||||
last_refresh_trace_id varchar(64) YES NULL
|
||||
schema_version bigint(20) NO NULL
|
||||
refresh_dop bigint(20) NO 0
|
||||
select /*+QUERY_TIMEOUT(60000000)*/ IF(count(*) >= 0, 1, 0) from oceanbase.__all_virtual_mview;
|
||||
IF(count(*) >= 0, 1, 0)
|
||||
1
|
||||
|
Loading…
x
Reference in New Issue
Block a user