add schema mod for 4.1
This commit is contained in:
@ -372,6 +372,8 @@ static const char* ref_info_type_strs[] = {
|
||||
"DIS_TASK_SPLITER",
|
||||
"DAS_CTX",
|
||||
"SCHEMA_RECORDER",
|
||||
"SPI_RESULT_SET",
|
||||
"PL_PREPARE_RESULT",
|
||||
"MOD_MAX",
|
||||
};
|
||||
|
||||
|
||||
@ -23,13 +23,13 @@ namespace oceanbase
|
||||
class ObSchemaSlot
|
||||
{
|
||||
public:
|
||||
ObSchemaSlot(): tenant_id_(OB_INVALID_TENANT_ID), slot_id_(OB_INVALID_INDEX),
|
||||
schema_version_(OB_INVALID_VERSION), schema_count_(OB_INVALID_COUNT),
|
||||
ObSchemaSlot(): tenant_id_(OB_INVALID_TENANT_ID), slot_id_(OB_INVALID_INDEX),
|
||||
schema_version_(OB_INVALID_VERSION), schema_count_(OB_INVALID_COUNT),
|
||||
ref_cnt_(OB_INVALID_COUNT), mod_ref_infos_() {}
|
||||
~ObSchemaSlot() {}
|
||||
void reset();
|
||||
void init(const uint64_t &tenant_id, const int64_t &slot_id,
|
||||
const int64_t &schema_version, const int64_t &schema_count,
|
||||
void init(const uint64_t &tenant_id, const int64_t &slot_id,
|
||||
const int64_t &schema_version, const int64_t &schema_count,
|
||||
const int64_t &ref_cnt, const common::ObString &str);
|
||||
uint64_t get_tenant_id() const { return tenant_id_; }
|
||||
int64_t get_slot_id() const { return slot_id_; }
|
||||
@ -37,7 +37,7 @@ public:
|
||||
int64_t get_schema_count() const { return schema_count_; }
|
||||
int64_t get_ref_cnt() const { return ref_cnt_;}
|
||||
const common::ObString& get_mod_ref_infos() const { return mod_ref_infos_; }
|
||||
TO_STRING_KV(K_(tenant_id), K_(slot_id), K_(schema_version),
|
||||
TO_STRING_KV(K_(tenant_id), K_(slot_id), K_(schema_version),
|
||||
K_(schema_count), K_(ref_cnt), K_(mod_ref_infos));
|
||||
private:
|
||||
uint64_t tenant_id_;
|
||||
@ -46,7 +46,7 @@ private:
|
||||
int64_t schema_count_;
|
||||
int64_t ref_cnt_;
|
||||
common::ObString mod_ref_infos_;
|
||||
};
|
||||
};
|
||||
namespace common
|
||||
{
|
||||
}
|
||||
@ -89,6 +89,8 @@ struct ObSchemaMgrItem
|
||||
MOD_DIS_TASK_SPLITER = 26,
|
||||
MOD_DAS_CTX = 27,
|
||||
MOD_SCHEMA_RECORDER = 28,
|
||||
MOD_SPI_RESULT_SET = 29,
|
||||
MOD_PL_PREPARE_RESULT = 30,
|
||||
MOD_MAX
|
||||
};
|
||||
ObSchemaMgrItem()
|
||||
@ -142,7 +144,7 @@ public:
|
||||
const ObSchemaMgr *&schema_mgr,
|
||||
ObSchemaMgrHandle &handle);
|
||||
int get_recycle_schema_version(int64_t &schema_version) const;
|
||||
int get_slot_info(common::ObIAllocator &allocator,
|
||||
int get_slot_info(common::ObIAllocator &allocator,
|
||||
common::ObIArray<ObSchemaSlot> &tenant_slot_infos);
|
||||
int put(ObSchemaMgr *schema_mgr,
|
||||
ObSchemaMgr *&eli_schema_mgr,
|
||||
@ -157,7 +159,7 @@ private:
|
||||
// need process in wlock
|
||||
int try_update_latest_schema_idx();
|
||||
int get_ref_info_type_str_(const int64_t &index, const char *&type_str);
|
||||
int build_ref_mod_infos_(const int64_t *mod_ref, char *&buff,
|
||||
int build_ref_mod_infos_(const int64_t *mod_ref, char *&buff,
|
||||
const int64_t &buf_len, common::ObString &str);
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ObSchemaMgrCache);
|
||||
|
||||
@ -106,7 +106,7 @@ public:
|
||||
allocator_(ObModIds::OB_PL_TEMP),
|
||||
result_set_(NULL),
|
||||
sql_ctx_(),
|
||||
schema_guard_(),
|
||||
schema_guard_(share::schema::ObSchemaMgrItem::MOD_SPI_RESULT_SET),
|
||||
orign_nested_count_(-1),
|
||||
cursor_nested_count_(-1),
|
||||
orign_session_value_(NULL),
|
||||
@ -272,7 +272,7 @@ public:
|
||||
mem_context_(nullptr),
|
||||
mem_context_destroy_guard_(mem_context_),
|
||||
sql_ctx_(),
|
||||
schema_guard_() {}
|
||||
schema_guard_(share::schema::ObSchemaMgrItem::MOD_PL_PREPARE_RESULT) {}
|
||||
~PLPrepareResult() { reset(); }
|
||||
int init(sql::ObSQLSessionInfo &session_info);
|
||||
void reset()
|
||||
|
||||
Reference in New Issue
Block a user