[scn] mv definition of SCN to dir of share

This commit is contained in:
obdev
2022-11-28 02:50:55 +00:00
committed by ob-robot
parent 68151eb87a
commit 99d4f56fec
716 changed files with 7746 additions and 6117 deletions

View File

@ -38,6 +38,7 @@
#include "share/backup/ob_backup_io_adapter.h"
#include "share/backup/ob_backup_config.h"
#include "observer/mysql/ob_query_response_time.h"
#include "rootserver/ob_rs_job_table_operator.h" //ObRsJobType
namespace oceanbase
{
@ -2600,15 +2601,24 @@ int ObRunUpgradeJobResolver::resolve(const ParseNode &parse_tree)
LOG_ERROR("create ObRunUpgradeJobStmt failed", KR(ret));
} else {
stmt_ = stmt;
ObString version_str;
ObString str;
uint64_t version = OB_INVALID_VERSION;
if (OB_FAIL(Util::resolve_string(parse_tree.children_[0], version_str))) {
if (OB_FAIL(Util::resolve_string(parse_tree.children_[0], str))) {
LOG_WARN("resolve string failed", KR(ret));
} else if (OB_FAIL(ObClusterVersion::get_version(version_str, version))) {
LOG_WARN("fail to get version", KR(ret), K(version_str));
} else if (0 == str.case_compare(rootserver::ObRsJobTableOperator::get_job_type_str(
rootserver::JOB_TYPE_UPGRADE_SYSTEM_VARIABLE))) {
stmt->get_rpc_arg().action_ = obrpc::ObUpgradeJobArg::UPGRADE_SYSTEM_VARIABLE;
} else if (0 == str.case_compare(rootserver::ObRsJobTableOperator::get_job_type_str(
rootserver::JOB_TYPE_UPGRADE_SYSTEM_TABLE))) {
stmt->get_rpc_arg().action_ = obrpc::ObUpgradeJobArg::UPGRADE_SYSTEM_TABLE;
} else {
stmt->get_rpc_arg().action_ = obrpc::ObUpgradeJobArg::RUN_UPGRADE_JOB;
stmt->get_rpc_arg().version_ = static_cast<int64_t>(version);
// UPGRADE_POST_ACTION
if (OB_FAIL(ObClusterVersion::get_version(str, version))) {
LOG_WARN("fail to get version", KR(ret), K(str));
} else {
stmt->get_rpc_arg().action_ = obrpc::ObUpgradeJobArg::UPGRADE_POST_ACTION;
stmt->get_rpc_arg().version_ = static_cast<int64_t>(version);
}
}
}
}

View File

@ -1958,6 +1958,7 @@ int ObShowResolver::resolve_like_or_where_clause(ObShowResolverContext &ctx)
&& parse_tree->type_ != T_SHOW_STATUS
&& parse_tree->type_ != T_SHOW_TABLEGROUPS
&& parse_tree->type_ != T_SHOW_PROCEDURE_STATUS
&& parse_tree->type_ != T_SHOW_FUNCTION_STATUS
&& parse_tree->type_ != T_SHOW_TRIGGERS)) {
// do nothing
} else {
@ -2691,7 +2692,7 @@ DEFINE_SHOW_CLAUSE_SET(SHOW_TABLE_STATUS,
"name");
DEFINE_SHOW_CLAUSE_SET(SHOW_PROCEDURE_STATUS,
NULL,
"select database_name AS `Db`, routine_name AS `Name`, c.type AS `Type`, c.definer AS `Definer`, p.gmt_modified AS `Modified`, p.gmt_create AS `Created`,'DEFINER' AS `Security_type`, p.comment AS `Comment`, character_set_client, collation_connection, collation_database AS `Database Collation`from %s.%s p, %s.%s d, %s.%s c where p.tenant_id = d.tenant_id and p.database_id = d.database_id and d.database_name = c.db and p.routine_name = c.name and (case c.type when 'PROCEDURE' then 1 else 0 end) = p.routine_type and d.database_id = %ld and p.routine_type = %ld ORDER BY name COLLATE utf8mb4_bin ASC",
"select database_name AS `Db`, routine_name AS `Name`, c.type AS `Type`, c.definer AS `Definer`, p.gmt_modified AS `Modified`, p.gmt_create AS `Created`,'DEFINER' AS `Security_type`, p.comment AS `Comment`, character_set_client, collation_connection, collation_database AS `Database Collation`from %s.%s p, %s.%s d, %s.%s c where p.tenant_id = d.tenant_id and p.database_id = d.database_id and d.database_name = c.db and p.routine_name = c.name and (case c.type when 'PROCEDURE' then 1 when 'FUNCTION' then 2 else 0 end) = p.routine_type and d.database_id = %ld and p.routine_type = %ld ORDER BY name COLLATE utf8mb4_bin ASC",
NULL,
"name");
DEFINE_SHOW_CLAUSE_SET(SHOW_TRIGGERS,