diff --git a/src/objit/include/objit/common/ob_item_type.h b/src/objit/include/objit/common/ob_item_type.h index 5168e960c8..497d61fa85 100755 --- a/src/objit/include/objit/common/ob_item_type.h +++ b/src/objit/include/objit/common/ob_item_type.h @@ -2409,6 +2409,8 @@ typedef enum ObItemType T_COALESCE_AGGR, T_NO_COALESCE_AGGR, T_AUTO_INCREMENT_CACHE_SIZE, + + T_IGNORE_UNKNOWN_USER, T_MAX //Attention: add a new type before T_MAX } ObItemType; diff --git a/src/share/ob_rpc_struct.cpp b/src/share/ob_rpc_struct.cpp index 9395b1abf7..ee533c9c74 100755 --- a/src/share/ob_rpc_struct.cpp +++ b/src/share/ob_rpc_struct.cpp @@ -4678,6 +4678,8 @@ int ObAlterUserProfileArg::assign(const ObAlterUserProfileArg &other) LOG_WARN("fail to assign ddl arg", KR(ret)); } else if (OB_FAIL(role_id_array_.assign(other.role_id_array_))) { SHARE_LOG(WARN, "fail to assign role_id_array", K(ret)); + } else if (OB_FAIL(user_ids_.assign(other.user_ids_))) { + SHARE_LOG(WARN, "fail to assign user_ids", K(ret)); } return ret; } @@ -4697,7 +4699,8 @@ OB_SERIALIZE_MEMBER((ObAlterUserProfileArg, ObDDLArg), profile_name_, user_id_, default_role_flag_, - role_id_array_); + role_id_array_, + user_ids_); bool ObGrantArg::is_valid() const { @@ -4751,6 +4754,8 @@ int ObGrantArg::assign(const ObGrantArg &other) SHARE_LOG(WARN, "fail to assign ref_col_ids_", K(ret)); } else if (OB_FAIL(sel_col_ids_.assign(other.sel_col_ids_))) { SHARE_LOG(WARN, "fail to assign sel_col_ids_", K(ret)); + } else if (OB_FAIL(column_names_priv_.assign(other.column_names_priv_))) { + LOG_WARN("fail to assin column_names_priv_", K(ret)); } return ret; } @@ -4781,7 +4786,8 @@ OB_DEF_SERIALIZE(ObGrantArg) grantor_id_, remain_roles_, is_inner_, - sel_col_ids_ + sel_col_ids_, + column_names_priv_ ); return ret; } @@ -4812,7 +4818,8 @@ OB_DEF_DESERIALIZE(ObGrantArg) grantor_id_, remain_roles_, is_inner_, - sel_col_ids_); + sel_col_ids_, + column_names_priv_); //compatibility for old version if (OB_SUCC(ret) && users_passwd_.count() > 0 && hosts_.empty()) { @@ -4852,7 +4859,8 @@ OB_DEF_SERIALIZE_SIZE(ObGrantArg) grantor_id_, remain_roles_, is_inner_, - sel_col_ids_); + sel_col_ids_, + column_names_priv_); return len; } @@ -4907,6 +4915,8 @@ int ObRevokeTableArg::assign(const ObRevokeTableArg &other) LOG_WARN("fail to assign ref_col_ids_", K(ret)); } else if (OB_FAIL(sel_col_ids_.assign(other.sel_col_ids_))) { LOG_WARN("fail to assign sel_col_ids_", K(ret)); + } else if (OB_FAIL(column_names_priv_.assign(other.column_names_priv_))) { + LOG_WARN("fail to assin column_names_priv_", K(ret)); } return ret; } @@ -4932,7 +4942,8 @@ OB_SERIALIZE_MEMBER((ObRevokeTableArg, ObDDLArg), sel_col_ids_, ins_col_ids_, upd_col_ids_, - ref_col_ids_); + ref_col_ids_, + column_names_priv_); bool ObRevokeSysPrivArg::is_valid() const { diff --git a/src/share/ob_rpc_struct.h b/src/share/ob_rpc_struct.h index a820e5f04e..b34b33b141 100755 --- a/src/share/ob_rpc_struct.h +++ b/src/share/ob_rpc_struct.h @@ -115,6 +115,7 @@ enum ObDefaultRoleFlag OB_DEFAULT_ROLE_ALL = 2, OB_DEFAULT_ROLE_ALL_EXCEPT = 3, OB_DEFAULT_ROLE_NONE = 4, + OB_DEFAULT_ROLE_DEFAULT = 5, OB_DEFAULT_ROLE_MAX, }; struct Bool @@ -5242,7 +5243,7 @@ struct ObAlterUserProfileArg : public ObDDLArg public: ObAlterUserProfileArg() : ObDDLArg(), tenant_id_(common::OB_INVALID_TENANT_ID), user_name_(), host_name_(), profile_name_(), user_id_(common::OB_INVALID_TENANT_ID), - default_role_flag_(common::OB_INVALID_TENANT_ID), role_id_array_() + default_role_flag_(common::OB_INVALID_TENANT_ID), role_id_array_(), user_ids_() { } virtual ~ObAlterUserProfileArg() {} int assign(const ObAlterUserProfileArg &other); @@ -5256,6 +5257,7 @@ public: uint64_t user_id_; uint64_t default_role_flag_; common::ObSEArray role_id_array_; + common::ObSEArray user_ids_; //for set default role to multiple users }; struct ObCreateDirectoryArg : public ObDDLArg @@ -5325,7 +5327,7 @@ public: object_id_(common::OB_INVALID_ID), ins_col_ids_(), upd_col_ids_(), ref_col_ids_(), grantor_id_(common::OB_INVALID_ID), remain_roles_(), is_inner_(false), - sel_col_ids_() + sel_col_ids_(), column_names_priv_() { } virtual ~ObGrantArg() {} bool is_valid() const; @@ -5362,6 +5364,7 @@ public: common::ObSArray remain_roles_; bool is_inner_; common::ObSEArray sel_col_ids_; + common::ObSEArray, 4> column_names_priv_; }; struct ObStandbyGrantArg : public ObDDLArg @@ -5435,7 +5438,7 @@ public: priv_set_(0), grant_(true), obj_id_(common::OB_INVALID_ID), obj_type_(common::OB_INVALID_ID), grantor_id_(common::OB_INVALID_ID), obj_priv_array_(), revoke_all_ora_(false), sel_col_ids_(), ins_col_ids_(), - upd_col_ids_(), ref_col_ids_() + upd_col_ids_(), ref_col_ids_(), column_names_priv_() { } bool is_valid() const; @@ -5466,6 +5469,7 @@ public: common::ObSEArray ins_col_ids_; common::ObSEArray upd_col_ids_; common::ObSEArray ref_col_ids_; + common::ObSEArray, 4> column_names_priv_; }; struct ObRevokeSysPrivArg : public ObDDLArg