Change the error code prefix from ORA to OBE in ob oracle mode

This commit is contained in:
obdev 2024-07-23 10:46:45 +00:00 committed by ob-robot
parent a47cff45c8
commit c82c2fbef7
39 changed files with 9583 additions and 2550 deletions

View File

@ -1204,7 +1204,11 @@ LOG_MOD_END(PL)
{ \
CHECK_LOG_USER_CONST_FMT(errcode) \
if (lib::is_oracle_mode()) { \
_LOG_USER_MSG(level, errcode, LOG_MACRO_JOIN(errcode, __ORA_USER_ERROR_MSG), ##args); \
if (!g_enable_ob_error_msg_style) { \
_LOG_USER_MSG(level, errcode, LOG_MACRO_JOIN(errcode, __ORA_USER_ERROR_MSG), ##args); \
} else { \
_LOG_USER_MSG(level, errcode, LOG_MACRO_JOIN(errcode, __OBE_USER_ERROR_MSG), ##args); \
} \
} else { \
_LOG_USER_MSG(level, errcode, LOG_MACRO_JOIN(errcode, __USER_ERROR_MSG), ##args); \
} \
@ -1219,7 +1223,11 @@ LOG_MOD_END(PL)
do \
{ \
CHECK_LOG_USER_CONST_FMT(errcode) \
_LOG_USER_MSG(level, errcode, LOG_MACRO_JOIN(errcode, __ORA_USER_ERROR_MSG), ##args); \
if (!g_enable_ob_error_msg_style) { \
_LOG_USER_MSG(level, errcode, LOG_MACRO_JOIN(errcode, __ORA_USER_ERROR_MSG), ##args); \
} else { \
_LOG_USER_MSG(level, errcode, LOG_MACRO_JOIN(errcode, __OBE_USER_ERROR_MSG), ##args); \
} \
} while(0)
#define LOG_MYSQL_USER_ERROR(errcode, args...) \
LOG_USER_MYSQL(::oceanbase::common::ObLogger::USER_ERROR, errcode, ##args)

View File

@ -101,8 +101,8 @@ const ObOracleTimeLimiter ObDFMLimit::HOUR24 = {0, 23, O
const ObOracleTimeLimiter ObDFMLimit::MINUTE = {0, 59, OB_ERR_INVALID_MINUTES_VALUE};
const ObOracleTimeLimiter ObDFMLimit::SECOND = {0, 59, OB_ERR_INVALID_SECONDS_VALUE};
const ObOracleTimeLimiter ObDFMLimit::SECS_PAST_MIDNIGHT = {0, 86399, OB_ERR_INVALID_SECONDS_IN_DAY_VALUE};
const ObOracleTimeLimiter ObDFMLimit::TIMEZONE_HOUR_ABS = {0, 15, OB_INVALID_DATE_VALUE}; //ORA-01874: time zone hour must be between -15 and 15
const ObOracleTimeLimiter ObDFMLimit::TIMEZONE_MIN_ABS = {0, 59, OB_INVALID_DATE_VALUE}; //ORA-01875: time zone minute must be between -59 and 59
const ObOracleTimeLimiter ObDFMLimit::TIMEZONE_HOUR_ABS = {0, 15, OB_INVALID_DATE_VALUE}; //OBE-01874: time zone hour must be between -15 and 15
const ObOracleTimeLimiter ObDFMLimit::TIMEZONE_MIN_ABS = {0, 59, OB_INVALID_DATE_VALUE}; //OBE-01875: time zone minute must be between -59 and 59
const ObOracleTimeLimiter ObDFMLimit::JULIAN_DATE = {1, 5373484,OB_ERR_INVALID_JULIAN_DATE_VALUE}; // -4712-01-01 ~ 9999-12-31
@ -139,7 +139,7 @@ int ObDFMUtil::match_int_value_with_comma(ObDFMParseCtx &ctx,
stop_flag = true;
} else {
if (OB_UNLIKELY(!isdigit(cur_char))) {
ret = OB_ERR_NON_NUMERIC_CHARACTER_VALUE; //ORA-01858: a non-numeric character was found where a numeric was expected
ret = OB_ERR_NON_NUMERIC_CHARACTER_VALUE; //OBE-01858: a non-numeric character was found where a numeric was expected
LOG_WARN("failed to match int value", K(ret));
} else {
temp_value *= 10;
@ -238,7 +238,7 @@ int ObDFMUtil::match_int_value(ObDFMParseCtx &ctx,
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid argument", K(ret), K(ctx), K(expected_len), K(value_sign));
} else if (!isdigit(ctx.cur_ch_[0])) { //check the first char
ret = OB_ERR_NON_NUMERIC_CHARACTER_VALUE; //ORA-01858: a non-numeric character was found where a numeric was expected
ret = OB_ERR_NON_NUMERIC_CHARACTER_VALUE; //OBE-01858: a non-numeric character was found where a numeric was expected
}
int64_t date_max_len = std::min(ctx.remain_len_, expected_len);
@ -483,7 +483,7 @@ int ObDFMUtil::check_semantic(const ObDFMElemArr &elements, ObFixedBitSet<OB_DEF
//check no duplicate elem first
if (OB_SUCC(ret)) {
if (OB_UNLIKELY(flag_bitmap.has_member(flag))) {
ret = OB_ERR_FORMAT_CODE_APPEARS_TWICE; //ORA-01810: format code appears twice
ret = OB_ERR_FORMAT_CODE_APPEARS_TWICE; //OBE-01810: format code appears twice
LOG_WARN("datetime format model check failed", K(ret), "flag", ObString(ObDFMFlag::PATTERN[flag].ptr_));
} else if (OB_FAIL(flag_bitmap.add_member(flag))) {
LOG_WARN("failed to add bitmap", K(ret), "flag", ObString(ObDFMFlag::PATTERN[flag].ptr_));

View File

@ -240,14 +240,14 @@ enum ElementFlag : int64_t
//定义组内冲突时,报什么错
static constexpr int CONFLICT_GROUP_ERR[MAX_CONFLICT_GROUP_NUMBER] =
{
/*NEVER_APPEAR_GROUP*/ OB_ERR_FORMAT_CODE_CANNOT_APPEAR, //ORA-01820: format code cannot appear in date input format
/*YEAR_GROUP*/ OB_ERR_YEAR_MAY_ONLY_BE_SPECIFIED_ONCE, //ORA-01812: year may only be specified once
/*MERIDIAN_INDICATOR_GROUP*/ OB_ERR_AM_PM_CONFLICTS_WITH_USE_OF_AM_DOT_PM_DOT, //ORA-01810: format code appears twice
/*WEEK_OF_DAY_GROUP*/ OB_ERR_DAY_OF_WEEK_SPECIFIED_MORE_THAN_ONCE, //ORA-01817: day of week may only be specified once
/*ERA_GROUP*/ OB_ERR_BC_AD_CONFLICT_WITH_USE_OF_BC_DOT_AD_DOT, //ORA-01810: format code appears twice
/*HOUR_GROUP*/ OB_ERR_HOUR_MAY_ONLY_BE_SPECIFIED_ONCE, //ORA-01813: hour may only be specified once
/*MONTH_GROUP*/ OB_ERR_MONTH_MAY_ONLY_BE_SPECIFIED_ONCE, //ORA-01816: month may only be specified once
/*DAY_OF_YEAR_GROUP*/ OB_ERR_JULIAN_DATE_PRECLUDES_USE_OF_DAY_OF_YEAR //ORA-1811: Julian date precludes use of day of year
/*NEVER_APPEAR_GROUP*/ OB_ERR_FORMAT_CODE_CANNOT_APPEAR, //OBE-01820: format code cannot appear in date input format
/*YEAR_GROUP*/ OB_ERR_YEAR_MAY_ONLY_BE_SPECIFIED_ONCE, //OBE-01812: year may only be specified once
/*MERIDIAN_INDICATOR_GROUP*/ OB_ERR_AM_PM_CONFLICTS_WITH_USE_OF_AM_DOT_PM_DOT, //OBE-01810: format code appears twice
/*WEEK_OF_DAY_GROUP*/ OB_ERR_DAY_OF_WEEK_SPECIFIED_MORE_THAN_ONCE, //OBE-01817: day of week may only be specified once
/*ERA_GROUP*/ OB_ERR_BC_AD_CONFLICT_WITH_USE_OF_BC_DOT_AD_DOT, //OBE-01810: format code appears twice
/*HOUR_GROUP*/ OB_ERR_HOUR_MAY_ONLY_BE_SPECIFIED_ONCE, //OBE-01813: hour may only be specified once
/*MONTH_GROUP*/ OB_ERR_MONTH_MAY_ONLY_BE_SPECIFIED_ONCE, //OBE-01816: month may only be specified once
/*DAY_OF_YEAR_GROUP*/ OB_ERR_JULIAN_DATE_PRECLUDES_USE_OF_DAY_OF_YEAR //OBE-1811: Julian date precludes use of day of year
};
//定义每个元素(数字类型)期望匹配长度,可以小于这个长度,不能超过

View File

@ -59,13 +59,13 @@ const int64_t TZ_PART_BASE[DATETIME_PART_CNT] = { 100, 12, -1, 24, 60, 60, 10000
const int64_t TZ_PART_MIN[DATETIME_PART_CNT] = { 1, 1, 1, 0, 0, 0, 0};
const int64_t TZ_PART_MAX[DATETIME_PART_CNT] = {9999, 12, 31, 23, 59, 59, 1000000000};
const int TZ_PART_ERR[DATETIME_PART_CNT] = {
/*DT_YEAR*/ OB_ERR_INVALID_YEAR_VALUE, //ORA-01841: (full) year must be between -4713 and +9999, and not be 0
/*DT_MON*/ OB_ERR_INVALID_MONTH, //ORA-01843: not a valid month
/*DT_MDAY*/ OB_ERR_DAY_OF_MONTH_RANGE, //ORA-01847: day of month must be between 1 and last day of month
/*DT_HOUR*/ OB_ERR_INVALID_HOUR24_VALUE, //ORA-01850: hour must be between 0 and 23
/*DT_MIN*/ OB_ERR_INVALID_MINUTES_VALUE, //ORA-01851: minutes must be between 0 and 59
/*DT_SEC*/ OB_ERR_INVALID_SECONDS_VALUE, //ORA-01852: seconds must be between 0 and 59
/*DT_USEC*/ OB_ERR_THE_LEADING_PRECISION_OF_THE_INTERVAL_IS_TOO_SMALL, //ORA-01873: the leading precision of the interval is too small
/*DT_YEAR*/ OB_ERR_INVALID_YEAR_VALUE, //OBE-01841: (full) year must be between -4713 and +9999, and not be 0
/*DT_MON*/ OB_ERR_INVALID_MONTH, //OBE-01843: not a valid month
/*DT_MDAY*/ OB_ERR_DAY_OF_MONTH_RANGE, //OBE-01847: day of month must be between 1 and last day of month
/*DT_HOUR*/ OB_ERR_INVALID_HOUR24_VALUE, //OBE-01850: hour must be between 0 and 23
/*DT_MIN*/ OB_ERR_INVALID_MINUTES_VALUE, //OBE-01851: minutes must be between 0 and 59
/*DT_SEC*/ OB_ERR_INVALID_SECONDS_VALUE, //OBE-01852: seconds must be between 0 and 59
/*DT_USEC*/ OB_ERR_THE_LEADING_PRECISION_OF_THE_INTERVAL_IS_TOO_SMALL, //OBE-01873: the leading precision of the interval is too small
};
static const int8_t DAYS_PER_MON[2][12 + 1] = {
@ -259,9 +259,9 @@ const ObString ObTimeConverter::COMPAT_OLD_NLS_DATE_FORMAT("YYYY-MM-DD HH24:MI:S
const ObString ObTimeConverter::COMPAT_OLD_NLS_TIMESTAMP_FORMAT("YYYY-MM-DD HH24:MI:SS.FF");
const ObString ObTimeConverter::COMPAT_OLD_NLS_TIMESTAMP_TZ_FORMAT("YYYY-MM-DD HH24:MI:SS.FF TZR TZD");
const ObOracleTimeLimiter ObIntervalLimit::YEAR = {0, static_cast<int32_t>(power_of_10[9] - 1), OB_ERR_INTERVAL_INVALID}; // ORA-01873: the leading precision of the interval is too small
const ObOracleTimeLimiter ObIntervalLimit::YEAR = {0, static_cast<int32_t>(power_of_10[9] - 1), OB_ERR_INTERVAL_INVALID}; // OBE-01873: the leading precision of the interval is too small
const ObOracleTimeLimiter ObIntervalLimit::MONTH = {0, 11, OB_ERR_INVALID_MONTH};
const ObOracleTimeLimiter ObIntervalLimit::DAY = {0, static_cast<int32_t>(power_of_10[9] - 1), OB_ERR_INTERVAL_INVALID}; // ORA-01873: the leading precision of the interval is too small
const ObOracleTimeLimiter ObIntervalLimit::DAY = {0, static_cast<int32_t>(power_of_10[9] - 1), OB_ERR_INTERVAL_INVALID}; // OBE-01873: the leading precision of the interval is too small
const ObOracleTimeLimiter ObIntervalLimit::HOUR = {0, 23, OB_ERR_INTERVAL_INVALID};
const ObOracleTimeLimiter ObIntervalLimit::MINUTE = {0, 59, OB_ERR_INTERVAL_INVALID};
const ObOracleTimeLimiter ObIntervalLimit::SECOND = {0, 59, OB_ERR_INTERVAL_INVALID};
@ -719,19 +719,19 @@ int ObTimeConverter::get_oracle_err_when_datetime_parts_conflict(int64_t part_id
ret = OB_ERR_UNEXPECTED;//never goes here for now
break;
case DT_MON:
ret = OB_ERR_MONTH_CONFLICTS_WITH_JULIAN_DATE;//ORA-01833: month conflicts with Julian date
ret = OB_ERR_MONTH_CONFLICTS_WITH_JULIAN_DATE;//OBE-01833: month conflicts with Julian date
break;
case DT_MDAY:
ret = OB_ERR_DAY_OF_MONTH_CONFLICTS_WITH_JULIAN_DATE;//ORA-01834: day of month conflicts with Julian date
ret = OB_ERR_DAY_OF_MONTH_CONFLICTS_WITH_JULIAN_DATE;//OBE-01834: day of month conflicts with Julian date
break;
case DT_HOUR:
ret = OB_ERR_HOUR_CONFLICTS_WITH_SECONDS_IN_DAY;//ORA-01836: hour conflicts with seconds in day
ret = OB_ERR_HOUR_CONFLICTS_WITH_SECONDS_IN_DAY;//OBE-01836: hour conflicts with seconds in day
break;
case DT_MIN:
ret = OB_ERR_MINUTES_OF_HOUR_CONFLICTS_WITH_SECONDS_IN_DAY;//ORA-01837: minutes of hour conflicts with seconds in day
ret = OB_ERR_MINUTES_OF_HOUR_CONFLICTS_WITH_SECONDS_IN_DAY;//OBE-01837: minutes of hour conflicts with seconds in day
break;
case DT_SEC:
ret = OB_ERR_SECONDS_OF_MINUTE_CONFLICTS_WITH_SECONDS_IN_DAY;//ORA-01838: seconds of minute conflicts with seconds in day
ret = OB_ERR_SECONDS_OF_MINUTE_CONFLICTS_WITH_SECONDS_IN_DAY;//OBE-01838: seconds of minute conflicts with seconds in day
break;
default:
ret = OB_ERR_UNEXPECTED;

View File

@ -397,7 +397,7 @@ int ObPathParser::check_is_legal_xpath(const ObPathArgType& patharg_type)
if (location1->get_seek_type() == ObSeekType::TEXT
&& location1->get_prefix_ns_info()
&& ObPathUtil::is_upper_axis(location2->get_axis())) {
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid number of arguments", K(ret), K(location2->get_axis()));
}
if (OB_FAIL(ret)) {
@ -1049,7 +1049,7 @@ int ObPathParser::parse_func_node(ObPathArgType patharg_type)
LOG_WARN("fail to init ellipsis_node", K(ret), K(index_), K(expression_));
} else if (patharg_type == ObPathArgType::NOT_SUBPATH
&& ObPathParserUtil::is_func_must_in_pred(func_type)) {
//ORA-31012: Given XPATH expression not supported
//OBE-31012: Given XPATH expression not supported
ret = OB_OP_NOT_ALLOW;
LOG_WARN("Given XPATH expression not supported", K(ret), K(index_), K(expression_));
}
@ -1354,7 +1354,7 @@ int ObPathParser::parse_namespace_info(ObPathLocationNode*& location, ObString&
location->set_check_ns_info(true);
}
} else if (OB_ISNULL(pass_var_)) {
// ORA-31013: Invalid XPATH expression
// OBE-31013: Invalid XPATH expression
// no passing var, prefix ns is not allowed
ret = OB_INVALID_ARGUMENT;
LOG_WARN("Invalid XPATH expression.", K(ret), K(index_), K(expression_));
@ -1424,10 +1424,10 @@ int ObPathParser::parse_nodetest_info(ObPathLocationNode*& location)
} else if (ns_str.length() > 0) {
allocator_->free(location->get_ns_name().ptr());
if (location->get_seek_type() != ObSeekType::TEXT) {
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid arguments", K(ret));
} else if (ObPathUtil::is_upper_axis(location->get_axis())) {
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid arguments", K(ret));
} else {
location->set_prefix_ns_info(true);
@ -1583,7 +1583,7 @@ int ObPathParser::parse_double_slash_node()
ObXPathUtil::skip_whitespace(expression_, index_);
ObPathLocationNode* ellipsis_node = nullptr;
if (index_ >= len_ || expression_[index_] == ObPathItem::SLASH) {
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid arguments", K(ret));
} else if (OB_FAIL(alloc_location_node(ellipsis_node))) {
LOG_WARN("allocate row buffer failed at path_node", K(ret), K(index_), K(expression_));
@ -1641,7 +1641,7 @@ int ObPathParser::parse_double_slash_node()
root_node->need_trans_++;
}
} else {
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid arguments", K(ret));
}
}
@ -1652,7 +1652,7 @@ int ObPathParser::parse_double_slash_node()
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid path expression", K(ret), K(index_), K(expression_));
} else {
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid arguments", K(ret));
}
}
@ -1697,7 +1697,7 @@ int ObPathParser::parse_double_dot_node(bool is_absolute)
LOG_WARN("failed to append location node.", K(ret), K(index_), K(expression_));
} else if (index_ < len_ && expression_[index_] != ObPathItem::SLASH) {
// '/..' must be followed by a new step, if not end
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid arguments", K(ret));
}
}
@ -1741,7 +1741,7 @@ int ObPathParser::parse_single_dot_node(bool is_absolute)
root_node->need_trans_++;
}
} else if (index_ < len_ && expression_[index_] == ObPathItem::WILDCARD) {
// ORA-31012: Given XPATH expression not supported
// OBE-31012: Given XPATH expression not supported
ret = OB_OP_NOT_ALLOW;
LOG_WARN("/.* is not allowed", K(ret), K(index_), K(expression_));
} else if (index_ < len_ && ObPathParserUtil::is_xml_name_start_char(expression_[index_])) {

View File

@ -874,7 +874,7 @@ int ObPathFuncNode::check_is_all_location_without_filter(ObPathNode* arg_root)
LOG_WARN("Given XPATH expression not supported", K(ret));
} // check if without filter
} else if (node->node_type_.is_func()) {
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid number of arguments", K(ret), K(node->node_type_.node_class_));
}
} // end for
@ -888,7 +888,7 @@ int ObPathFuncNode::check_is_legal_count_arg()
// after size check, size must be 1
ObPathNode* func_arg = static_cast<ObPathNode*>(member(0));
if (OB_ISNULL(func_arg) || func_arg->node_type_.is_location()) {
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid arguments", K(ret), K(func_arg->node_type_.node_class_));
}
@ -963,7 +963,7 @@ int ObPathFuncNode::check_is_legal_arg()
{
INIT_SUCC(ret);
if (min_arg_num_ > size() || max_arg_num_ < size()) { // check_arg_num
ret = OB_ERR_PARSER_SYNTAX; // ORA-31011: XML parsing failed
ret = OB_ERR_PARSER_SYNTAX; // OBE-31011: XML parsing failed
LOG_WARN("Function call with invalid number of arguments", K(ret), K(min_arg_num_), K(max_arg_num_));
} else { // check arg type
switch (node_type_.get_func_type()) {

View File

@ -11,6 +11,7 @@
#include "ob_log_flashback_service.h"
#include "lib/mysqlclient/ob_mysql_proxy.h"
#include "share/scn.h"
#include "share/ob_errno.h"
namespace oceanbase
{

View File

@ -454,7 +454,7 @@ int ObMPStmtExecute::save_exception_for_arraybinding(
} else {
errm_result = ob_errpkt_strerror(error_code, true);
if (NULL == errm_result) {
errm_result = "ORA%ld: Message error_code not found; product=RDBMS; facility=ORA";
errm_result = "OBE%ld: Message error_code not found; product=RDBMS; facility=ORA";
}
errm_length = strlen(errm_result);
}

View File

@ -10849,7 +10849,7 @@ int ObPLResolver::resolve_inner_call(
OZ (resolve_call_param_list(params, package_routine_info->get_params(), call_stmt, func));
} else if (params.count() != 0) {
ret = OB_INVALID_ARGUMENT_NUM;
LOG_WARN("ORA-06553:PLS-306:wrong number or types of arguments in call procedure",
LOG_WARN("OBE-06553:PLS-306:wrong number or types of arguments in call procedure",
K(ret), K(params.count()), K(package_routine_info->get_param_count()));
}
} else if (access_idxs.at(idx_cnt - 1).is_external_procedure()) {
@ -10882,7 +10882,7 @@ int ObPLResolver::resolve_inner_call(
OZ (resolve_call_param_list(params, schema_routine_info->get_routine_params(), call_stmt, func));
} else if (params.count() != 0) {
ret = OB_INVALID_ARGUMENT_NUM;
LOG_WARN("ORA-06553:PLS-306:wrong number or types of arguments in call procedure",
LOG_WARN("OBE-06553:PLS-306:wrong number or types of arguments in call procedure",
K(ret), K(params.count()), K(schema_routine_info->get_param_count()));
}
} else if (access_idxs.at(idx_cnt - 1).is_nested_procedure()) {
@ -10899,7 +10899,7 @@ int ObPLResolver::resolve_inner_call(
OZ (resolve_call_param_list(params, root_routine_info->get_params(), call_stmt, func));
} else if (params.count() != 0) {
ret = OB_INVALID_ARGUMENT_NUM;
LOG_WARN("ORA-06553:PLS-306:wrong number or types of arguments in call procedure",
LOG_WARN("OBE-06553:PLS-306:wrong number or types of arguments in call procedure",
K(ret), K(params.count()), K(root_routine_info->get_param_count()));
}
} else {
@ -12577,7 +12577,7 @@ int ObPLResolver::resolve_udf_info(
ret = OB_NOT_SUPPORTED;
LOG_WARN("You tried to execute a SQL statement that referenced a package or function\
that contained an OUT parameter. This is not allowed.", K(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "ORA-06572: function name has out arguments");
LOG_USER_ERROR(OB_NOT_SUPPORTED, "OBE-06572: function name has out arguments");
}
if (OB_SUCC(ret) && !resolve_ctx_.is_sql_scope_) {
ObUDFRawExpr *udf_raw_expr = NULL;
@ -15208,32 +15208,32 @@ struct ObPredefinedException {
static ObPredefinedException PREDEFINED_EXCEPTIONS[] =
{
DEFINED_EXCEPTION("ACCESS_INTO_NULL", OB_ERR_ACCESS_INTO_NULL), // ORA-6530
DEFINED_EXCEPTION("CASE_NOT_FOUND", OB_ER_SP_CASE_NOT_FOUND), // ORA-6592
DEFINED_EXCEPTION("COLLECTION_IS_NULL", OB_ERR_COLLECION_NULL), // ORA-6531
DEFINED_EXCEPTION("CURSOR_ALREADY_OPEN", OB_ER_SP_CURSOR_ALREADY_OPEN), // ORA-6511
DEFINED_EXCEPTION("DUP_VAL_ON_INDEX", OB_ERR_PRIMARY_KEY_DUPLICATE), // ORA-1
DEFINED_EXCEPTION("ACCESS_INTO_NULL", OB_ERR_ACCESS_INTO_NULL), // OBE-6530
DEFINED_EXCEPTION("CASE_NOT_FOUND", OB_ER_SP_CASE_NOT_FOUND), // OBE-6592
DEFINED_EXCEPTION("COLLECTION_IS_NULL", OB_ERR_COLLECION_NULL), // OBE-6531
DEFINED_EXCEPTION("CURSOR_ALREADY_OPEN", OB_ER_SP_CURSOR_ALREADY_OPEN), // OBE-6511
DEFINED_EXCEPTION("DUP_VAL_ON_INDEX", OB_ERR_PRIMARY_KEY_DUPLICATE), // OBE-1
DEFINED_EXCEPTION("INVALID_CURSOR", OB_ERR_INVALID_CURSOR), // ORA-1001
DEFINED_EXCEPTION("INVALID_NUMBER", OB_INVALID_NUMERIC), // ORA-1722
DEFINED_EXCEPTION("LOGIN_DENIED", OB_ERR_LOGIN_DENIED), // ORA-1017
DEFINED_EXCEPTION("NO_DATA_FOUND", OB_READ_NOTHING), // ORA-+100
DEFINED_EXCEPTION("NO_DATA_NEEDED", OB_ERR_NO_DATA_NEEDED), // ORA-6548
DEFINED_EXCEPTION("INVALID_CURSOR", OB_ERR_INVALID_CURSOR), // OBE-1001
DEFINED_EXCEPTION("INVALID_NUMBER", OB_INVALID_NUMERIC), // OBE-1722
DEFINED_EXCEPTION("LOGIN_DENIED", OB_ERR_LOGIN_DENIED), // OBE-1017
DEFINED_EXCEPTION("NO_DATA_FOUND", OB_READ_NOTHING), // OBE-+100
DEFINED_EXCEPTION("NO_DATA_NEEDED", OB_ERR_NO_DATA_NEEDED), // OBE-6548
DEFINED_EXCEPTION("NOT_LOGGED_ON", OB_ERR_NOT_LOGGED_ON), // ORA-1012
DEFINED_EXCEPTION("PROGRAM_ERROR", OB_ERR_PROGRAM_ERROR), // ORA-6501
DEFINED_EXCEPTION("ROWTYPE_MISMATCH", OB_ERR_ROWTYPE_MISMATCH), // ORA-6504
DEFINED_EXCEPTION("SELF_IS_NULL", OB_ERR_SELF_IS_NULL), // ORA-30625
DEFINED_EXCEPTION("STORAGE_ERROR", OB_ERR_STORAGE_ERROR), // ORA-6500
DEFINED_EXCEPTION("NOT_LOGGED_ON", OB_ERR_NOT_LOGGED_ON), // OBE-1012
DEFINED_EXCEPTION("PROGRAM_ERROR", OB_ERR_PROGRAM_ERROR), // OBE-6501
DEFINED_EXCEPTION("ROWTYPE_MISMATCH", OB_ERR_ROWTYPE_MISMATCH), // OBE-6504
DEFINED_EXCEPTION("SELF_IS_NULL", OB_ERR_SELF_IS_NULL), // OBE-30625
DEFINED_EXCEPTION("STORAGE_ERROR", OB_ERR_STORAGE_ERROR), // OBE-6500
DEFINED_EXCEPTION("SUBSCRIPT_BEYOND_COUNT", OB_ERR_SUBSCRIPT_BEYOND_COUNT), // ORA-6533
DEFINED_EXCEPTION("SUBSCRIPT_OUTSIDE_LIMIT", OB_ERR_SUBSCRIPT_OUTSIDE_LIMIT), // ORA-6532
DEFINED_EXCEPTION("SYS_INVALID_ROWID", OB_INVALID_ROWID), // ORA-1410
DEFINED_EXCEPTION("TIMEOUT_ON_RESOURCE", OB_ERR_TIMEOUT_ON_RESOURCE), // ORA-51
DEFINED_EXCEPTION("TOO_MANY_ROWS", OB_ERR_TOO_MANY_ROWS), // ORA-1422
DEFINED_EXCEPTION("SUBSCRIPT_BEYOND_COUNT", OB_ERR_SUBSCRIPT_BEYOND_COUNT), // OBE-6533
DEFINED_EXCEPTION("SUBSCRIPT_OUTSIDE_LIMIT", OB_ERR_SUBSCRIPT_OUTSIDE_LIMIT), // OBE-6532
DEFINED_EXCEPTION("SYS_INVALID_ROWID", OB_INVALID_ROWID), // OBE-1410
DEFINED_EXCEPTION("TIMEOUT_ON_RESOURCE", OB_ERR_TIMEOUT_ON_RESOURCE), // OBE-51
DEFINED_EXCEPTION("TOO_MANY_ROWS", OB_ERR_TOO_MANY_ROWS), // OBE-1422
DEFINED_EXCEPTION("VALUE_ERROR", OB_ERR_NUMERIC_OR_VALUE_ERROR), // ORA-6502
DEFINED_EXCEPTION("ZERO_DIVIDE", OB_ERR_DIVISOR_IS_ZERO), // ORA-1476
DEFINED_EXCEPTION("VALUE_ERROR", OB_ERR_NUMERIC_OR_VALUE_ERROR), // OBE-6502
DEFINED_EXCEPTION("ZERO_DIVIDE", OB_ERR_DIVISOR_IS_ZERO), // OBE-1476
};
int ObPLResolver::resolve_pre_condition(const ObString &name, const ObPLConditionValue **value)

View File

@ -335,7 +335,7 @@ int ObDbmsInfo::define_column(int64_t col_idx, ObObjType col_type,
ret = OB_NOT_SUPPORTED;
LOG_WARN("define column position is invalid", K(col_idx), K(fields_), K(col_type), K(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED,
"ORA-06562: type of out argument must match type of column or bind variable");
"OBE-06562: type of out argument must match type of column or bind variable");
} else {
#define ENABLE_RECOVER_EXIST 1
OZ (define_columns_.set_refactored(col_idx, col_size, ENABLE_RECOVER_EXIST));
@ -364,7 +364,7 @@ int ObDbmsInfo::define_array(int64_t col_idx,
LOG_WARN("define column position is invalid",
K(col_idx), K(fields_), K(id),K(elem_type), K(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED,
"ORA-06562: type of out argument must match type of column or bind variable");
"OBE-06562: type of out argument must match type of column or bind variable");
} else {
#define ENABLE_RECOVER_EXIST 1
ArrayDesc desc(id, cnt, lower_bnd, elem_type);
@ -983,7 +983,7 @@ int ObPLDbmsSql::define_column(ObExecContext &exec_ctx, ParamStore &params, ObOb
ret = OB_NOT_SUPPORTED;
LOG_WARN("column size cannot be used for this type", K(column_type), K(column_size), K(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED,
"ORA-06562: type of out argument must match type of column or bind variable");
"OBE-06562: type of out argument must match type of column or bind variable");
}
}
@ -1353,7 +1353,7 @@ int ObPLDbmsSql::do_describe(ObExecContext &exec_ctx, ParamStore &params, Descri
ret = OB_NOT_SUPPORTED;
LOG_WARN("Only select statement can be described", K(cursor->get_stmt_type()), K(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED,
"ORA-00900: invalid SQL statement, only select statement can be described");
"OBE-00900: invalid SQL statement, only select statement can be described");
}
OV (3 == params.count(), OB_INVALID_ARGUMENT, params);

View File

@ -38803,7 +38803,7 @@ int ObDDLService::recursive_check_trigger_ref_cyclic(share::schema::ObSchemaGett
if (0 == trg_info->get_ref_trg_name().case_compare(ref_trigger_info.get_trigger_name())) {
if (0 == trg_info->get_trigger_name().case_compare(generate_cyclic_name)) {
ret = OB_ERR_REF_CYCLIC_IN_TRG;
LOG_WARN("ORA-25023: cyclic trigger dependency is not allowed", K(ret),
LOG_WARN("OBE-25023: cyclic trigger dependency is not allowed", K(ret),
K(generate_cyclic_name), KPC(trg_info));
}
OZ (SMART_CALL(recursive_check_trigger_ref_cyclic(schema_guard, *trg_info, trigger_list,

View File

@ -21,6 +21,7 @@
#include "lib/utility/ob_tracepoint.h" // ERRSIM
#include "rootserver/ob_root_service.h" // callback
#include "share/ob_all_server_tracer.h"
#include "share/ob_errno.h"
#include "rootserver/ob_server_manager.h"
namespace oceanbase

View File

@ -105,6 +105,8 @@ int ObConfigManager::reload_config()
LOG_WARN("reload config for tde encrypt engine fail", K(ret));
} else if (OB_FAIL(GCTX.omt_->update_hidden_sys_tenant())) {
LOG_WARN("update hidden sys tenant failed", K(ret));
} else {
g_enable_ob_error_msg_style = GCONF.enable_ob_error_msg_style;
}
return ret;
}

View File

@ -33,8 +33,9 @@ while(<$fh>) {
++$error_count;
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $6, $7];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $6, $7];
my $tmp_obe_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $6, $7];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $6, $7];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -43,8 +44,9 @@ while(<$fh>) {
++$error_count;
#print "\"$1\", $1, $2, $3, $4, $5\n";
my $tmp_ora_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
my $tmp_obe_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -54,8 +56,10 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7, $8\n";
my $tmp_ora_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
my $tmp_ora_user_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($6, 1, length($6) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $7, $8];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $7, $8];
my $tmp_obe_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
my $tmp_obe_user_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($6, 1, length($6) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $7, $8];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $7, $8];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -65,8 +69,10 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6\n";
my $tmp_ora_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
my $tmp_ora_user_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($6, 1, length($6) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
my $tmp_obe_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
my $tmp_obe_user_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($6, 1, length($6) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -76,8 +82,9 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7, $8, $9\n";
#print "\"$1\", $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "ORA", $6, substr($7, 1, length($7) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $8, $9];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $8, $9];
my $tmp_obe_errmsg=sprintf($print_ora_errmsg, "OBE", $6, substr($7, 1, length($7) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $8, $9];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $8, $9];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -87,8 +94,9 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7\n";
#print "\"$1\", $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "ORA", $6, substr($7, 1, length($7) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
my $tmp_obe_errmsg=sprintf($print_ora_errmsg, "OBE", $6, substr($7, 1, length($7) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -99,8 +107,10 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "ORA", $7, substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf($print_ora_errmsg, "ORA", $7, substr($9, 1, length($9) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
my $tmp_obe_errmsg=sprintf($print_ora_errmsg, "OBE", $7, substr($8, 1, length($8) - 2));
my $tmp_obe_user_errmsg=sprintf($print_ora_errmsg, "OBE", $7, substr($9, 1, length($9) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $10, $11];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $10, $11];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -111,8 +121,10 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "ORA", $7, substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf($print_ora_errmsg, "ORA", $7, substr($9, 1, length($9) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
my $tmp_obe_errmsg=sprintf($print_ora_errmsg, "OBE", $7, substr($8, 1, length($8) - 2));
my $tmp_obe_user_errmsg=sprintf($print_ora_errmsg, "OBE", $7, substr($9, 1, length($9) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -126,8 +138,8 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7, $8, $9\n";
#print "\"$1\", $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "PLS", $6, substr($7, 1, length($7) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $8, $9];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $8, $9];
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $8, $9];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $8, $9];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -137,8 +149,8 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7\n";
#print "\"$1\", $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "PLS", $6, substr($7, 1, length($7) - 2));
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
$map_share{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -149,8 +161,8 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "PLS", $7, substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf($print_ora_errmsg, "PLS", $7, substr($9, 1, length($9) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -161,8 +173,8 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "PLS", $7, substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf($print_ora_errmsg, "PLS", $7, substr($9, 1, length($9) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -173,8 +185,8 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf("\"%s\"", substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf("\"%s\"", substr($9, 1, length($9) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -185,8 +197,8 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf("\"%s\"", substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf("\"%s\"", substr($9, 1, length($9) - 2));
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map_share{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -195,8 +207,9 @@ while(<$fh>) {
++$error_count;
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $6, $7];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $6, $7];
my $tmp_obe_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $6, $7];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $6, $7];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -205,8 +218,9 @@ while(<$fh>) {
++$error_count;
#print "\"$1\", $1, $2, $3, $4, $5\n";
my $tmp_ora_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
my $tmp_obe_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -216,8 +230,10 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7, $8\n";
my $tmp_ora_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
my $tmp_ora_user_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($6, 1, length($6) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $7, $8];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $7, $8];
my $tmp_obe_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
my $tmp_obe_user_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($6, 1, length($6) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $7, $8];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $7, $8];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -227,8 +243,10 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6\n";
my $tmp_ora_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
my $tmp_ora_user_errmsg=sprintf($print_def_ora_errmsg, "ORA", $def_ora_errno, $2, substr($6, 1, length($6) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
my $tmp_obe_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($5, 1, length($5) - 2));
my $tmp_obe_user_errmsg=sprintf($print_def_ora_errmsg, "OBE", $def_ora_errno, $2, substr($6, 1, length($6) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $def_ora_errno, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -238,8 +256,9 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7, $8, $9\n";
#print "\"$1\", $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "ORA", $6, substr($7, 1, length($7) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $8, $9];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $8, $9];
my $tmp_obe_errmsg=sprintf($print_ora_errmsg, "OBE", $6, substr($7, 1, length($7) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $8, $9];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $8, $9];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -249,8 +268,9 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7\n";
#print "\"$1\", $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "ORA", $6, substr($7, 1, length($7) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $print_error_cause, $print_error_solution];
my $tmp_obe_errmsg=sprintf($print_ora_errmsg, "OBE", $6, substr($7, 1, length($7) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_obe_errmsg, $tmp_obe_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -261,8 +281,10 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "ORA", $7, substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf($print_ora_errmsg, "ORA", $7, substr($9, 1, length($9) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $10, $11];
my $tmp_obe_errmsg=sprintf($print_ora_errmsg, "OBE", $7, substr($8, 1, length($8) - 2));
my $tmp_obe_user_errmsg=sprintf($print_ora_errmsg, "OBE", $7, substr($9, 1, length($9) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $10, $11];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $10, $11];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -273,8 +295,10 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "ORA", $7, substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf($print_ora_errmsg, "ORA", $7, substr($9, 1, length($9) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $print_error_cause, $print_error_solution];
my $tmp_obe_errmsg=sprintf($print_ora_errmsg, "OBE", $7, substr($8, 1, length($8) - 2));
my $tmp_obe_user_errmsg=sprintf($print_ora_errmsg, "OBE", $7, substr($9, 1, length($9) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $print_error_cause, $print_error_solution];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_obe_errmsg, $tmp_obe_user_errmsg, $print_error_cause, $print_error_solution];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -288,8 +312,8 @@ while(<$fh>) {
#print "\"$1\", $1, $2, $3, $4, $5, $6, $7\n";
#print "\"$1\", $6, $7\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "PLS", $6, substr($7, 1, length($7) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg];
$map_deps{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg];
$map{$1} = [$2, $3, $4, $5, $5, "$1", $6, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg, $tmp_ora_errmsg];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -300,8 +324,8 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf($print_ora_errmsg, "PLS", $7, substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf($print_ora_errmsg, "PLS", $7, substr($9, 1, length($9) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg];
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -312,8 +336,8 @@ while(<$fh>) {
#print "\"$1\", $7, $8, $9\n";
my $tmp_ora_errmsg=sprintf("\"%s\"", substr($8, 1, length($8) - 2));
my $tmp_ora_user_errmsg=sprintf("\"%s\"", substr($9, 1, length($9) - 2));
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg];
$map_deps{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg];
$map{$1} = [$2, $3, $4, $5, $6, "$1", $7, $tmp_ora_errmsg, $tmp_ora_user_errmsg, $tmp_ora_errmsg, $tmp_ora_user_errmsg];
$last_errno = $2 if ($2 < $last_errno);
$error_code = $2;
$sqlstate = $4;
@ -379,7 +403,8 @@ print $fh_header '
namespace oceanbase
{
namespace common
{';
{
extern int g_enable_ob_error_msg_style;';
print $fh_header "
constexpr int OB_LAST_ERROR_CODE = $last_errno;
constexpr int OB_ERR_SQL_START = -5000;
@ -412,6 +437,7 @@ constexpr int OB_ERR_SQL_END = -5999;
print $fh_header "\n\n";
for my $oberr (@errors) {
print $fh_header "#define ${oberr}__ORA_USER_ERROR_MSG $map{$oberr}->[8]\n";
print $fh_header "#define ${oberr}__OBE_USER_ERROR_MSG $map{$oberr}->[10]\n";
}
foreach my $oberr (keys %other_map){
my $ora_errno;
@ -423,7 +449,9 @@ constexpr int OB_ERR_SQL_END = -5999;
}
my $ora_msg=$other_map{$oberr}->[2];
my $tmp_ora_user_errmsg=sprintf($print_ora_errmsg, "ORA", $ora_errno, substr($ora_msg, 1, length($ora_msg) - 2));
my $tmp_obe_user_errmsg=sprintf($print_ora_errmsg, "OBE", $ora_errno, substr($ora_msg, 1, length($ora_msg) - 2));
print $fh_header "#define ${oberr}__ORA_USER_ERROR_MSG $tmp_ora_user_errmsg\n";
print $fh_header "#define ${oberr}__OBE_USER_ERROR_MSG $tmp_obe_user_errmsg\n";
}
print $fh_header "\nextern int g_all_ob_errnos[${\(scalar @errnos)}];";
@ -537,6 +565,14 @@ print $fh_cpp '
#endif
using namespace oceanbase::common;
namespace oceanbase
{
namespace common
{
int g_enable_ob_error_msg_style;
}
}
struct _error {
public:
const char *error_name;
@ -549,6 +585,8 @@ struct _error {
int oracle_errno;
const char *oracle_str_error;
const char *oracle_str_user_error;
const char *ob_str_error;
const char *ob_str_user_error;
};
static _error _error_default;
static _error const *_errors[OB_MAX_ERROR_CODE] = {NULL};
@ -558,15 +596,17 @@ for my $oberr (@errors) {
if (0 > $map{$oberr}->[0]) {
my $err = "static const _error _error_$oberr = {
.error_name = \"$map{$oberr}->[5]\",
.error_cause = $map{$oberr}->[9],
.error_solution = $map{$oberr}->[10],
.error_cause = $map{$oberr}->[11],
.error_solution = $map{$oberr}->[12],
.mysql_errno = $map{$oberr}->[1],
.sqlstate = $map{$oberr}->[2],
.str_error = $map{$oberr}->[3],
.str_user_error = $map{$oberr}->[4],
.oracle_errno = $map{$oberr}->[6],
.oracle_str_error = $map{$oberr}->[7],
.oracle_str_user_error = $map{$oberr}->[8]
.oracle_str_user_error = $map{$oberr}->[8],
.ob_str_error = $map{$oberr}->[9],
.ob_str_user_error = $map{$oberr}->[10]
};\n";
print $fh_cpp $err;
}
@ -721,7 +761,11 @@ print $fh_cpp '
{
const char *ret = "Unknown error";
if (OB_LIKELY(0 >= err && err > -OB_MAX_ERROR_CODE)) {
ret = get_error(-err)->oracle_str_error;
if (!g_enable_ob_error_msg_style) {
ret = get_error(-err)->oracle_str_error;
} else {
ret = get_error(-err)->ob_str_error;
}
if (OB_UNLIKELY(NULL == ret || \'\0\' == ret[0]))
{
ret = "Unknown Error";
@ -733,7 +777,11 @@ print $fh_cpp '
{
const char *ret = NULL;
if (OB_LIKELY(0 >= err && err > -OB_MAX_ERROR_CODE)) {
ret = get_error(-err)->oracle_str_user_error;
if (!g_enable_ob_error_msg_style) {
ret = get_error(-err)->oracle_str_user_error;
} else {
ret = get_error(-err)->ob_str_user_error;
}
if (OB_UNLIKELY(NULL == ret || \'\0\' == ret[0])) {
ret = NULL;
}

View File

@ -38,7 +38,7 @@ CREATE OR REPLACE PACKAGE BODY dbms_ischeduler
AND job != (SELECT MAX(job) FROM OCEANBASE.__ALL_TENANT_SCHEDULER_JOB);
-- EXCEPTION
-- WHEN NO_DATA_FOUND THEN
-- RAISE_APPLICATION_ERROR(-20000, 'ORA-23421: job ' || job_name || ' is not a job in the job queue');
-- RAISE_APPLICATION_ERROR(-20000, 'OBE-23421: job ' || job_name || ' is not a job in the job queue');
END;
PROCEDURE do_create_job( IN job BIGINT,

View File

@ -33,7 +33,7 @@ CREATE OR REPLACE PACKAGE BODY dbms_mview_stats IS
parameter VARCHAR2(128) := 'COLLECTION_LEVEL';
BEGIN
IF parameter_name IS NOT NULL AND NLS_UPPER(parameter_name) <> parameter THEN
RAISE_APPLICATION_ERROR(-20000, 'ORA-13916: Invalid value "' || parameter_name || '" specified for parameter "' || parameter ||'"');
RAISE_APPLICATION_ERROR(-20000, 'OBE-13916: Invalid value "' || parameter_name || '" specified for parameter "' || parameter ||'"');
END IF;
do_set_system_default(parameter, value, NULL);
END;
@ -45,7 +45,7 @@ CREATE OR REPLACE PACKAGE BODY dbms_mview_stats IS
parameter VARCHAR2(128) := 'RETENTION_PERIOD';
BEGIN
IF parameter_name IS NOT NULL AND NLS_UPPER(parameter_name) <> parameter THEN
RAISE_APPLICATION_ERROR(-20000, 'ORA-13916: Invalid value "' || parameter_name || '" specified for parameter "' || parameter ||'"');
RAISE_APPLICATION_ERROR(-20000, 'OBE-13916: Invalid value "' || parameter_name || '" specified for parameter "' || parameter ||'"');
END IF;
do_set_system_default(parameter, NULL, value);
END;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9301,7 +9301,7 @@ static int cast_to_udt_not_support(const ObObjType expect_type, ObObjCastParams
LOG_WARN_RET(ret, "invalid CAST to a type that is not a nested table or VARRAY");
} else {
// other udts
// ORA-00932: inconsistent datatypes: expected PLSQL INDEX TABLE got NUMBER
// OBE-00932: inconsistent datatypes: expected PLSQL INDEX TABLE got NUMBER
// currently other types to udt not supported
ret = OB_ERR_UNEXPECTED;
LOG_WARN_RET(ret, "not expected obj type convert", K(expect_type), K(in), K(out), K(cast_mode));
@ -9690,7 +9690,7 @@ static int cast_udt_to_other_not_support(const ObObjType expect_type, ObObjCastP
LOG_WARN_RET(ret, "inconsistent datatypes", K(expect_type), K(in), K(out), K(cast_mode));
} else {
// other udts
// ORA-00932: inconsistent datatypes: expected PLSQL INDEX TABLE got NUMBER
// OBE-00932: inconsistent datatypes: expected PLSQL INDEX TABLE got NUMBER
// currently other types to udt not supported
ret = OB_ERR_UNEXPECTED;
LOG_WARN_RET(ret, "not expected obj type convert", K(expect_type), K(in), K(out), K(cast_mode));

View File

@ -28,7 +28,7 @@
//Action: Remove the recursive SQL, possibly a recursive trigger.
#define OER_RECURSIVE_SQL_LEVELS_EXCEEDED 36
//ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
//OBE-00054: resource busy and acquire with NOWAIT specified or timeout expired
//Cause: Interested resource is busy.
//Action: Retry if necessary or increase timeout.
#define OER_RESOURCE_BUSY_AND_ACQUIRE_WITH_NOWAIT 54

View File

@ -1991,6 +1991,10 @@ DEF_BOOL(strict_check_os_params, OB_CLUSTER_PARAMETER, "False",
"A switch that determines whether to enable strict OS parameter check mode, defaulting to true and can be set to false to bypass strict checks."
"Value: True: allowed; False: allowed but not suggested",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::STATIC_EFFECTIVE));
DEF_BOOL(enable_ob_error_msg_style, OB_CLUSTER_PARAMETER, "True",
"A switch that determines whether to use the ORA-xx or OBE-xx error code format for ORA error codes, with a default value of True to use the OBE-xx format."
"The default value is True. Value: False means we use the ORA-xx format, True means we use the OBE-xx format.",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::STATIC_EFFECTIVE));
DEF_BOOL(_enable_memleak_light_backtrace, OB_CLUSTER_PARAMETER, "True",
"specifies whether allow memleak to get the backtrace of malloc by light_backtrace",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));

View File

@ -9082,7 +9082,7 @@ int cast_to_udt_not_support(const sql::ObExpr &expr, sql::ObEvalCtx &ctx, sql::O
K(out_obj_meta.get_subschema_id()), K(expr.extra_));
} else {
// other udts
// ORA-00932: inconsistent datatypes: expected PLSQL INDEX TABLE got NUMBER
// OBE-00932: inconsistent datatypes: expected PLSQL INDEX TABLE got NUMBER
// currently other types to udt not supported
ret = OB_ERR_INVALID_CAST_UDT;
LOG_WARN_RET(ret, "invalid CAST to a type that is not a nested table or VARRAY");
@ -9120,7 +9120,7 @@ int cast_udt_to_other_not_support(const sql::ObExpr &expr, sql::ObEvalCtx &ctx,
}
} else {
// other udts
// ORA-00932: inconsistent datatypes: expected PLSQL INDEX TABLE got NUMBER
// OBE-00932: inconsistent datatypes: expected PLSQL INDEX TABLE got NUMBER
// currently other types to udt not supported
ret = OB_ERR_INVALID_TYPE_FOR_OP;
LOG_WARN_RET(ret, "not expected obj type convert", K(in_obj_meta), K(out_obj_meta),

View File

@ -159,7 +159,7 @@ int ObExprObjAccess::assign(const ObExprOperator &other)
} else if (obj.is_null()) { \
if (!skip_check_error) { \
ret = OB_ERR_NUMERIC_OR_VALUE_ERROR; \
LOG_WARN("ORA-06502: PL/SQL: numeric or value error: NULL index table key value",\
LOG_WARN("OBE-06502: PL/SQL: numeric or value error: NULL index table key value",\
K(ret), K(obj), K(i)); \
} else { \
param_value = OB_INVALID_INDEX; \

View File

@ -116,16 +116,16 @@ int ObExprPLSQLCodeSQLErrm::eval_pl_sql_code_errm(
int64_t sqlcode = sqlcode_info->get_sqlcode();
if (0 == sqlcode) {
CK (OB_NOT_NULL(sqlerrm_result = expr.get_str_res_mem(ctx, max_buf_size)));
OZ (databuff_printf(sqlerrm_result, max_buf_size, pos, "ORA-0000: normal, successful completion"));
OZ (databuff_printf(sqlerrm_result, max_buf_size, pos, "OBE-0000: normal, successful completion"));
} else if (sqlcode > 0) {
CK (OB_NOT_NULL(sqlerrm_result = expr.get_str_res_mem(ctx, max_buf_size)));
OZ (databuff_printf(sqlerrm_result, max_buf_size, pos, "User-Defined Exception"));
} else if (sqlcode >= OB_MIN_RAISE_APPLICATION_ERROR
&& sqlcode <= OB_MAX_RAISE_APPLICATION_ERROR) {
max_buf_size = 30 + sqlcode_info->get_sqlmsg().length(); // ORA-CODE: ERRMSG
max_buf_size = 30 + sqlcode_info->get_sqlmsg().length(); // OBE-CODE: ERRMSG
CK (OB_NOT_NULL(sqlerrm_result = expr.get_str_res_mem(ctx, max_buf_size)));
OZ (databuff_printf(sqlerrm_result, max_buf_size, pos,
"ORA%ld: %.*s", sqlcode,
"OBE%ld: %.*s", sqlcode,
sqlcode_info->get_sqlmsg().length(),
sqlcode_info->get_sqlmsg().ptr()));
} else {
@ -137,7 +137,7 @@ int ObExprPLSQLCodeSQLErrm::eval_pl_sql_code_errm(
if (NULL == err_msg) {
CK (OB_NOT_NULL(sqlerrm_result = expr.get_str_res_mem(ctx, max_buf_size)));
OZ (databuff_printf(sqlerrm_result, max_buf_size, pos,
"ORA%ld: Message error_code not found; product=RDBMS; facility=ORA", sqlcode));
"OBE%ld: Message error_code not found; product=RDBMS; facility=ORA", sqlcode));
} else {
sqlerrm_result = const_cast<char*>(err_msg);
}
@ -156,21 +156,21 @@ int ObExprPLSQLCodeSQLErrm::eval_pl_sql_code_errm(
OZ (databuff_printf(sqlerrm_result, 200, pos, "-%ld: non-ORACLE exception", sqlcode));
} else if (sqlcode == 0) {
CK (OB_NOT_NULL(sqlerrm_result = expr.get_str_res_mem(ctx, max_buf_size)));
OZ (databuff_printf(sqlerrm_result, 200, pos, "ORA-0000: normal, successful completion"));
OZ (databuff_printf(sqlerrm_result, 200, pos, "OBE-0000: normal, successful completion"));
} else if (sqlcode >= OB_MIN_RAISE_APPLICATION_ERROR
&& sqlcode <= OB_MAX_RAISE_APPLICATION_ERROR) {
if (sqlcode_info->get_sqlcode() == sqlcode) {
max_buf_size = 30 + sqlcode_info->get_sqlmsg().length(); // ORA-CODE: ERRMSG
max_buf_size = 30 + sqlcode_info->get_sqlmsg().length(); // OBE-CODE: ERRMSG
CK (OB_NOT_NULL(
sqlerrm_result = expr.get_str_res_mem(ctx, max_buf_size)));
OZ (databuff_printf(sqlerrm_result, max_buf_size, pos,
"ORA%ld: %.*s", sqlcode,
"OBE%ld: %.*s", sqlcode,
sqlcode_info->get_sqlmsg().length(),
sqlcode_info->get_sqlmsg().ptr()));
} else {
CK (OB_NOT_NULL(sqlerrm_result
= expr.get_str_res_mem(ctx, max_buf_size)));
OZ (databuff_printf(sqlerrm_result, 200, pos, "ORA%ld:", sqlcode));
OZ (databuff_printf(sqlerrm_result, 200, pos, "OBE%ld:", sqlcode));
}
} else if (sqlcode < 0) {
const ObWarningBuffer *wb = common::ob_get_tsi_warning_buffer();
@ -180,7 +180,7 @@ int ObExprPLSQLCodeSQLErrm::eval_pl_sql_code_errm(
const char* err_msg = ob_errpkt_str_user_error(sqlcode, true);
if (NULL == err_msg) {
CK (OB_NOT_NULL(sqlerrm_result = expr.get_str_res_mem(ctx, max_buf_size)));
OZ (databuff_printf(sqlerrm_result, 200, pos, "ORA%ld: Message error_code not found; product=RDBMS; facility=ORA", sqlcode));
OZ (databuff_printf(sqlerrm_result, 200, pos, "OBE%ld: Message error_code not found; product=RDBMS; facility=ORA", sqlcode));
} else {
sqlerrm_result = const_cast<char*>(err_msg);
}

View File

@ -171,7 +171,7 @@ int ObExprPLSQLVariable::check_key(const common::ObString &v)
}
if (!valid) {
ret = OB_ERR_INVALID_PLSQL_CCFLAGS;
LOG_WARN("ORA-39962: invalid parameter for PLSQL_CCFLAGS", K(ret), K(v));
LOG_WARN("OBE-39962: invalid parameter for PLSQL_CCFLAGS", K(ret), K(v));
}
return ret;
}
@ -198,7 +198,7 @@ int ObExprPLSQLVariable::check_value(
OX (val_obj.set_int32(int_val));
if (OB_FAIL(ret)) {
ret = OB_ERR_INVALID_PLSQL_CCFLAGS;
LOG_WARN("ORA-39962: invalid parameter for PLSQL_CCFLAGS", K(ret), K(v));
LOG_WARN("OBE-39962: invalid parameter for PLSQL_CCFLAGS", K(ret), K(v));
}
}
return ret;
@ -230,7 +230,7 @@ int ObExprPLSQLVariable::check_plsql_ccflags(
// do nothing ...
} else if (v1.length() > OB_TMP_BUF_SIZE_256) {
ret = OB_ERR_PARAMETER_TOO_LONG;
LOG_WARN("ORA-32021: parameter value longer than string characters", K(ret), K(v));
LOG_WARN("OBE-32021: parameter value longer than string characters", K(ret), K(v));
LOG_USER_ERROR(OB_ERR_PARAMETER_TOO_LONG, static_cast<int32_t>(OB_TMP_BUF_SIZE_256));
} else {
while (OB_SUCC(ret) && v1.length() > 0) {

View File

@ -35,7 +35,7 @@ int internal_calc_result_length(ObExprResType &type, ObExprResType &text)
if (ob_is_text_tc(param_type) && lib::is_oracle_mode()) {
ret = OB_ERR_INVALID_TYPE_FOR_OP;
LOG_USER_ERROR(OB_ERR_INVALID_TYPE_FOR_OP, "RAW", ob_obj_type_str(param_type));
LOG_WARN("ORA-00932: inconsistent datatypes: expected - got LOB", K(ret));
LOG_WARN("OBE-00932: inconsistent datatypes: expected - got LOB", K(ret));
} else if (ob_is_string_type(param_type) || ob_is_raw(param_type)) {
length = 2 * text.get_length();
if (text.get_length_semantics() == LS_CHAR) {

View File

@ -111,7 +111,7 @@ int ObExprUDF::calc_result_typeN(ObExprResType &type,
if (udf_package_id_ == T_OBJ_XML
&& types[i].is_xml_sql_type() && params_type_.at(i).is_string_type()) {
ret = OB_ERR_WRONG_FUNC_ARGUMENTS_TYPE;
LOG_WARN("ORA-06553:PLS-306:wrong number or types of arguments in call procedure",
LOG_WARN("OBE-06553:PLS-306:wrong number or types of arguments in call procedure",
K(i), K(udf_package_id_), K(udf_id_), K(types[i]), K(params_type_.at(i)));
} else {
types[i].set_calc_accuracy(params_type_.at(i).get_accuracy());

View File

@ -1378,7 +1378,7 @@ int ObResultSet::ExternalRetrieveInfo::check_into_exprs(ObStmt &stmt,
if (basic_types.count() > select_stmt.get_select_item_size()
|| into_exprs_.count() > select_stmt.get_select_item_size()) {
ret = OB_ERR_TOO_MANY_VALUES;
LOG_WARN("ORA-00913: too many values",
LOG_WARN("OBE-00913: too many values",
K(ret), K(basic_types.count()), K(select_stmt.get_select_item_size()));
} else if (basic_types.count() < select_stmt.get_select_item_size()
|| into_exprs_.count() < select_stmt.get_select_item_size()) {
@ -1392,7 +1392,7 @@ int ObResultSet::ExternalRetrieveInfo::check_into_exprs(ObStmt &stmt,
const ObIArray<ObRawExpr*> &returning_exprs = dml_stmt.get_returning_exprs();
if (basic_types.count() > returning_exprs.count()) {
ret = OB_ERR_TOO_MANY_VALUES;
LOG_WARN("ORA-00913: too many values",
LOG_WARN("OBE-00913: too many values",
K(ret), K(basic_types.count()), K(returning_exprs.count()));
} else if (basic_types.count() < returning_exprs.count()) {
ret = OB_ERR_NOT_ENOUGH_VALUES;

View File

@ -355,28 +355,28 @@ int ObSPIResultSet::check_nested_stmt_legal(ObExecContext &exec_ctx, const ObStr
*/
if (!(lib::is_mysql_mode())) {
ret = OB_ERR_CANNOT_PERFORM_DML_INSIDE_QUERY;
LOG_WARN("ORA-14551: cannot perform a DML operation inside a query",
LOG_WARN("OBE-14551: cannot perform a DML operation inside a query",
K(ret), K(stmt_type), K(exec_ctx.get_sql_ctx()),
K(&exec_ctx), K(exec_ctx.get_my_session()->get_cur_exec_ctx()));
}
} else if (stmt::T_SELECT == parent_stmt_type && stmt::T_SELECT == stmt_type && for_update && lib::is_oracle_mode()) {
ret = OB_ERR_CANNOT_PERFORM_DML_INSIDE_QUERY;
LOG_WARN("ORA-14551: cannot perform a DML operation inside a query",
LOG_WARN("OBE-14551: cannot perform a DML operation inside a query",
K(ret), K(stmt_type), K(exec_ctx.get_sql_ctx()),
K(&exec_ctx), K(exec_ctx.get_my_session()->get_cur_exec_ctx()));
} else if (ObStmt::is_ddl_stmt(stmt_type, has_global_variable) || ObStmt::is_tcl_stmt(stmt_type)) {
ret = lib::is_oracle_mode() ? OB_NOT_SUPPORTED : OB_ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG;
LOG_WARN("ORA-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML tips",
LOG_WARN("OBE-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML tips",
K(ret), K(stmt_type), K(lbt()));
if (OB_NOT_SUPPORTED == ret) {
LOG_USER_ERROR(OB_NOT_SUPPORTED, "ORA-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML tips");
LOG_USER_ERROR(OB_NOT_SUPPORTED, "OBE-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML tips");
}
} else if (lib::is_oracle_mode() &&
(stmt::T_CREATE_SAVEPOINT == stmt_type
|| stmt::T_ROLLBACK_SAVEPOINT == stmt_type
|| stmt::T_RELEASE_SAVEPOINT == stmt_type)) {
ret = OB_ERR_CANNOT_PERFORM_DDL_COMMIT_OR_ROLLBACK_INSIDE_QUERY_OR_DML_TIPS;
LOG_WARN("ORA-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML tips",
LOG_WARN("OBE-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML tips",
K(ret), K(stmt_type), K(lbt()));
} else if (exec_ctx.get_my_session()->is_in_user_scope() && ObStmt::is_dml_write_stmt(stmt_type)) {
ret = OB_ERR_CANT_UPDATE_TABLE_IN_CREATE_TABLE_SELECT;
@ -2647,7 +2647,7 @@ int ObSPIService::calc_dynamic_sqlstr(
} else if (result.is_null_oracle()) {
ret = OB_ERR_STATEMENT_STRING_IN_EXECUTE_IMMEDIATE_IS_NULL_OR_ZERO_LENGTH;
LOG_WARN(
"ORA-06535: statement string in EXECUTE IMMEDIATE is NULL or 0 length", K(ret), K(result));
"OBE-06535: statement string in EXECUTE IMMEDIATE is NULL or 0 length", K(ret), K(result));
} else if (!result.is_string_type() && !result.is_clob_locator()) {
ret = OB_NOT_SUPPORTED;
LOG_WARN("Dynamic sql is not a string", K(ret), K(result), K(sql_str));
@ -2744,7 +2744,7 @@ int ObSPIService::prepare_dynamic(ObPLExecCtx *ctx,
: pl_prepare_result.result_set_->get_param_fields()->count();
if (pl_prepare_result.result_set_->is_returning() && 0 == into_cnt) {
ret = OB_ERR_MISSING_INTO_KEYWORD;
LOG_WARN("ORA-00925: missing INTO keyword", K(ret),
LOG_WARN("OBE-00925: missing INTO keyword", K(ret),
K(pl_prepare_result.result_set_->is_returning()), K(into_cnt));
} else {
/*!
@ -2762,12 +2762,12 @@ int ObSPIService::prepare_dynamic(ObPLExecCtx *ctx,
LOG_USER_ERROR(OB_ERR_WRONG_DYNAMIC_PARAM, exec_param_cnt, param_cnt);
} else if (param_cnt < need_exec_param_cnt) {
ret = OB_ERR_NOT_ALL_VARIABLE_BIND;
LOG_WARN("ORA-01008: not all variables bound",
LOG_WARN("OBE-01008: not all variables bound",
K(ret), K(param_cnt),
K(need_exec_param_cnt), K(into_cnt), K(is_returning), K(stmt_type));
} else {
ret = OB_ERR_BIND_VARIABLE_NOT_EXIST;
LOG_WARN("ORA-01006: bind variable does not exist",
LOG_WARN("OBE-01006: bind variable does not exist",
K(ret), K(param_cnt),
K(need_exec_param_cnt), K(into_cnt), K(is_returning), K(stmt_type));
}
@ -2782,13 +2782,13 @@ int ObSPIService::prepare_dynamic(ObPLExecCtx *ctx,
&& stmt_type != stmt::T_DELETE
&& stmt_type != stmt::T_UPDATE) {
ret = OB_ERR_CLAUSE_RETURN_ILLEGAL;
LOG_WARN("ORA-06547: RETURNING clause must be used with "
LOG_WARN("OBE-06547: RETURNING clause must be used with "
"INSERT, UPDATE, or DELETE statements", K(ret), K(stmt_type));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "RETURNING clause used with not "
"INSERT, UPDATE, or DELETE statements");
} else if (pl_prepare_result.result_set_->get_into_exprs().empty()) {
ret = OB_ERR_MISSING_INTO_KEYWORD;
LOG_WARN("ORA-00925: missing INTO keyword", K(ret));
LOG_WARN("OBE-00925: missing INTO keyword", K(ret));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "missing INTO keyword");
} else {
remove_into = true;
@ -2809,8 +2809,8 @@ int ObSPIService::prepare_dynamic(ObPLExecCtx *ctx,
* DECLARE
* *
* ERROR at line 1:
* ORA-01006: bind variable does not exist
* ORA-06512: at line 6
* OBE-01006: bind variable does not exist
* OBE-06512: at line 6
* */
remove_into = !pl_prepare_result.result_set_->get_into_exprs().empty();
} else { /*do nothing*/ }
@ -2953,7 +2953,7 @@ int ObSPIService::spi_execute_immediate(ObPLExecCtx *ctx,
OZ (out_using_params.push_back(params[i]));
} else {
ret = OB_ERR_INOUT_PARAM_PLACEMENT_NOT_PROPERLY;
LOG_WARN("ORA-06536: IN bind variable bound to an OUT position", K(ret));
LOG_WARN("OBE-06536: IN bind variable bound to an OUT position", K(ret));
}
}
} else if (ObStmt::is_dml_write_stmt(stmt_type) && inner_into_cnt > 0 && into_count > 0 && !is_returning) {
@ -2962,7 +2962,7 @@ int ObSPIService::spi_execute_immediate(ObPLExecCtx *ctx,
ObPLRoutineParamMode pm = static_cast<ObPLRoutineParamMode>(params_mode[i]);
if (PL_PARAM_IN == pm) {
ret = OB_ERR_INOUT_PARAM_PLACEMENT_NOT_PROPERLY;
LOG_WARN("ORA-06536: IN bind variable bound to an OUT position", K(ret));
LOG_WARN("OBE-06536: IN bind variable bound to an OUT position", K(ret));
}
}
} else { /*do nothing*/ }
@ -4602,7 +4602,7 @@ int ObSPIService::do_cursor_fetch(ObPLExecCtx *ctx,
LOG_WARN("Limit must be used with Bulk Collect Into Clause", K(is_bulk), K(limit), K(ret));
} else if (limit != INT64_MAX && limit <= 0) {
ret = OB_ERR_NUMERIC_OR_VALUE_ERROR;
LOG_WARN("ORA-06502: PL/SQL: numeric or value error", K(ret), K(limit));
LOG_WARN("OBE-06502: PL/SQL: numeric or value error", K(ret), K(limit));
} else if (!cursor->isopen()) {
ret = OB_ER_SP_CURSOR_NOT_OPEN;
LOG_USER_ERROR(OB_ER_SP_CURSOR_NOT_OPEN);
@ -5265,7 +5265,7 @@ int ObSPIService::spi_extend_collection(pl::ObPLExecCtx *ctx,
table = reinterpret_cast<ObPLCollection*>(result.get_ext());
if (!table->is_inited()) {
ret = OB_NOT_INIT;
LOG_WARN("ORA-06531: Reference to uninitialized collection", K(ret));
LOG_WARN("OBE-06531: Reference to uninitialized collection", K(ret));
} else if (0 == table->get_column_count()) {
table->set_column_count(column_count);
}
@ -5598,7 +5598,7 @@ int ObSPIService::spi_trim_collection(pl::ObPLExecCtx *ctx,
if (OB_SUCC(ret) && !table->is_inited()) {
ret = OB_NOT_INIT;
LOG_WARN("ORA-06531: Reference to uninitialized collection", K(ret));
LOG_WARN("OBE-06531: Reference to uninitialized collection", K(ret));
}
if (OB_SUCC(ret) && table->is_associative_array()) {
ret = OB_NOT_SUPPORTED;
@ -5670,7 +5670,7 @@ int ObSPIService::spi_delete_collection(pl::ObPLExecCtx *ctx,
CK (!(OB_ISNULL(m_expr) && OB_NOT_NULL(n_expr)));
if (OB_SUCC(ret) && !table->is_inited()) {
ret = OB_NOT_INIT;
LOG_WARN("ORA-06531: Reference to uninitialized collection", K(ret));
LOG_WARN("OBE-06531: Reference to uninitialized collection", K(ret));
}
if (OB_SUCC(ret)) {
if (OB_ISNULL(m_expr) && OB_ISNULL(n_expr)) {
@ -5856,7 +5856,7 @@ int ObSPIService::spi_sub_nestedtable(ObPLExecCtx *ctx, int64_t src_idx, int64_t
|| lower > src_coll->get_count()
|| upper > src_coll->get_count()) {
ret = OB_ARRAY_OUT_OF_RANGE;
LOG_WARN("ORA-22160: element at index does not exist",
LOG_WARN("OBE-22160: element at index does not exist",
K(lower), K(upper), K(src_coll->get_count()), K(ret));
} else if (OB_ISNULL(dst_coll = static_cast<ObPLCollection*>(ctx->allocator_->alloc(sizeof(ObPLCollection))))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
@ -5989,7 +5989,7 @@ int ObSPIService::spi_set_collection(int64_t tenant_id,
ObPLVArray &va = static_cast<ObPLVArray&>(coll); \
if (va.get_capacity() < va.get_count() + n) { \
ret = OB_SIZE_OVERFLOW; \
LOG_WARN("varray size overflow, ORA-06532: Subscript outside of limit", K(va), K(va.get_capacity()), K(n), K(coll.get_count()), K(ret)); \
LOG_WARN("varray size overflow, OBE-06532: Subscript outside of limit", K(va), K(va.get_capacity()), K(n), K(coll.get_count()), K(ret)); \
} \
} \
} \
@ -6025,7 +6025,7 @@ int ObSPIService::spi_set_collection(int64_t tenant_id,
bool set_data = false;
if (extend_mode && !coll.is_inited()) {
ret = OB_NOT_INIT;
LOG_WARN("ORA-06531: Reference to uninitialized collection", K(ret));
LOG_WARN("OBE-06531: Reference to uninitialized collection", K(ret));
} else if (NULL == coll.get_allocator()) {
collection_allocator = static_cast<common::ObIAllocator*>(allocator.alloc(sizeof(ObPLCollAllocator)));
if (OB_ISNULL(collection_allocator)) {
@ -6202,8 +6202,8 @@ int ObSPIService::spi_reset_collection(ObPLCollection *coll)
*
* declare TYPE ARRYTYPE is table of Varchar2(10);
* ERROR at line 1:
* ORA-06531: Reference to uninitialized collection
* ORA-06512: at line 6
* OBE-06531: Reference to uninitialized collection
* OBE-06512: at line 6
* */
if (OB_NOT_NULL(coll->get_allocator())) {
OZ (spi_set_collection(MTL_ID(), NULL, *(coll->get_allocator()), *coll, 0, false));

View File

@ -38,7 +38,7 @@ int ObCallProcedureResolver::check_param_expr_legal(ObRawExpr *param)
LOG_USER_ERROR(OB_NOT_SUPPORTED, "subqueries or stored function calls here");
} else if (T_FUN_SYS_PL_SEQ_NEXT_VALUE == param->get_expr_type()) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "ORA-06576 : not a valid function or procedure name");
LOG_USER_ERROR(OB_NOT_SUPPORTED, "OBE-06576 : not a valid function or procedure name");
} /* else if (T_OP_GET_PACKAGE_VAR == param->get_expr_type()) {
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "PLS-221: not procedure or not defined!");
@ -566,7 +566,7 @@ int ObCallProcedureResolver::resolve(const ParseNode &parse_tree)
stmt->set_dblink_routine_info(proc_info);
if (proc_info->is_function()) {
ret = OB_ERR_NOT_VALID_ROUTINE_NAME;
LOG_WARN("ORA-06576: not a valid function or procedure name", K(ret), KPC(proc_info));
LOG_WARN("OBE-06576: not a valid function or procedure name", K(ret), KPC(proc_info));
}
}
// Step 4: cg raw expr

View File

@ -302,7 +302,7 @@ int ObAlterRoutineResolver::resolve_compile_parameter(
for (int64_t i = 0; OB_SUCC(ret) && i < params.count(); ++i) {
if (params.at(i).first == var_type) {
ret = OB_ERR_DUP_COMPILE_PARAM;
LOG_WARN("ORA-39956: duplicate setting for PL/SQL compiler parameter string");
LOG_WARN("OBE-39956: duplicate setting for PL/SQL compiler parameter string");
LOG_USER_ERROR(OB_ERR_DUP_COMPILE_PARAM, var_name.length(), var_name.ptr());
}
}

View File

@ -1044,7 +1044,7 @@ int ObTriggerResolver::resolve_order_clause(const ParseNode *parse_node, ObCreat
if (OB_SUCC(ret) && (trg_info.get_database_id() == ref_db_id)
&& (trg_info.get_trigger_name() == ref_trg_name)) {
ret = OB_ERR_REF_CYCLIC_IN_TRG;
LOG_WARN("ORA-25023: cyclic trigger dependency is not allowed", K(ret));
LOG_WARN("OBE-25023: cyclic trigger dependency is not allowed", K(ret));
}
}
OZ (schema_checker_->get_trigger_info(trg_info.get_tenant_id(), ref_trg_db_name, ref_trg_name, ref_trg_info));
@ -1071,7 +1071,7 @@ int ObTriggerResolver::resolve_order_clause(const ParseNode *parse_node, ObCreat
if (is_oracle_mode) {
if (trg_info.get_base_object_id() != ref_trg_info->get_base_object_id()) {
ret = OB_ERR_REF_ANOTHER_TABLE_IN_TRG;
LOG_WARN("ORA-25021: cannot reference a trigger defined on another table", K(ret));
LOG_WARN("OBE-25021: cannot reference a trigger defined on another table", K(ret));
} else if (trg_info.is_simple_dml_type() && !ref_trg_info->is_compound_dml_type()) {
if (!(trg_info.is_row_level_before_trigger() && ref_trg_info->is_row_level_before_trigger())
&& !(trg_info.is_row_level_after_trigger() && ref_trg_info->is_row_level_after_trigger())

View File

@ -3078,7 +3078,7 @@ int ObDMLResolver::resolve_qualified_identifier(ObQualifiedName &q_name,
ret = OB_NOT_SUPPORTED;
LOG_WARN("You tried to execute a SQL statement that referenced a package or function\
that contained an OUT parameter. This is not allowed.", K(ret), K(q_name));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "ORA-06572: function name has out arguments");
LOG_USER_ERROR(OB_NOT_SUPPORTED, "OBE-06572: function name has out arguments");
} else if (udf->is_pkg_body_udf()) {
ret = OB_ERR_PRIVATE_UDF_USE_IN_SQL;
LOG_WARN("function 'string' may not be used in SQL", K(ret), KPC(udf));
@ -3268,12 +3268,12 @@ int ObDMLResolver::resolve_qualified_identifier(ObQualifiedName &q_name,
// SQL> select nextval from dual;
// select nextval from dual
// ERROR at line 1:
// ORA-00904: "NEXTVAL": invalid identifier
// OBE-00904: "NEXTVAL": invalid identifier
//
// SQL> select s.nextval from dual;
// select s.nextval from dual
// ERROR at line 1:
// ORA-02289: sequence does not exist
// OBE-02289: sequence does not exist
ret = update_errno_if_sequence_object(q_name, ret);
}
return ret;
@ -5402,7 +5402,7 @@ int ObDMLResolver::resolve_function_table_item(const ParseNode &parse_tree,
LOG_USER_ERROR(OB_ERR_WRONG_FUNC_ARGUMENTS_TYPE, 14, "TABLE FUNCTION");
} else if (!user_type->is_collection_type()) {
ret = OB_NOT_SUPPORTED;
LOG_WARN("ORA-22905: cannot access rows from a non-nested table item",
LOG_WARN("OBE-22905: cannot access rows from a non-nested table item",
K(ret), K(function_table_expr->get_result_type()));
LOG_USER_ERROR(OB_NOT_SUPPORTED, "access rows from a non-nested table item");
} else if (is_dblink_type_id(user_type->get_user_type_id())) {
@ -6870,7 +6870,7 @@ int ObDMLResolver::resolve_current_of(const ParseNode &node,
if (OB_ISNULL(params_.secondary_namespace_)) {
// secondary_namespace_ 为空, 说明不是在PL中
ret = OB_UNIMPLEMENTED_FEATURE;
LOG_WARN("ORA-03001: unimplemented feature");
LOG_WARN("OBE-03001: unimplemented feature");
}
CK(T_SP_EXPLICIT_CURSOR_ATTR == node.type_,
OB_NOT_NULL(params_.expr_factory_),
@ -12473,7 +12473,7 @@ int ObDMLResolver::check_oracle_outer_join_condition(const ObRawExpr *expr)
if (OB_SUCC(ret) && (expr->has_flag(CNT_OUTER_JOIN_SYMBOL))) {
if (expr->has_flag(CNT_SUB_QUERY)) {
/**
* ORA-01799:
* OBE-01799:
* 01799. 00000 - "a column may not be outer-joined to a subquery"
* *Cause: <expression>(+) <relop> (<subquery>) is not allowed.
* *Action: Either remove the (+) or make a view out of the subquery.
@ -12485,7 +12485,7 @@ int ObDMLResolver::check_oracle_outer_join_condition(const ObRawExpr *expr)
LOG_WARN("column may not be outer-joined to a subquery");
} else if (OB_UNLIKELY(expr->has_flag(CNT_IN) || expr->has_flag(CNT_OR))) {
/**
* ORA-01719: OR IN (+)
* OBE-01719: OR IN (+)
* 01719. 00000 - "outer join operator (+) not allowed in operand of OR or IN"
* *Cause: An outer join appears in an or clause.
* *Action: If A and B are predicates, to get the effect of (A(+) or B),
@ -12521,9 +12521,9 @@ int ObDMLResolver::check_oracle_outer_join_in_or_validity(const ObRawExpr *expr,
if(OB_SUCC(ret)){
switch (expr->get_expr_type()) {
case T_OP_IN: {
// ORA-1719 t1.c1(+) in (t2.c1, xxxx); OB_ERR_OUTER_JOIN_AMBIGUOUS
// ORA-1468 t1.c1(+) in (t2.c1(+), xxxx); OB_ERR_MULTI_OUTER_JOIN_TABLE;
// ORA-1416 t1.c1(+) in (t1.c1, xxxx); OB_ERR_OUTER_JOIN_NESTED
// OBE-1719 t1.c1(+) in (t2.c1, xxxx); OB_ERR_OUTER_JOIN_AMBIGUOUS
// OBE-1468 t1.c1(+) in (t2.c1(+), xxxx); OB_ERR_MULTI_OUTER_JOIN_TABLE;
// OBE-1416 t1.c1(+) in (t1.c1, xxxx); OB_ERR_OUTER_JOIN_NESTED
//@OK: t1.c1(+) in (1, 1);
if(expr->get_param_count() == 2 && expr->has_flag(CNT_OUTER_JOIN_SYMBOL)) {
const ObRawExpr * left_expr = expr->get_param_expr(0);
@ -12538,8 +12538,8 @@ int ObDMLResolver::check_oracle_outer_join_in_or_validity(const ObRawExpr *expr,
OZ(extract_column_with_outer_join_symbol(left_expr, le_left_tables, le_right_tables));
const int64_t param_cnt = right_exprs->get_param_count();
/* check each expr separately from right to left.
* select * from t1,t2 where t1.c1(+) in (t1.c1, t2.c1(+)); will raise ORA-1468
* select * from t1,t2 where t1.c1(+) in (t2.c1(+), t1.c1); will raise ORA-1416
* select * from t1,t2 where t1.c1(+) in (t1.c1, t2.c1(+)); will raise OBE-1468
* select * from t1,t2 where t1.c1(+) in (t2.c1(+), t1.c1); will raise OBE-1416
*/
for (int64_t i = param_cnt - 1; OB_SUCC(ret) && i >= 0; i--) {
const ObRawExpr * right_expr = right_exprs->get_param_expr(i);
@ -12558,7 +12558,7 @@ int ObDMLResolver::check_oracle_outer_join_in_or_validity(const ObRawExpr *expr,
for (int64_t i = 0; i < le_right_tables.count(); i++) {
OZ((common::add_var_to_array_no_dup)(right_tables, le_right_tables.at(i)));
}
// if there is conflict between two exprs in IN, the error is ORA-1719
// if there is conflict between two exprs in IN, the error is OBE-1719
if (right_tables.count() != 1 || left_tables.count() != 0) {
ret = OB_ERR_OUTER_JOIN_AMBIGUOUS;
LOG_WARN("outer join operator (+) not allowed in operand of OR or IN", K(ret));
@ -12571,8 +12571,8 @@ int ObDMLResolver::check_oracle_outer_join_in_or_validity(const ObRawExpr *expr,
case T_OP_OR: {
// oracle_outer_join should appear in both side of OR-expr.
/* the check order is from left to right.
* select * from t1,t2 where t1.c1(+) = t1.c1 or t1.c1(+) = t2.c1(+); will raise ORA-1416
* select * from t1,t2 where t1.c1(+) = t2.c1(+) or t1.c1(+) = t1.c1; will raise ORA-1468
* select * from t1,t2 where t1.c1(+) = t1.c1 or t1.c1(+) = t2.c1(+); will raise OBE-1416
* select * from t1,t2 where t1.c1(+) = t2.c1(+) or t1.c1(+) = t1.c1; will raise OBE-1468
* @OK: select * from t1, t2 where t1.c1(+) = 1 or t1.c2(+) = 2;
*/
for (int64_t i = 0; OB_SUCC(ret) && i < expr->get_param_count(); i++) {
@ -12612,10 +12612,10 @@ int ObDMLResolver::check_oracle_outer_join_expr_validity(const ObRawExpr *expr,
ObItemType parent_type)
{
/* the tmp_left_tables and tmp_right_tables contain the table_id of the tables appear
* in e. Conflict between tmp_left_tables and tmp_right_tables will raise ORA-1416 or ORA-1468.
* e,g,. t1.c1(+) = t2.c1(+) will raise ORA-1468.
* t1.c1(+) = t1.c1 will raise ORA-1416
* t1.c1(+) + t2.c1 + t1.c1 = 1 or t1.c1(+) + t1.c1 + t2.c1 will raise ORA-1416
* in e. Conflict between tmp_left_tables and tmp_right_tables will raise OBE-1416 or OBE-1468.
* e,g,. t1.c1(+) = t2.c1(+) will raise OBE-1468.
* t1.c1(+) = t1.c1 will raise OBE-1416
* t1.c1(+) + t2.c1 + t1.c1 = 1 or t1.c1(+) + t1.c1 + t2.c1 will raise OBE-1416
*/
int ret = OB_SUCCESS;
ObArray<uint64_t> tmp_left_tables;
@ -12704,8 +12704,8 @@ int ObDMLResolver::check_single_oracle_outer_join_expr_validity(const ObRawExpr
} else {
bool exist_flag = true;
// check le_right_tables.count() to avoid left expr being a const.
// e,g,. select * from t1, t2 where 1 in (t1.c1(+), t2.c1(+)) should raise ORA-1719
// instead of ORA-1468
// e,g,. select * from t1, t2 where 1 in (t1.c1(+), t2.c1(+)) should raise OBE-1719
// instead of OBE-1468
for (int64_t i = 0; le_right_tables.count() > 0 && i<re_right_tables.count(); i++) {
if (!has_exist_in_array(le_right_tables, re_right_tables.at(i))) {
exist_flag = false;
@ -12774,7 +12774,7 @@ int ObDMLResolver::resolve_outer_join_symbol(const ObStmtScope scope,
|| T_START_WITH_SCOPE == scope
|| T_ORDER_SCOPE == scope)) {
/*
* ORA-30563: 使 (+)
* OBE-30563: 使 (+)
* 30563. 00000 - "outer join operator (+) is not allowed here"
* *Cause: An attempt was made to reference (+) in either the select-list,
* CONNECT BY clause, START WITH clause, or ORDER BY clause.
@ -12855,7 +12855,7 @@ int ObDMLResolver::generate_outer_join_dependency(
// do nothing
} else if (OB_UNLIKELY(right_tables.count() > 1)) {
/**
* ORA-01468:
* OBE-01468:
* 01468. 00000 - "a predicate may reference only one outer-joined table"
* *Cause:
* *Action:
@ -13044,7 +13044,7 @@ int ObDMLResolver::deliver_outer_join_conditions(ObIArray<ObRawExpr*> &exprs,
// do nothing
} else if (OB_UNLIKELY(right_tables.count() > 1)) {
/**
* ORA-01468:
* OBE-01468:
* 01468. 00000 - "a predicate may reference only one outer-joined table"
* *Cause:
* *Action:
@ -13352,7 +13352,7 @@ int ObDMLResolver::resolve_ora_rowscn_pseudo_column(
LOG_WARN("check rowscn table colum namespace failed", K(ret));
} else if (OB_ISNULL(table_item)) {
ret = OB_ERR_BAD_FIELD_ERROR;
LOG_WARN("ORA_ROWSCN pseudo column only avaliable in basic table", K(ret));
LOG_WARN("OBE_ROWSCN pseudo column only avaliable in basic table", K(ret));
} else if (OB_FAIL(get_stmt()->get_ora_rowscn_column(table_item->table_id_,
pseudo_column_expr))) {
LOG_WARN("failed to get ora_rowscn column", K(ret), K(table_item));

View File

@ -1691,7 +1691,7 @@ int ObRawExprResolverImpl::process_dblink_udf_node(const ParseNode *node, ObRawE
if (0 == column_ref.access_idents_.at(acc_cnt - 1).access_name_.case_compare("NEXTVAL")
|| 0 == column_ref.access_idents_.at(acc_cnt - 1).access_name_.case_compare("CURRVAL")) {
ret = OB_ERR_SEQ_NOT_ALLOWED_HERE;
LOG_WARN("ORA-02287: sequence number not allowed here", K(ret), K(column_ref));
LOG_WARN("OBE-02287: sequence number not allowed here", K(ret), K(column_ref));
}
}
OV (column_ref.access_idents_.count() >= 1);

View File

@ -89,6 +89,7 @@ enable_global_background_resource_isolation
enable_kv_ttl
enable_major_freeze
enable_monotonic_weak_read
enable_ob_error_msg_style
enable_ob_ratelimit
enable_perf_event
enable_rebalance

View File

@ -40,7 +40,7 @@ OceanBase:
Solution: Contact OceanBase Support
Oracle:
Oracle Error Code: ORA-04001
Oracle Error Code: OBE-04001
Message: sequence parameter must be an integer
Related OceanBase Error Code:
OB_ERR_SEQ_OPTION_MUST_BE_INTEGER(-4317)
@ -78,7 +78,7 @@ When the facility is `ora` or `pls`, you will get the error info of Oracle mode(
$ob_error ora 51
Oracle:
Oracle Error Code: ORA-00051
Oracle Error Code: OBE-00051
Message: timeout occurred while waiting for a resource
Related OceanBase Error Code:
OB_ERR_TIMEOUT_ON_RESOURCE(-5848)
@ -96,13 +96,13 @@ OceanBase:
Solution: Contact OceanBase Support
Oracle:
Oracle Error Code: ORA-00600
Oracle Error Code: OBE-00600
Message: internal error code, arguments: -5727, SQL request should be rerouted
Related OceanBase Error Code:
OB_ERR_PROXY_REROUTE(-5727)
```
> **NOTE**: `-a` option helps to find `ORA-00600` error which has `arguments` (those Oracle internal errors).
> **NOTE**: `-a` option helps to find `OBE-00600` error which has `arguments` (those Oracle internal errors).
You can find more test examples in [expect_result](test/expect_result.result).

View File

@ -177,10 +177,10 @@ public:
constexpr int OB_MAX_SAME_ERROR_COUNT = 10;
constexpr int ORACLE_SPECIAL_ERROR_CODE = 600;
constexpr int ORACLE_MAX_ERROR_CODE = 65535;
constexpr int ORACLE_MSG_PREFIX = 11; // strlen("ORA-00000: ")
constexpr int ORACLE_MSG_PREFIX = 11; // strlen("OBE-00000: ")
constexpr float OB_ERROR_VERSION = 1.0;
static const char* facility_str[NONE] = {"ORA", "PLS", "MY"};
static const char* facility_str[NONE] = {"OBE", "PLS", "MY"};
class ObErrorInfoMgr {
public:

View File

@ -1,7 +1,7 @@
$ob_error 1
Oracle:
Oracle Error Code: ORA-00001
Oracle Error Code: OBE-00001
Message: unique constraint violated
Message: PL/SQL common error
Related OceanBase Error Code:
@ -22,7 +22,7 @@ OceanBase:
$ob_error 600
Oracle:
Oracle Error Code: ORA-00600
Oracle Error Code: OBE-00600
Message: auto increment service busy
Message: rowid type mismatch
Message: rowid num mismatch
@ -39,7 +39,7 @@ MySQL:
OB_FILE_NOT_EXIST(-4027)
Oracle:
Oracle Error Code: ORA-01017
Oracle Error Code: OBE-01017
Message: invalid username/password; logon denied
Related OceanBase Error Code:
OB_ERR_LOGIN_DENIED(-5845)
@ -61,7 +61,7 @@ OceanBase:
Solution: Contact OceanBase Support
Oracle:
Oracle Error Code: ORA-04001
Oracle Error Code: OBE-04001
Message: sequence parameter must be an integer
Related OceanBase Error Code:
OB_ERR_SEQ_OPTION_MUST_BE_INTEGER(-4317)
@ -74,14 +74,14 @@ OceanBase:
Solution: Contact OceanBase Support
Oracle:
Oracle Error Code: ORA-20000
Oracle Error Code: OBE-20000
Message: The stored procedure 'raise_application_error' was called which causes this error to be generated
Related OceanBase Error Code:
OB_SP_RAISE_APPLICATION_ERROR(-20000)
$ob_error 24761
Oracle:
Oracle Error Code: ORA-24761
Oracle Error Code: OBE-24761
Message: transaction rolled back
Message: transaction rolled back: transaction is killed
Message: transaction rolled back: transaction context does not exist
@ -136,7 +136,7 @@ OceanBase:
Cause: Internal Error
Solution: Contact OceanBase Support
Compatible Error Code:
Oracle: ORA-00600
Oracle: OBE-00600
$ob_error 5870
OceanBase:
@ -145,7 +145,7 @@ OceanBase:
Cause: Internal Error
Solution: Contact OceanBase Support
Compatible Error Code:
Oracle: ORA-00600
Oracle: OBE-00600
$ob_error 5871
OceanBase:
@ -154,7 +154,7 @@ OceanBase:
Cause: Internal Error
Solution: Contact OceanBase Support
Compatible Error Code:
Oracle: ORA-00600
Oracle: OBE-00600
$ob_error 4228
OceanBase:
@ -164,7 +164,7 @@ OceanBase:
Solution: Contact OceanBase Support
Compatible Error Code:
MySQL: 1110(42000)
Oracle: ORA-00957
Oracle: OBE-00957
$ob_error 700 -a 1000
error: '-a ARG' is unsupport in this scene
Use 'ob_error ora 600 -a ARG'.
@ -177,7 +177,7 @@ OceanBase:
Cause: Internal Error
Solution: Contact OceanBase Support
Compatible Error Code:
Oracle: ORA-14757
Oracle: OBE-14757
$ob_error my 4000
OceanBase:
@ -206,14 +206,14 @@ MySQL:
$ob_error ora 00051
Oracle:
Oracle Error Code: ORA-00051
Oracle Error Code: OBE-00051
Message: timeout occurred while waiting for a resource
Related OceanBase Error Code:
OB_ERR_TIMEOUT_ON_RESOURCE(-5848)
$ob_error ora 900
Oracle:
Oracle Error Code: ORA-00900
Oracle Error Code: OBE-00900
Message: invalid SQL statement
Message: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use
Related OceanBase Error Code:
@ -230,7 +230,7 @@ OceanBase:
MySQL: 1302(42000)
Oracle:
Oracle Error Code: ORA-00600
Oracle Error Code: OBE-00600
Message: internal error code, arguments: -5858, Conflicting declarations
Related OceanBase Error Code:
OB_ERR_CONFLICTING_DECLARATIONS(-5858)
@ -243,7 +243,7 @@ OceanBase:
Solution: Contact OceanBase Support
Oracle:
Oracle Error Code: ORA-00600
Oracle Error Code: OBE-00600
Message: internal error code, arguments: -5727, SQL request should be rerouted
Related OceanBase Error Code:
OB_ERR_PROXY_REROUTE(-5727)
@ -261,7 +261,7 @@ OceanBase:
Error Code 100 not found.
Oracle:
Error Code ORA-00600 arguments: -100 not found.
Error Code OBE-00600 arguments: -100 not found.
$ob_error pls 100
Oracle:

View File

@ -110,7 +110,7 @@ TEST_F(TestObError, test_parser)
EXPECT_EQ(NONE, facility);
facility = NONE;
parse_facility("ORa", facility);
parse_facility("OBE", facility);
EXPECT_EQ(ORA, facility);
facility = NONE;
@ -122,6 +122,7 @@ TEST_F(TestObError, test_parser)
int main(int argc, char** argv)
{
g_enable_ob_error_msg_style = 1;
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}