99 lines
3.4 KiB
C++
99 lines
3.4 KiB
C++
/**
|
|
* Copyright (c) 2021 OceanBase
|
|
* OceanBase CE is licensed under Mulan PubL v2.
|
|
* You can use this software according to the terms and conditions of the Mulan PubL v2.
|
|
* You may obtain a copy of Mulan PubL v2 at:
|
|
* http://license.coscl.org.cn/MulanPubL-2.0
|
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
* See the Mulan PubL v2 for more details.
|
|
*/
|
|
|
|
#define USING_LOG_PREFIX RS
|
|
|
|
#include "ob_dbms_sched_job_utils.h"
|
|
|
|
#include "lib/ob_errno.h"
|
|
#include "lib/oblog/ob_log_module.h"
|
|
#include "lib/time/ob_time_utility.h"
|
|
#include "lib/string/ob_string.h"
|
|
#include "lib/string/ob_sql_string.h"
|
|
#include "lib/mysqlclient/ob_mysql_proxy.h"
|
|
#include "lib/mysqlclient/ob_mysql_result.h"
|
|
#include "lib/mysqlclient/ob_isql_client.h"
|
|
#include "lib/mysqlclient/ob_mysql_transaction.h"
|
|
#include "rpc/obrpc/ob_rpc_packet.h"
|
|
#include "lib/worker.h"
|
|
#include "share/ob_dml_sql_splicer.h"
|
|
#include "share/inner_table/ob_inner_table_schema_constants.h"
|
|
#include "share/schema/ob_schema_utils.h"
|
|
#include "observer/omt/ob_tenant_config_mgr.h"
|
|
#include "observer/ob_server_struct.h"
|
|
|
|
|
|
namespace oceanbase
|
|
{
|
|
|
|
using namespace common;
|
|
using namespace share;
|
|
using namespace share::schema;
|
|
using namespace sqlclient;
|
|
|
|
namespace dbms_scheduler
|
|
{
|
|
|
|
int ObDBMSSchedJobInfo::deep_copy(ObIAllocator &allocator, const ObDBMSSchedJobInfo &other)
|
|
{
|
|
int ret = OB_SUCCESS;
|
|
tenant_id_ = other.tenant_id_;
|
|
job_ = other.job_;
|
|
last_modify_ = other.last_modify_;
|
|
last_date_ = other.last_date_;
|
|
this_date_ = other.this_date_;
|
|
next_date_ = other.next_date_;
|
|
total_ = other.total_;
|
|
failures_ = other.failures_;
|
|
flag_ = other.flag_;
|
|
scheduler_flags_ = other.scheduler_flags_;
|
|
end_date_ = other.end_date_;
|
|
enabled_ = other.enabled_;
|
|
auto_drop_ = other.auto_drop_;
|
|
interval_ts_ = other.interval_ts_;
|
|
is_oracle_tenant_ = other.is_oracle_tenant_;
|
|
max_run_duration_ = other.max_run_duration_;
|
|
|
|
OZ (ob_write_string(allocator, other.lowner_, lowner_));
|
|
OZ (ob_write_string(allocator, other.powner_, powner_));
|
|
OZ (ob_write_string(allocator, other.cowner_, cowner_));
|
|
|
|
OZ (ob_write_string(allocator, other.interval_, interval_));
|
|
|
|
OZ (ob_write_string(allocator, other.what_, what_));
|
|
OZ (ob_write_string(allocator, other.nlsenv_, nlsenv_));
|
|
OZ (ob_write_string(allocator, other.charenv_, charenv_));
|
|
OZ (ob_write_string(allocator, other.field1_, field1_));
|
|
OZ (ob_write_string(allocator, other.exec_env_, exec_env_));
|
|
OZ (ob_write_string(allocator, other.job_name_, job_name_));
|
|
OZ (ob_write_string(allocator, other.job_class_, job_class_));
|
|
OZ (ob_write_string(allocator, other.program_name_, program_name_));
|
|
return ret;
|
|
}
|
|
|
|
int ObDBMSSchedJobClassInfo::deep_copy(common::ObIAllocator &allocator, const ObDBMSSchedJobClassInfo &other)
|
|
{
|
|
int ret = OB_SUCCESS;
|
|
tenant_id_ = other.tenant_id_;
|
|
is_oracle_tenant_ = other.is_oracle_tenant_;
|
|
log_history_ = other.log_history_;
|
|
OZ (ob_write_string(allocator, other.job_class_name_, job_class_name_));
|
|
OZ (ob_write_string(allocator, other.service_, service_));
|
|
OZ (ob_write_string(allocator, other.resource_consumer_group_, resource_consumer_group_));
|
|
OZ (ob_write_string(allocator, other.logging_level_, logging_level_));
|
|
OZ (ob_write_string(allocator, other.comments_, comments_));
|
|
return ret;
|
|
}
|
|
|
|
} // end for namespace dbms_scheduler
|
|
} // end for namespace oceanbase
|