[to #53001377] feat: errno & rpc placeholder for udt dependency feature
This commit is contained in:
parent
d79a706910
commit
4440d52560
File diff suppressed because one or more lines are too long
@ -2348,6 +2348,8 @@ DEFINE_ERROR(OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES, -11001, ER_VALUES_C
|
||||
DEFINE_ERROR_EXT(OB_WRONG_PARTITION_NAME, -11002, ER_WRONG_PARTITION_NAME, "HY000", "Incorrect partition name", "Incorrect partition name '%.*s'");
|
||||
DEFINE_ERROR_EXT(OB_ERR_PLUGIN_IS_NOT_LOADED, -11003, ER_PLUGIN_IS_NOT_LOADED, "HY000", "Plugin is not loaded", "Plugin '%.*s' is not loaded");
|
||||
//11004 : OB_EST_DEVIA_TOO_LARGE
|
||||
DEFINE_ORACLE_ERROR(OB_ERR_HAS_TYPE_OR_TABLE_DEPENDENT, -11005, -1, "HY000", "cannot drop or replace a type with type or table dependents", 2303, "cannot drop or replace a type with type or table dependents");
|
||||
DEFINE_ORACLE_ERROR(OB_ERR_REPLACE_TYPE_WITH_TABLE_DEPENDENT, -11006, -1, "HY000", "cannot replace a type with table dependents", 22866, "cannot replace a type with table dependents");
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// !!! text/blob || clob/blob erro code
|
||||
|
@ -1787,6 +1787,8 @@ constexpr int OB_ERR_VALUES_CLAUSE_NEED_HAVE_COLUMN = -11000;
|
||||
constexpr int OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES = -11001;
|
||||
constexpr int OB_WRONG_PARTITION_NAME = -11002;
|
||||
constexpr int OB_ERR_PLUGIN_IS_NOT_LOADED = -11003;
|
||||
constexpr int OB_ERR_HAS_TYPE_OR_TABLE_DEPENDENT = -11005;
|
||||
constexpr int OB_ERR_REPLACE_TYPE_WITH_TABLE_DEPENDENT = -11006;
|
||||
constexpr int OB_SP_RAISE_APPLICATION_ERROR = -20000;
|
||||
constexpr int OB_SP_RAISE_APPLICATION_ERROR_NUM = -21000;
|
||||
constexpr int OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN = -22998;
|
||||
@ -3924,6 +3926,8 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES__USER_ERROR_MSG "A VALUES clause cannot use DEFAULT values, unless used as a source in an INSERT statement."
|
||||
#define OB_WRONG_PARTITION_NAME__USER_ERROR_MSG "Incorrect partition name '%.*s'"
|
||||
#define OB_ERR_PLUGIN_IS_NOT_LOADED__USER_ERROR_MSG "Plugin '%.*s' is not loaded"
|
||||
#define OB_ERR_HAS_TYPE_OR_TABLE_DEPENDENT__USER_ERROR_MSG "cannot drop or replace a type with type or table dependents"
|
||||
#define OB_ERR_REPLACE_TYPE_WITH_TABLE_DEPENDENT__USER_ERROR_MSG "cannot replace a type with table dependents"
|
||||
#define OB_SP_RAISE_APPLICATION_ERROR__USER_ERROR_MSG "%.*s"
|
||||
#define OB_SP_RAISE_APPLICATION_ERROR_NUM__USER_ERROR_MSG "error number argument to raise_application_error of '%d' is out of range"
|
||||
#define OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN__USER_ERROR_MSG "CLOB or NCLOB in multibyte character set not supported"
|
||||
@ -6061,6 +6065,8 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11001, A VALUES clause cannot use DEFAULT values, unless used as a source in an INSERT statement."
|
||||
#define OB_WRONG_PARTITION_NAME__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11002, Incorrect partition name '%.*s'"
|
||||
#define OB_ERR_PLUGIN_IS_NOT_LOADED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11003, Plugin '%.*s' is not loaded"
|
||||
#define OB_ERR_HAS_TYPE_OR_TABLE_DEPENDENT__ORA_USER_ERROR_MSG "ORA-02303: cannot drop or replace a type with type or table dependents"
|
||||
#define OB_ERR_REPLACE_TYPE_WITH_TABLE_DEPENDENT__ORA_USER_ERROR_MSG "ORA-22866: cannot replace a type with table dependents"
|
||||
#define OB_SP_RAISE_APPLICATION_ERROR__ORA_USER_ERROR_MSG "ORA%06ld: %.*s"
|
||||
#define OB_SP_RAISE_APPLICATION_ERROR_NUM__ORA_USER_ERROR_MSG "ORA-21000: error number argument to raise_application_error of '%d' is out of range"
|
||||
#define OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN__ORA_USER_ERROR_MSG "ORA-22998: CLOB or NCLOB in multibyte character set not supported"
|
||||
@ -6071,7 +6077,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_DATA_TOO_LONG_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-12899: value too large for column %.*s (actual: %ld, maximum: %ld)"
|
||||
#define OB_ERR_INVALID_DATE_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-01861: Incorrect datetime value for column '%.*s' at row %ld"
|
||||
|
||||
extern int g_all_ob_errnos[2133];
|
||||
extern int g_all_ob_errnos[2135];
|
||||
|
||||
const char *ob_error_name(const int oberr);
|
||||
const char* ob_error_cause(const int oberr);
|
||||
|
@ -5453,22 +5453,35 @@ int ObCreateUDTArg::assign(const ObCreateUDTArg &other)
|
||||
} else {
|
||||
db_name_ = other.db_name_;
|
||||
is_or_replace_ = other.is_or_replace_;
|
||||
is_force_ = other.is_force_;
|
||||
exist_valid_udt_ = other.exist_valid_udt_;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
OB_SERIALIZE_MEMBER((ObCreateUDTArg, ObDDLArg), udt_info_, db_name_, is_or_replace_,
|
||||
error_info_,
|
||||
public_routine_infos_,
|
||||
dependency_infos_);
|
||||
OB_SERIALIZE_MEMBER((ObCreateUDTArg, ObDDLArg),
|
||||
udt_info_,
|
||||
db_name_,
|
||||
is_or_replace_,
|
||||
error_info_,
|
||||
public_routine_infos_,
|
||||
dependency_infos_,
|
||||
is_force_,
|
||||
exist_valid_udt_);
|
||||
|
||||
bool ObDropUDTArg::is_valid() const
|
||||
{
|
||||
return OB_INVALID_ID != tenant_id_ && !db_name_.empty() && !udt_name_.empty();
|
||||
}
|
||||
|
||||
OB_SERIALIZE_MEMBER((ObDropUDTArg, ObDDLArg), tenant_id_, db_name_,
|
||||
udt_name_, if_exist_, is_type_body_, force_or_validate_);
|
||||
OB_SERIALIZE_MEMBER((ObDropUDTArg, ObDDLArg),
|
||||
tenant_id_,
|
||||
db_name_,
|
||||
udt_name_,
|
||||
if_exist_,
|
||||
is_type_body_,
|
||||
force_or_validate_,
|
||||
exist_valid_udt_);
|
||||
|
||||
OB_SERIALIZE_MEMBER(ObCancelTaskArg, task_id_);
|
||||
|
||||
|
@ -6424,7 +6424,13 @@ struct ObCreateUDTArg : public ObDDLArg
|
||||
{
|
||||
OB_UNIS_VERSION(1);
|
||||
public:
|
||||
ObCreateUDTArg(): udt_info_(), db_name_(), is_or_replace_(false), error_info_() {}
|
||||
ObCreateUDTArg()
|
||||
: udt_info_(),
|
||||
db_name_(),
|
||||
is_or_replace_(false),
|
||||
error_info_(),
|
||||
is_force_(true),
|
||||
exist_valid_udt_(false) {}
|
||||
virtual ~ObCreateUDTArg() {}
|
||||
bool is_valid() const;
|
||||
int assign(const ObCreateUDTArg &other);
|
||||
@ -6433,7 +6439,9 @@ public:
|
||||
K_(is_or_replace),
|
||||
K_(error_info),
|
||||
K_(public_routine_infos),
|
||||
K_(dependency_infos));
|
||||
K_(dependency_infos),
|
||||
K_(is_force),
|
||||
K_(exist_valid_udt));
|
||||
|
||||
share::schema::ObUDTTypeInfo udt_info_;
|
||||
common::ObString db_name_;
|
||||
@ -6441,6 +6449,8 @@ public:
|
||||
share::schema::ObErrorInfo error_info_;
|
||||
common::ObSArray<share::schema::ObRoutineInfo> public_routine_infos_;
|
||||
common::ObSArray<share::schema::ObDependencyInfo> dependency_infos_;
|
||||
bool is_force_;
|
||||
bool exist_valid_udt_;
|
||||
};
|
||||
|
||||
struct ObDropUDTArg : public ObDDLArg
|
||||
@ -6453,12 +6463,18 @@ public:
|
||||
udt_name_(),
|
||||
if_exist_(false),
|
||||
is_type_body_(false),
|
||||
force_or_validate_(0) {}
|
||||
force_or_validate_(1), // default force for backward compatibility
|
||||
exist_valid_udt_(false) {}
|
||||
virtual ~ObDropUDTArg() {}
|
||||
bool is_valid() const;
|
||||
virtual bool is_allow_when_upgrade() const { return true; }
|
||||
TO_STRING_KV(K_(tenant_id), K_(db_name), K_(udt_name),
|
||||
K_(if_exist), K_(is_type_body), K_(force_or_validate));
|
||||
TO_STRING_KV(K_(tenant_id),
|
||||
K_(db_name),
|
||||
K_(udt_name),
|
||||
K_(if_exist),
|
||||
K_(is_type_body),
|
||||
K_(force_or_validate),
|
||||
K_(exist_valid_udt));
|
||||
|
||||
uint64_t tenant_id_;
|
||||
common::ObString db_name_;
|
||||
@ -6466,6 +6482,7 @@ public:
|
||||
bool if_exist_;
|
||||
bool is_type_body_;
|
||||
int64_t force_or_validate_;
|
||||
bool exist_valid_udt_;
|
||||
};
|
||||
|
||||
struct ObCancelTaskArg : public ObServerZoneArg
|
||||
|
Loading…
x
Reference in New Issue
Block a user