diff --git a/src/share/ob_errno.cpp b/src/share/ob_errno.cpp index 84afeea9ee..7ca44ab584 100644 --- a/src/share/ob_errno.cpp +++ b/src/share/ob_errno.cpp @@ -23361,6 +23361,18 @@ static const _error _error_OB_ERR_MERGE_INTO_WITH_POLICY = { .oracle_str_error = "ORA-28132: The MERGE INTO syntax does not support the security policy", .oracle_str_user_error = "ORA-28132: The MERGE INTO syntax does not support the security policy" }; +static const _error _error_OB_ERR_SP_NO_DROP_SP = { + .error_name = "OB_ERR_SP_NO_DROP_SP", + .error_cause = "Internal Error", + .error_solution = "Contact OceanBase Support", + .mysql_errno = ER_SP_NO_DROP_SP, + .sqlstate = "HY000", + .str_error = "Can't drop or alter a procedure/function from within another stored routine.", + .str_user_error = "Can't drop or alter a '%s' from within another stored routine.", + .oracle_errno = 600, + .oracle_str_error = "ORA-00600: internal error code, arguments: -9743, Can't drop or alter a procedure/function from within another stored routine.", + .oracle_str_user_error = "ORA-00600: internal error code, arguments: -9743, Can't drop or alter a '%s' from within another stored routine." +}; static const _error _error_OB_SP_RAISE_APPLICATION_ERROR = { .error_name = "OB_SP_RAISE_APPLICATION_ERROR", .error_cause = "Internal Error", @@ -25397,6 +25409,7 @@ struct ObStrErrorInit _errors[-OB_ERR_UNPROTECTED_VIRTUAL_COLUMN] = &_error_OB_ERR_UNPROTECTED_VIRTUAL_COLUMN; _errors[-OB_ERR_ATTRIBUTE_ASSOCIATION] = &_error_OB_ERR_ATTRIBUTE_ASSOCIATION; _errors[-OB_ERR_MERGE_INTO_WITH_POLICY] = &_error_OB_ERR_MERGE_INTO_WITH_POLICY; + _errors[-OB_ERR_SP_NO_DROP_SP] = &_error_OB_ERR_SP_NO_DROP_SP; _errors[-OB_SP_RAISE_APPLICATION_ERROR] = &_error_OB_SP_RAISE_APPLICATION_ERROR; _errors[-OB_SP_RAISE_APPLICATION_ERROR_NUM] = &_error_OB_SP_RAISE_APPLICATION_ERROR_NUM; _errors[-OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN] = &_error_OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN; diff --git a/src/share/ob_errno.def b/src/share/ob_errno.def index 84084a8b41..76a3088ab4 100644 --- a/src/share/ob_errno.def +++ b/src/share/ob_errno.def @@ -2147,7 +2147,7 @@ DEFINE_ORACLE_ERROR(OB_ERR_INVALID_SEC_COLUMN_TYPE, -9739, -1, "HY000", "Column DEFINE_ORACLE_ERROR(OB_ERR_UNPROTECTED_VIRTUAL_COLUMN, -9740, -1, "HY000", "A protected base column was referenced in an unprotected virtual column expression", 28125, "A protected base column was referenced in an unprotected virtual column expression"); DEFINE_ORACLE_ERROR(OB_ERR_ATTRIBUTE_ASSOCIATION, -9741, -1, "HY000", "Attribute association failed for policy %.*s", 28126, "Attribute association failed for policy %.*s"); DEFINE_ORACLE_ERROR(OB_ERR_MERGE_INTO_WITH_POLICY, -9742, -1, "HY000", "The MERGE INTO syntax does not support the security policy", 28132, "The MERGE INTO syntax does not support the security policy"); - +DEFINE_ERROR_EXT(OB_ERR_SP_NO_DROP_SP, -9743, ER_SP_NO_DROP_SP, "HY000", "Can't drop or alter a procedure/function from within another stored routine.", "Can't drop or alter a '%s' from within another stored routine."); //////////////////////////////////////////////////////////////// // !!! text/blob || clob/blob erro code // for compat we cant not remove this errno!!!! diff --git a/src/share/ob_errno.h b/src/share/ob_errno.h index 798e1da143..fce352e01d 100644 --- a/src/share/ob_errno.h +++ b/src/share/ob_errno.h @@ -1626,6 +1626,7 @@ constexpr int OB_ERR_INVALID_SEC_COLUMN_TYPE = -9739; constexpr int OB_ERR_UNPROTECTED_VIRTUAL_COLUMN = -9740; constexpr int OB_ERR_ATTRIBUTE_ASSOCIATION = -9741; constexpr int OB_ERR_MERGE_INTO_WITH_POLICY = -9742; +constexpr int OB_ERR_SP_NO_DROP_SP = -9743; 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; @@ -3581,6 +3582,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219; #define OB_ERR_UNPROTECTED_VIRTUAL_COLUMN__USER_ERROR_MSG "A protected base column was referenced in an unprotected virtual column expression" #define OB_ERR_ATTRIBUTE_ASSOCIATION__USER_ERROR_MSG "Attribute association failed for policy %.*s" #define OB_ERR_MERGE_INTO_WITH_POLICY__USER_ERROR_MSG "The MERGE INTO syntax does not support the security policy" +#define OB_ERR_SP_NO_DROP_SP__USER_ERROR_MSG "Can't drop or alter a '%s' from within another stored routine." #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" @@ -5536,6 +5538,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219; #define OB_ERR_UNPROTECTED_VIRTUAL_COLUMN__ORA_USER_ERROR_MSG "ORA-28125: A protected base column was referenced in an unprotected virtual column expression" #define OB_ERR_ATTRIBUTE_ASSOCIATION__ORA_USER_ERROR_MSG "ORA-28126: Attribute association failed for policy %.*s" #define OB_ERR_MERGE_INTO_WITH_POLICY__ORA_USER_ERROR_MSG "ORA-28132: The MERGE INTO syntax does not support the security policy" +#define OB_ERR_SP_NO_DROP_SP__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9743, Can't drop or alter a '%s' from within another stored routine." #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"