Optimize ob_errno.def to facilitate better placeholder

This commit is contained in:
wanhong.wwh
2024-01-11 03:43:47 +00:00
committed by ob-robot
parent 83e390f4f7
commit ccd9f8e66a
5 changed files with 346 additions and 150 deletions

View File

@ -398,15 +398,15 @@ constexpr int OB_BACKUP_PWRITE_CONTENT_NOT_MATCH = -9084;
constexpr int OB_CLOUD_OBJECT_NOT_APPENDABLE = -9098; constexpr int OB_CLOUD_OBJECT_NOT_APPENDABLE = -9098;
constexpr int OB_RESTORE_TENANT_FAILED = -9099; constexpr int OB_RESTORE_TENANT_FAILED = -9099;
constexpr int OB_S3_ERROR = -9105; constexpr int OB_S3_ERROR = -9105;
constexpr int OB_TENANT_SNAPSHOT_NOT_EXIST = -9106;
constexpr int OB_TENANT_SNAPSHOT_EXIST = -9107;
constexpr int OB_TENANT_SNAPSHOT_TIMEOUT = -9108;
constexpr int OB_CLONE_TENANT_TIMEOUT = -9109;
constexpr int OB_ERR_CLONE_TENANT = -9110;
constexpr int OB_ERR_TENANT_SNAPSHOT = -9111;
constexpr int OB_TENANT_SNAPSHOT_LOCK_CONFLICT = -9112;
constexpr int OB_ERR_XML_PARSE = -9549; constexpr int OB_ERR_XML_PARSE = -9549;
constexpr int OB_ERR_XSLT_PARSE = -9574; constexpr int OB_ERR_XSLT_PARSE = -9574;
constexpr int OB_TENANT_SNAPSHOT_NOT_EXIST = -12000;
constexpr int OB_TENANT_SNAPSHOT_EXIST = -12001;
constexpr int OB_TENANT_SNAPSHOT_TIMEOUT = -12002;
constexpr int OB_CLONE_TENANT_TIMEOUT = -12003;
constexpr int OB_ERR_CLONE_TENANT = -12004;
constexpr int OB_ERR_TENANT_SNAPSHOT = -12005;
constexpr int OB_TENANT_SNAPSHOT_LOCK_CONFLICT = -12006;
constexpr int OB_MAX_RAISE_APPLICATION_ERROR = -20000; constexpr int OB_MAX_RAISE_APPLICATION_ERROR = -20000;
constexpr int OB_MIN_RAISE_APPLICATION_ERROR = -20999; constexpr int OB_MIN_RAISE_APPLICATION_ERROR = -20999;

View File

@ -12459,7 +12459,7 @@ def_table_schema(**gen_iterate_private_virtual_table_def(
table_name = '__all_virtual_column_checksum_error_info', table_name = '__all_virtual_column_checksum_error_info',
keywords = all_def_keywords['__all_column_checksum_error_info'])) keywords = all_def_keywords['__all_column_checksum_error_info']))
# 13331: __all_virtual_kvcache_handle_leak_info # abandoned in 4.0 # 12331: __all_virtual_kvcache_handle_leak_info
# 12332: abandoned # 12332: abandoned
# 12333: abandoned # 12333: abandoned
@ -14158,7 +14158,7 @@ def_table_schema(**no_direct_access(gen_oracle_mapping_real_virtual_table_def('1
# 本区域定义的Oracle表名比较复杂,一般都采用gen_xxx_table_def()方式定义,占位建议采用基表表名占位 # 本区域定义的Oracle表名比较复杂,一般都采用gen_xxx_table_def()方式定义,占位建议采用基表表名占位
# - 示例:def_table_schema(**no_direct_access(gen_oracle_mapping_virtual_table_def('15009', all_def_keywords['__all_virtual_sql_audit']))) # - 示例:def_table_schema(**no_direct_access(gen_oracle_mapping_virtual_table_def('15009', all_def_keywords['__all_virtual_sql_audit'])))
# * 基表表名占位:# 15009: __all_virtual_sql_audit # * 基表表名占位:# 15009: __all_virtual_sql_audit
# * 真实表名占位:# 15009: ALL_VIRTUAL_SQL_AUDIT_ORA # * 真实表名占位:# 15009: ALL_VIRTUAL_SQL_AUDIT
################################################################################ ################################################################################
# End of Oracle Virtual Table(15000,20000] # End of Oracle Virtual Table(15000,20000]
################################################################################ ################################################################################

File diff suppressed because one or more lines are too long

View File

@ -6,17 +6,27 @@
// SQL层错误码值域[-5000, -6000),含各种schema相关错误 // SQL层错误码值域[-5000, -6000),含各种schema相关错误
// 事务层错误码值域[-6000, -7000),含clog,memtable等 // 事务层错误码值域[-6000, -7000),含clog,memtable等
// Election错误码值域[-7000, -7100) // Election错误码值域[-7000, -7100)
// GIS错误码值域 [-7201, -7300) // 负载均衡(Transfer)错误码值域[-7100, -7200)
// GIS错误码值域 [-7201, -7400)
// XML错误码值域 [-7400, -7600)
// 致命错误[-8000, -9000),客户端收到8xxx错误,需要关闭SQL连接 // 致命错误[-8000, -9000),客户端收到8xxx错误,需要关闭SQL连接
// backup [-9000, -9500) // Storage错误码值域 [-9000, -9500)
// pl [-9500, -10000) // PL/SQL错误码值域 [-9500, -10000)
// OBProxy整体通用错误码,针对公共模块的代码抛出的错误,值域:[-10000, -10100) // OBProxy整体通用错误码,针对公共模块的代码抛出的错误,值域:[-10000, -10100)
// OBProxy业务错误码值域:[-10100, -10300) // OBProxy业务错误码值域:[-10100, -10300)
// OBSharding错误码值域:[-10300, -10500) // OBSharding错误码值域:[-10300, -10500)
// OBKV错误码值域:[-10500, -10700) // OBKV错误码值域:[-10500, -10700)
// 富客户端错误码,值域:[-10700, -10900) // 富客户端错误码,值域:[-10700, -10900)
// SQL扩展区段1:[-11000, -12000) // SQL扩展区段1:[-11000, -12000)
// 租户快照和克隆:[-12000, -12100)
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code -1~-999 are reserved //error code -1~-999 are reserved
@ -94,7 +104,7 @@
DEFINE_ERROR_DEP(OB_SUCCESS, 0, 0, "00000", "Success"); DEFINE_ERROR_DEP(OB_SUCCESS, 0, 0, "00000", "Success");
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for common -4000 ---- -4500 // 通用错误码值域[-4000, -4500),含sstable等
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR_DEP(OB_ERROR, -4000, -1, "HY000", "Common error"); DEFINE_ERROR_DEP(OB_ERROR, -4000, -1, "HY000", "Common error");
DEFINE_ERROR_DEP(OB_OBJ_TYPE_ERROR, -4001, -1, "HY004", "Object type error"); DEFINE_ERROR_DEP(OB_OBJ_TYPE_ERROR, -4001, -1, "HY004", "Object type error");
@ -461,10 +471,24 @@ DEFINE_ERROR(OB_ERR_UNEXPECTED_UNIT_STATUS, -4399, -1, "HY000", "Unit status is
DEFINE_ERROR(OB_AUTOINC_CACHE_NOT_EQUAL, -4400, -1, "HY000", "Autoinc cache's autoinc version is not equal to request's autoinc version"); DEFINE_ERROR(OB_AUTOINC_CACHE_NOT_EQUAL, -4400, -1, "HY000", "Autoinc cache's autoinc version is not equal to request's autoinc version");
DEFINE_ORACLE_ERROR(OB_ERR_KILL_CLIENT_SESSION, -4401, 4401, "HY000", "Client Session need be killed", 4401, "Client Session need be killed"); DEFINE_ORACLE_ERROR(OB_ERR_KILL_CLIENT_SESSION, -4401, 4401, "HY000", "Client Session need be killed", 4401, "Client Session need be killed");
DEFINE_ERROR(OB_ERR_KILL_CLIENT_SESSION_FAILED, -4402, -1, "HY000", "Kill Client Session failed"); DEFINE_ERROR(OB_ERR_KILL_CLIENT_SESSION_FAILED, -4402, -1, "HY000", "Kill Client Session failed");
DEFINE_ERROR(OB_IMPROPER_OS_PARAM, -4403, -1, "HY000", "OS params check failed, because the operating system has improper parameter configurations"); DEFINE_ERROR(OB_IMPROPER_OS_PARAM, -4403, -1, "HY000", "OS params check failed, because the operating system has improper parameter configurations");
// 余留位置
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for root server & server management -4500 ---- -5000 // 通用错误码值域[-4000, -4500),含sstable等
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// RootServer错误码值域[-4500, -5000)
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_IMPORT_NOT_IN_SERVER, -4505, -1, "HY000", "Import not in service"); DEFINE_ERROR(OB_IMPORT_NOT_IN_SERVER, -4505, -1, "HY000", "Import not in service");
DEFINE_ERROR(OB_CONVERT_ERROR, -4507, -1, "42000", "Convert error"); DEFINE_ERROR(OB_CONVERT_ERROR, -4507, -1, "42000", "Convert error");
@ -673,8 +697,22 @@ DEFINE_ERROR_EXT_DEP(OB_INVALID_ROOT_KEY, -4769, -1, "HY000", "invalid root key"
DEFINE_ERROR_EXT(OB_CONFLICT_WITH_CLONE, -4770, -1, "HY000", "conflict case with clone operation", "Tenant (%ld) is in %s procedure, %s not allowed now"); DEFINE_ERROR_EXT(OB_CONFLICT_WITH_CLONE, -4770, -1, "HY000", "conflict case with clone operation", "Tenant (%ld) is in %s procedure, %s not allowed now");
DEFINE_ERROR(OB_BREAK_BY_TEST, -4771, -1, "HY000", "process is breaked by test case"); DEFINE_ERROR(OB_BREAK_BY_TEST, -4771, -1, "HY000", "process is breaked by test case");
// 余留位置
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// SQL & Schema specific error code, -5000 ~ -6000 // RootServer错误码值域[-4500, -5000)
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// SQL层错误码值域[-5000, -6000),含各种schema相关错误
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_ERR_PARSER_INIT, -5000, ER_PARSE_ERROR, "0B000", "Failed to init SQL parser"); DEFINE_ERROR(OB_ERR_PARSER_INIT, -5000, ER_PARSE_ERROR, "0B000", "Failed to init SQL parser");
DEFINE_ORACLE_ERROR_EXT(OB_ERR_PARSE_SQL, -5001, ER_PARSE_ERROR, "42000", "Parse error", "%s near \'%.*s\' at line %d", 900, "invalid SQL statement", "%s near \'%.*s\' at line %d"); DEFINE_ORACLE_ERROR_EXT(OB_ERR_PARSE_SQL, -5001, ER_PARSE_ERROR, "42000", "Parse error", "%s near \'%.*s\' at line %d", 900, "invalid SQL statement", "%s near \'%.*s\' at line %d");
@ -1657,8 +1695,22 @@ DEFINE_ORACLE_ERROR(OB_ERR_INVALID_DATA_TYPE_INTERVAL_TABLE, -5998, -1, "HY000",
DEFINE_ORACLE_ERROR(OB_ERR_INTERVAL_EXPR_NOT_CORRECT_TYPE, -5999, -1, "HY000", "Interval expression is not a constant of the correct type", 14752, "Interval expression is not a constant of the correct type"); DEFINE_ORACLE_ERROR(OB_ERR_INTERVAL_EXPR_NOT_CORRECT_TYPE, -5999, -1, "HY000", "Interval expression is not a constant of the correct type", 14752, "Interval expression is not a constant of the correct type");
DEFINE_ORACLE_ERROR(OB_ERR_TABLE_IS_ALREADY_A_RANGE_PARTITIONED_TABLE, -6000, -1, "HY000", "Table is already a range partitioned table", 14757, "Table is already a range partitioned table"); DEFINE_ORACLE_ERROR(OB_ERR_TABLE_IS_ALREADY_A_RANGE_PARTITIONED_TABLE, -6000, -1, "HY000", "Table is already a range partitioned table", 14757, "Table is already a range partitioned table");
// 余留位置,该区间已经用完
//////////////////////////// 结束 //////////////////////////////
// SQL层错误码值域[-5000, -6000),含各种schema相关错误
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for transaction, mvcc and commitlog -6001 ---- -7000
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// 事务层错误码值域[-6000, -7000),含clog,memtable等
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_TRANSACTION_SET_VIOLATION, -6001, -1, "25000", "Transaction set changed during the execution"); DEFINE_ERROR(OB_TRANSACTION_SET_VIOLATION, -6001, -1, "25000", "Transaction set changed during the execution");
@ -1789,11 +1841,22 @@ DEFINE_ERROR(OB_TABLE_LOCK_SPLIT_TWICE, -6326, -1, "HY000", "table lock has been
DEFINE_ERROR(OB_TABLE_LOCK_IS_SPLITTING, -6327, -1, "HY000", "table lock is being splitted, can not be splitted again") DEFINE_ERROR(OB_TABLE_LOCK_IS_SPLITTING, -6327, -1, "HY000", "table lock is being splitted, can not be splitted again")
DEFINE_ERROR(OB_TABLE_LOCK_SPLIT_FAIL, -6328, -1, "HY000", "table lock splitting failed") DEFINE_ERROR(OB_TABLE_LOCK_SPLIT_FAIL, -6328, -1, "HY000", "table lock splitting failed")
// for freeze // 余留位置
// DEFINE_ERROR(OB_TABLET_FREEZE_TIMEOUT, -6400, -1, "HY000", "tablet_freeze timeout"); ////////////////////////////////////////////////////////////////
// 事务层错误码值域[-6000, -7000),含clog,memtable等
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for election -7000 ---- -7100 // Election错误码值域[-7000, -7100)
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_ELECTION_WARN_LOGBUF_FULL, -7000, -1, "HY000", "The log buffer is full"); DEFINE_ERROR(OB_ELECTION_WARN_LOGBUF_FULL, -7000, -1, "HY000", "The log buffer is full");
DEFINE_ERROR(OB_ELECTION_WARN_LOGBUF_EMPTY, -7001, -1, "HY000", "The log buffer is empty"); DEFINE_ERROR(OB_ELECTION_WARN_LOGBUF_EMPTY, -7001, -1, "HY000", "The log buffer is empty");
@ -1829,8 +1892,22 @@ DEFINE_ERROR(OB_ELECTION_BELOW_MAJORITY, -7039, -1, "HY000", "not reach majority
DEFINE_ERROR(OB_ELECTION_OVER_MAJORITY, -7040, -1, "HY000", "over majority"); DEFINE_ERROR(OB_ELECTION_OVER_MAJORITY, -7040, -1, "HY000", "over majority");
DEFINE_ERROR(OB_ELECTION_DURING_UPGRADING, -7041, -1, "HY000", "election priority mechanism changed, maybe during upgrading"); DEFINE_ERROR(OB_ELECTION_DURING_UPGRADING, -7041, -1, "HY000", "election priority mechanism changed, maybe during upgrading");
// 余留位置
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for replication group -7100 ---- -7200 // Election错误码值域[-7000, -7100)
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// 负载均衡(Transfer)错误码值域[-7100, -7200)
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_TRANSFER_TASK_COMPLETED, -7100, -1, "HY000", "transfer task completed"); DEFINE_ERROR(OB_TRANSFER_TASK_COMPLETED, -7100, -1, "HY000", "transfer task completed");
DEFINE_ERROR(OB_TOO_MANY_TRANSFER_TASK, -7101, -1, "HY000", "too many transfer tasks"); DEFINE_ERROR(OB_TOO_MANY_TRANSFER_TASK, -7101, -1, "HY000", "too many transfer tasks");
@ -1856,8 +1933,23 @@ DEFINE_ERROR(OB_TABLET_GC_LOCK_CONFLICT, -7120, -1, "HY000", "tablet GC lock con
DEFINE_ERROR(OB_SEQUENCE_NOT_MATCH, -7121, -1, "HY000", "compare sequence not match"); DEFINE_ERROR(OB_SEQUENCE_NOT_MATCH, -7121, -1, "HY000", "compare sequence not match");
DEFINE_ERROR(OB_SEQUENCE_TOO_SMALL, -7122, -1, "HY000", "compare sequence too small"); DEFINE_ERROR(OB_SEQUENCE_TOO_SMALL, -7122, -1, "HY000", "compare sequence too small");
DEFINE_ERROR(OB_TRANSFER_CANNOT_START, -7123, -1, "HY000", "transfer cannot start"); DEFINE_ERROR(OB_TRANSFER_CANNOT_START, -7123, -1, "HY000", "transfer cannot start");
// 余留位置
////////////////////////////////////////////////////////////////
// 负载均衡(Transfer)错误码值域[-7100, -7200)
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//error code for gis -7201 ---- -7300 // GIS错误码值域 [-7201, -7400)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DEFINE_ORACLE_ERROR_EXT_DEP(OB_ERR_GIS_DIFFERENT_SRIDS, -7201, ER_GIS_DIFFERENT_SRIDS, "HY000", "Binary geometry function given two geometries of different srids.", "Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical.", 600, "Binary geometry function given two geometries of different srids.", "Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical."); DEFINE_ORACLE_ERROR_EXT_DEP(OB_ERR_GIS_DIFFERENT_SRIDS, -7201, ER_GIS_DIFFERENT_SRIDS, "HY000", "Binary geometry function given two geometries of different srids.", "Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical.", 600, "Binary geometry function given two geometries of different srids.", "Binary geometry function %s given two geometries of different srids: %u and %u, which should have been identical.");
DEFINE_ORACLE_ERROR_EXT_DEP(OB_ERR_GIS_UNSUPPORTED_ARGUMENT, -7202, ER_GIS_UNSUPPORTED_ARGUMENT, "HY000", "Calling geometry function with unsupported types of arguments.", "Calling geometry function %s with unsupported types of arguments.", 600, "Calling geometry function with unsupported types of arguments.", "Calling geometry function %s with unsupported types of arguments."); DEFINE_ORACLE_ERROR_EXT_DEP(OB_ERR_GIS_UNSUPPORTED_ARGUMENT, -7202, ER_GIS_UNSUPPORTED_ARGUMENT, "HY000", "Calling geometry function with unsupported types of arguments.", "Calling geometry function %s with unsupported types of arguments.", 600, "Calling geometry function with unsupported types of arguments.", "Calling geometry function %s with unsupported types of arguments.");
@ -1955,6 +2047,25 @@ DEFINE_ORACLE_ERROR_DEP(OB_ERR_INVALID_NULL_SDO_GEOMETRY, -7294, -1, "HY000", "I
DEFINE_ORACLE_ERROR_DEP(OB_ERR_INVALID_DATA_IN_SDO_ELEM_INFO_ARRAY, -7295, -1, "HY000", "Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object", 13033, "Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object"); DEFINE_ORACLE_ERROR_DEP(OB_ERR_INVALID_DATA_IN_SDO_ELEM_INFO_ARRAY, -7295, -1, "HY000", "Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object", 13033, "Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object");
DEFINE_ORACLE_ERROR_DEP(OB_ERR_INVALID_DATA_IN_SDO_ORDINATE_ARRAY, -7296, -1, "HY000", "Invalid data in the SDO_ORDINATE_ARRAY in SDO_GEOMETRY object", 13034, "Invalid data in the SDO_ORDINATE_ARRAY in SDO_GEOMETRY object"); DEFINE_ORACLE_ERROR_DEP(OB_ERR_INVALID_DATA_IN_SDO_ORDINATE_ARRAY, -7296, -1, "HY000", "Invalid data in the SDO_ORDINATE_ARRAY in SDO_GEOMETRY object", 13034, "Invalid data in the SDO_ORDINATE_ARRAY in SDO_GEOMETRY object");
DEFINE_ORACLE_ERROR_DEP(OB_ERR_VALUE_NOT_ALLOWED, -7297, -1, "HY000", "value not allowed", 24323, "value not allowed"); DEFINE_ORACLE_ERROR_DEP(OB_ERR_VALUE_NOT_ALLOWED, -7297, -1, "HY000", "value not allowed", 24323, "value not allowed");
// 余留位置
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// GIS错误码值域 [-7201, -7400)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// XML错误码值域 [-7400, -7600)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DEFINE_ORACLE_ERROR_EXT(OB_ERR_INVALID_XML_DATATYPE, -7402, -1, "22000", "Invalid data type for the operation", "inconsistent datatypes: expected %s got %s", 932, "inconsistent datatypes", "inconsistent datatypes: expected %s got %s"); DEFINE_ORACLE_ERROR_EXT(OB_ERR_INVALID_XML_DATATYPE, -7402, -1, "22000", "Invalid data type for the operation", "inconsistent datatypes: expected %s got %s", 932, "inconsistent datatypes", "inconsistent datatypes: expected %s got %s");
DEFINE_ORACLE_ERROR(OB_ERR_XML_MISSING_COMMA, -7403, -1, "42000", "missing comma", 917, "missing comma"); DEFINE_ORACLE_ERROR(OB_ERR_XML_MISSING_COMMA, -7403, -1, "42000", "missing comma", 917, "missing comma");
DEFINE_ORACLE_ERROR(OB_ERR_INVALID_XPATH_EXPRESSION, -7404, ER_UNKNOWN_ERROR, "42000", "invalid xpath expression", 31013, "invalid xpath expression"); DEFINE_ORACLE_ERROR(OB_ERR_INVALID_XPATH_EXPRESSION, -7404, ER_UNKNOWN_ERROR, "42000", "invalid xpath expression", 31013, "invalid xpath expression");
@ -1988,8 +2099,22 @@ DEFINE_ORACLE_ERROR(OB_ERR_JSON_FUN_UNSUPPORTED_TYPE, -7431, -1, "HY000", "Input
DEFINE_ORACLE_ERROR(OB_ERR_COMPARE_VARRAY_LOB_ATTR, -7432, -1, "42000", "cannot compare VARRAY or LOB attributes of an object type", 22901, "cannot compare VARRAY or LOB attributes of an object type"); DEFINE_ORACLE_ERROR(OB_ERR_COMPARE_VARRAY_LOB_ATTR, -7432, -1, "42000", "cannot compare VARRAY or LOB attributes of an object type", 22901, "cannot compare VARRAY or LOB attributes of an object type");
DEFINE_ORACLE_ERROR(OB_ERR_XML_PARENT_ALREADY_CONTAINS_CHILD, -7433, -1, "42000", "Parent %.*s already contains child entry %.*s", 31003, "Parent %.*s already contains child entry %.*s"); DEFINE_ORACLE_ERROR(OB_ERR_XML_PARENT_ALREADY_CONTAINS_CHILD, -7433, -1, "42000", "Parent %.*s already contains child entry %.*s", 31003, "Parent %.*s already contains child entry %.*s");
// 余留位置
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// XML错误码值域 [-7400, -7600)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// !!! Fatal errors and the client should close the connection, -8000 ~ -8999 // 致命错误[-8000, -9000),客户端收到8xxx错误,需要关闭SQL连接
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_SERVER_IS_INIT, -8001, -1, "08004", "Server is initializing"); DEFINE_ERROR(OB_SERVER_IS_INIT, -8001, -1, "08004", "Server is initializing");
DEFINE_ERROR(OB_SERVER_IS_STOPPING, -8002, -1, "08004", "Server is stopping"); DEFINE_ERROR(OB_SERVER_IS_STOPPING, -8002, -1, "08004", "Server is stopping");
@ -1997,8 +2122,22 @@ DEFINE_ERROR(OB_PACKET_CHECKSUM_ERROR, -8003, -1, "08004", "Packet checksum erro
DEFINE_ERROR_DEP(OB_PACKET_CLUSTER_ID_NOT_MATCH, -8004, -1, "08004", "Packet cluster_id not match"); DEFINE_ERROR_DEP(OB_PACKET_CLUSTER_ID_NOT_MATCH, -8004, -1, "08004", "Packet cluster_id not match");
DEFINE_ERROR_DEP(OB_TENANT_ID_NOT_MATCH, -8005, -1, "08005", "Tenant id not match"); DEFINE_ERROR_DEP(OB_TENANT_ID_NOT_MATCH, -8005, -1, "08005", "Tenant id not match");
// 余留位置
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// backup and restore error codes 9000 - 9099 // 致命错误[-8000, -9000),客户端收到8xxx错误,需要关闭SQL连接
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// Storage错误码值域 [-9000, -9500)
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR_DEP(OB_URI_ERROR, -9001, -1, "HY000", "URI error"); DEFINE_ERROR_DEP(OB_URI_ERROR, -9001, -1, "HY000", "URI error");
DEFINE_ERROR_DEP(OB_FINAL_MD5_ERROR, -9002, -1, "HY000", "OSS file MD5 error"); DEFINE_ERROR_DEP(OB_FINAL_MD5_ERROR, -9002, -1, "HY000", "OSS file MD5 error");
@ -2103,11 +2242,7 @@ DEFINE_ERROR(OB_ERR_RESTORE_STANDBY_VERSION_LAG, -9096, -1, "HY000", "standby bi
DEFINE_ERROR(OB_ERR_RESTORE_PRIMARY_TENANT_DROPPED, -9097, -1, "HY000", "primary tenant has been dropped"); DEFINE_ERROR(OB_ERR_RESTORE_PRIMARY_TENANT_DROPPED, -9097, -1, "HY000", "primary tenant has been dropped");
DEFINE_ERROR_DEP(OB_CLOUD_OBJECT_NOT_APPENDABLE, -9098, -1, "HY000", "normal object in object_storage(oss,cos,etc.) can't be appended content"); DEFINE_ERROR_DEP(OB_CLOUD_OBJECT_NOT_APPENDABLE, -9098, -1, "HY000", "normal object in object_storage(oss,cos,etc.) can't be appended content");
DEFINE_ERROR_EXT_DEP(OB_RESTORE_TENANT_FAILED, -9099, -1, "HY000", "restore tenant failed", "%s restore failed, %s"); DEFINE_ERROR_EXT_DEP(OB_RESTORE_TENANT_FAILED, -9099, -1, "HY000", "restore tenant failed", "%s restore failed, %s");
// end of backup and restore error codes 9001 ~ 9099
////////////////////////////////////////////////////////////////
//error code for STORAGE3.0 -9100 ~
////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_NO_SUCH_FILE_OR_DIRECTORY, -9100, -1, "HY000", "no such file or directory"); DEFINE_ERROR(OB_NO_SUCH_FILE_OR_DIRECTORY, -9100, -1, "HY000", "no such file or directory");
DEFINE_ERROR(OB_FILE_OR_DIRECTORY_EXIST, -9101, -1, "HY000", "file or directory already exist"); DEFINE_ERROR(OB_FILE_OR_DIRECTORY_EXIST, -9101, -1, "HY000", "file or directory already exist");
DEFINE_ERROR(OB_FILE_OR_DIRECTORY_PERMISSION_DENIED, -9102, -1, "HY000", "file or directory permission denied"); DEFINE_ERROR(OB_FILE_OR_DIRECTORY_PERMISSION_DENIED, -9102, -1, "HY000", "file or directory permission denied");
@ -2115,15 +2250,42 @@ DEFINE_ERROR(OB_TOO_MANY_OPEN_FILES, -9103, -1, "HY000", "too many open files");
DEFINE_ERROR(OB_DIRECT_LOAD_COMMIT_ERROR, -9104, -1, "HY000", "fail to commit direct load"); DEFINE_ERROR(OB_DIRECT_LOAD_COMMIT_ERROR, -9104, -1, "HY000", "fail to commit direct load");
DEFINE_ERROR_DEP(OB_S3_ERROR, -9105, -1, "HY000", "S3 error"); DEFINE_ERROR_DEP(OB_S3_ERROR, -9105, -1, "HY000", "S3 error");
// For tenant snapshot
DEFINE_ERROR_EXT_DEP(OB_TENANT_SNAPSHOT_NOT_EXIST, -9106, -1, "HY000", "Tenant snapshot does not exist", "Tenant snapshot \'%.*s\' does not exist");
DEFINE_ERROR_EXT_DEP(OB_TENANT_SNAPSHOT_EXIST, -9107, -1, "HY000", "Tenant snapshot already exist", "Tenant snapshot \'%.*s\' already exist");
DEFINE_ERROR_EXT_DEP(OB_TENANT_SNAPSHOT_TIMEOUT, -9108, -1, "HY000", "Tenant snapshot task timeout", "Tenant snapshot task timeout. %.*s");
DEFINE_ERROR_EXT_DEP(OB_CLONE_TENANT_TIMEOUT, -9109, -1, "HY000", "Clone tenant timeout", "Clone tenant timeout. %.*s");
DEFINE_ERROR_EXT_DEP(OB_ERR_CLONE_TENANT, -9110, -1, "HY000", "Tenant clone job failed", "%.*s");
DEFINE_ERROR_EXT_DEP(OB_ERR_TENANT_SNAPSHOT, -9111, -1, "HY000", "Tenant snapshot task failed", "%.*s");
DEFINE_ERROR_EXT_DEP(OB_TENANT_SNAPSHOT_LOCK_CONFLICT, -9112, -1, "HY000", "Tenant snapshot lock conflict", "%s");
// 余留位置,在该行之前继续添加storage错误码
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for storage auto extend file // error code for storage auto extend file
// 这一段是被错误在中间占位的错误码,不是一个完整区间
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_ERR_RESIZE_FILE_TO_SMALLER, -9200, -1, "HY000", "Extend ssblock file to smaller is not allowed"); DEFINE_ERROR(OB_ERR_RESIZE_FILE_TO_SMALLER, -9200, -1, "HY000", "Extend ssblock file to smaller is not allowed");
DEFINE_ERROR(OB_MARK_BLOCK_INFO_TIMEOUT, -9201, -1, "HY000", "Mark blocks timeout(5s) in auto extend process when alloc block fail"); DEFINE_ERROR(OB_MARK_BLOCK_INFO_TIMEOUT, -9201, -1, "HY000", "Mark blocks timeout(5s) in auto extend process when alloc block fail");
DEFINE_ERROR(OB_NOT_READY_TO_EXTEND_FILE, -9202, -1, "HY000", "Auto extend param is not ready to start extending file"); DEFINE_ERROR(OB_NOT_READY_TO_EXTEND_FILE, -9202, -1, "HY000", "Auto extend param is not ready to start extending file");
////////////////////////////////////////////////////////////////
// 余留位置
////////////////////////////////////////////////////////////////
// Storage错误码值域 [-9000, -9500)
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for PL/SQL -9500 ~ -10000 // PL/SQL错误码值域 [-9500, -10000)
//!!! -20000/-21000/-32491 should not in here. but we can not remove it now because of compat. ONLY PL SQL ERROR PUT HERE!!! //!!! -20000/-21000/-32491 should not in here. but we can not remove it now because of compat. ONLY PL SQL ERROR PUT HERE!!!
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ORACLE_ERROR_V2_EXT(OB_SP_RAISE_APPLICATION_ERROR, -20000, -1, "HY000", "The stored procedure 'raise_application_error' was called which causes this error to be generated", "%.*s", 20000, "ORA-20000: The stored procedure 'raise_application_error' was called which causes this error to be generated", "ORA%06ld: %.*s"); DEFINE_ORACLE_ERROR_V2_EXT(OB_SP_RAISE_APPLICATION_ERROR, -20000, -1, "HY000", "The stored procedure 'raise_application_error' was called which causes this error to be generated", "%.*s", 20000, "ORA-20000: The stored procedure 'raise_application_error' was called which causes this error to be generated", "ORA%06ld: %.*s");
@ -2395,8 +2557,23 @@ DEFINE_ORACLE_ERROR(OB_ERR_OUT_PARAM_NOT_BIND_VAR, -9763, -1, "HY000", "output p
DEFINE_ORACLE_ERROR_EXT(OB_ERR_TIME_EARLIER_THAN_SYSDATE, -9764, -1, "HY000", "the parameter must evaluate to a time in the future", "the parameter %s must evaluate to a time in the future", 23420, "the parameter must evaluate to a time in the future", "the parameter %s must evaluate to a time in the future"); DEFINE_ORACLE_ERROR_EXT(OB_ERR_TIME_EARLIER_THAN_SYSDATE, -9764, -1, "HY000", "the parameter must evaluate to a time in the future", "the parameter %s must evaluate to a time in the future", 23420, "the parameter must evaluate to a time in the future", "the parameter %s must evaluate to a time in the future");
DEFINE_PLS_ERROR_EXT(OB_ERR_NOT_FUNC_NAME, -9765, -1, "HY000", "object 'string' must be of type function or array to be used this way", "object '%.*s' must be of type function or array to be used this way", 224, "object 'string' must be of type function or array to be used this way", "object '%.*s' must be of type function or array to be used this way"); DEFINE_PLS_ERROR_EXT(OB_ERR_NOT_FUNC_NAME, -9765, -1, "HY000", "object 'string' must be of type function or array to be used this way", "object '%.*s' must be of type function or array to be used this way", 224, "object 'string' must be of type function or array to be used this way", "object '%.*s' must be of type function or array to be used this way");
// 余留位置
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for OBKV [-10500, -10700) // PL/SQL错误码值域 [-9500, -10000)
//!!! -20000/-21000/-32491 should not in here. but we can not remove it now because of compat. ONLY PL SQL ERROR PUT HERE!!!
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// OBKV错误码值域:[-10500, -10700)
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_ERR_KV_GLOBAL_INDEX_ROUTE, -10500, -1, "HY000", "incorrect route for obkv global index, client router should refresh."); DEFINE_ERROR(OB_ERR_KV_GLOBAL_INDEX_ROUTE, -10500, -1, "HY000", "incorrect route for obkv global index, client router should refresh.");
DEFINE_ERROR(OB_TTL_NOT_ENABLE, -10501, -1, "HY000", "TTL feature is not enabled"); DEFINE_ERROR(OB_TTL_NOT_ENABLE, -10501, -1, "HY000", "TTL feature is not enabled");
@ -2414,8 +2591,22 @@ DEFINE_ERROR_EXT(OB_KV_COLLATION_MISMATCH, -10512, -1, "HY000", "OBKV collation
DEFINE_ERROR_EXT(OB_KV_SCAN_RANGE_MISSING, -10513, -1, "HY000", "OBKV scan range missing", "Scan range missing, input scan range cell count is '%ld', which should equal to rowkey count '%ld'"); DEFINE_ERROR_EXT(OB_KV_SCAN_RANGE_MISSING, -10513, -1, "HY000", "OBKV scan range missing", "Scan range missing, input scan range cell count is '%ld', which should equal to rowkey count '%ld'");
DEFINE_ERROR(OB_KV_ODP_TIMEOUT, -10650, -1, "HY000", "ODP process timeout"); DEFINE_ERROR(OB_KV_ODP_TIMEOUT, -10650, -1, "HY000", "ODP process timeout");
// 余留位置
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
//error code for SQL [-11000 ---- -12000) // OBKV错误码值域:[-10500, -10700)
////////////////////////////////////////////////////////////////
//////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
// 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
// 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
// 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
// 每个区间内,请在“余留位置”行之前定义新错误码
// 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// SQL扩展区段1:[-11000, -12000)
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR(OB_ERR_VALUES_CLAUSE_NEED_HAVE_COLUMN, -11000, ER_VALUES_CLAUSE_NEED_HAVE_COLUMN, "HY000", "Each row of a VALUES clause must have at least one column, unless when used as source in an INSERT statement."); DEFINE_ERROR(OB_ERR_VALUES_CLAUSE_NEED_HAVE_COLUMN, -11000, ER_VALUES_CLAUSE_NEED_HAVE_COLUMN, "HY000", "Each row of a VALUES clause must have at least one column, unless when used as source in an INSERT statement.");
DEFINE_ERROR(OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES, -11001, ER_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES, "HY000", "A VALUES clause cannot use DEFAULT values, unless used as a source in an INSERT statement."); DEFINE_ERROR(OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES, -11001, ER_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES, "HY000", "A VALUES clause cannot use DEFAULT values, unless used as a source in an INSERT statement.");
@ -2435,20 +2626,25 @@ DEFINE_ERROR_EXT(OB_CANNOT_USER_IF_EXISTS, -11012, ER_CANNOT_USER_IF_EXISTS, "HY
DEFINE_ORACLE_ERROR(OB_ERR_ARGUMENT_SHOULD_CONSTANT_OR_GROUP_EXPR, -11010, -1, "HY000", "Argument should be a constant or a function of expressions in GROUP BY.", 30497, "Argument should be a constant or a function of expressions in GROUP BY."); DEFINE_ORACLE_ERROR(OB_ERR_ARGUMENT_SHOULD_CONSTANT_OR_GROUP_EXPR, -11010, -1, "HY000", "Argument should be a constant or a function of expressions in GROUP BY.", 30497, "Argument should be a constant or a function of expressions in GROUP BY.");
DEFINE_ERROR_EXT(OB_ERR_ILLEGAL_USER_VAR, -11013, ER_ILLEGAL_USER_VAR, "42000", "User variable name is illegal", "User variable name %.*s is illegal"); DEFINE_ERROR_EXT(OB_ERR_ILLEGAL_USER_VAR, -11013, ER_ILLEGAL_USER_VAR, "42000", "User variable name is illegal", "User variable name %.*s is illegal");
DEFINE_ERROR(OB_ERR_FT_COLUMN_NOT_INDEXED, -11014, ER_FT_MATCHING_KEY_NOT_FOUND, "HY000", "Can't find FULLTEXT index matching the column list"); DEFINE_ERROR(OB_ERR_FT_COLUMN_NOT_INDEXED, -11014, ER_FT_MATCHING_KEY_NOT_FOUND, "HY000", "Can't find FULLTEXT index matching the column list");
// 余留位置
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// tenant snapshot and tenant clone error codes [-12000 ~ -12100) // SQL扩展区段1:[-11000, -12000)
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ERROR_EXT_DEP(OB_TENANT_SNAPSHOT_NOT_EXIST, -12000, -1, "HY000", "Tenant snapshot does not exist", "Tenant snapshot \'%.*s\' does not exist");
DEFINE_ERROR_EXT_DEP(OB_TENANT_SNAPSHOT_EXIST, -12001, -1, "HY000", "Tenant snapshot already exist", "Tenant snapshot \'%.*s\' already exist"); //////////////////////////////////// 新增(占位)须知 ////////////////////////////////////
DEFINE_ERROR_EXT_DEP(OB_TENANT_SNAPSHOT_TIMEOUT, -12002, -1, "HY000", "Tenant snapshot task timeout", "Tenant snapshot task timeout. %.*s"); // 1. 新增错误码需要先在master分支提交,保证master是所有版本的超集,避免出现错误码冲突
DEFINE_ERROR_EXT_DEP(OB_CLONE_TENANT_TIMEOUT, -12003, -1, "HY000", "Clone tenant timeout", "Clone tenant timeout. %.*s"); // 2. 不支持以注释方式“占位”错误码,如果要新增错误码,直接提交完整的错误码定义即可
DEFINE_ERROR_EXT_DEP(OB_ERR_CLONE_TENANT, -12004, -1, "HY000", "Tenant clone job failed", "%.*s"); // 3. 不同的错误码区间有不同含义,请在合理区间内顺序定义错误码。区间定义见文件头。
DEFINE_ERROR_EXT_DEP(OB_ERR_TENANT_SNAPSHOT, -12005, -1, "HY000", "Tenant snapshot task failed", "%.*s"); // 每个区间内,请在“余留位置”行之前定义新错误码
DEFINE_ERROR_EXT_DEP(OB_TENANT_SNAPSHOT_LOCK_CONFLICT, -12006, -1, "HY000", "Tenant snapshot lock conflict", "%s"); // 如果没有合适区间,请联系 @修铭 定义一个新的区间
// 4. 本文件修改完成后,需要调用gen_errno.pl,生成ob_errno.h文件
////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// !!! text/blob || clob/blob erro code // !!! text/blob || clob/blob erro code
// for compat we cant not remove this errno!!!! // for compat we cant not remove this errno!!!!
// 这不是一个正常的区间,不要在这里新增错误码
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
DEFINE_ORACLE_ERROR(OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN, -22998, -1, "HY000", "CLOB or NCLOB in multibyte character set not supported", 22998, "CLOB or NCLOB in multibyte character set not supported"); DEFINE_ORACLE_ERROR(OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN, -22998, -1, "HY000", "CLOB or NCLOB in multibyte character set not supported", 22998, "CLOB or NCLOB in multibyte character set not supported");
DEFINE_ORACLE_ERROR_EXT(OB_ERR_UPDATE_ON_EXPR, -38104, -1, "HY000", "Columns referenced in the ON Clause cannot be updated", "Columns referenced in the ON Clause cannot be updated:'%.*s'.'%.*s'", 38104, "Columns referenced in the ON Clause cannot be updated", "Columns referenced in the ON Clause cannot be updated:'%.*s'.'%.*s'"); DEFINE_ORACLE_ERROR_EXT(OB_ERR_UPDATE_ON_EXPR, -38104, -1, "HY000", "Columns referenced in the ON Clause cannot be updated", "Columns referenced in the ON Clause cannot be updated:'%.*s'.'%.*s'", 38104, "Columns referenced in the ON Clause cannot be updated", "Columns referenced in the ON Clause cannot be updated:'%.*s'.'%.*s'");

View File

@ -3766,6 +3766,13 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_TOO_MANY_OPEN_FILES__USER_ERROR_MSG "too many open files" #define OB_TOO_MANY_OPEN_FILES__USER_ERROR_MSG "too many open files"
#define OB_DIRECT_LOAD_COMMIT_ERROR__USER_ERROR_MSG "fail to commit direct load" #define OB_DIRECT_LOAD_COMMIT_ERROR__USER_ERROR_MSG "fail to commit direct load"
#define OB_S3_ERROR__USER_ERROR_MSG "S3 error" #define OB_S3_ERROR__USER_ERROR_MSG "S3 error"
#define OB_TENANT_SNAPSHOT_NOT_EXIST__USER_ERROR_MSG "Tenant snapshot \'%.*s\' does not exist"
#define OB_TENANT_SNAPSHOT_EXIST__USER_ERROR_MSG "Tenant snapshot \'%.*s\' already exist"
#define OB_TENANT_SNAPSHOT_TIMEOUT__USER_ERROR_MSG "Tenant snapshot task timeout. %.*s"
#define OB_CLONE_TENANT_TIMEOUT__USER_ERROR_MSG "Clone tenant timeout. %.*s"
#define OB_ERR_CLONE_TENANT__USER_ERROR_MSG "%.*s"
#define OB_ERR_TENANT_SNAPSHOT__USER_ERROR_MSG "%.*s"
#define OB_TENANT_SNAPSHOT_LOCK_CONFLICT__USER_ERROR_MSG "%s"
#define OB_ERR_RESIZE_FILE_TO_SMALLER__USER_ERROR_MSG "Extend ssblock file to smaller is not allowed" #define OB_ERR_RESIZE_FILE_TO_SMALLER__USER_ERROR_MSG "Extend ssblock file to smaller is not allowed"
#define OB_MARK_BLOCK_INFO_TIMEOUT__USER_ERROR_MSG "Mark blocks timeout(5s) in auto extend process when alloc block fail" #define OB_MARK_BLOCK_INFO_TIMEOUT__USER_ERROR_MSG "Mark blocks timeout(5s) in auto extend process when alloc block fail"
#define OB_NOT_READY_TO_EXTEND_FILE__USER_ERROR_MSG "Auto extend param is not ready to start extending file" #define OB_NOT_READY_TO_EXTEND_FILE__USER_ERROR_MSG "Auto extend param is not ready to start extending file"
@ -4062,13 +4069,6 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_CANNOT_USER_IF_EXISTS__USER_ERROR_MSG "User %.*s does not exist" #define OB_CANNOT_USER_IF_EXISTS__USER_ERROR_MSG "User %.*s does not exist"
#define OB_ERR_ILLEGAL_USER_VAR__USER_ERROR_MSG "User variable name %.*s is illegal" #define OB_ERR_ILLEGAL_USER_VAR__USER_ERROR_MSG "User variable name %.*s is illegal"
#define OB_ERR_FT_COLUMN_NOT_INDEXED__USER_ERROR_MSG "Can't find FULLTEXT index matching the column list" #define OB_ERR_FT_COLUMN_NOT_INDEXED__USER_ERROR_MSG "Can't find FULLTEXT index matching the column list"
#define OB_TENANT_SNAPSHOT_NOT_EXIST__USER_ERROR_MSG "Tenant snapshot \'%.*s\' does not exist"
#define OB_TENANT_SNAPSHOT_EXIST__USER_ERROR_MSG "Tenant snapshot \'%.*s\' already exist"
#define OB_TENANT_SNAPSHOT_TIMEOUT__USER_ERROR_MSG "Tenant snapshot task timeout. %.*s"
#define OB_CLONE_TENANT_TIMEOUT__USER_ERROR_MSG "Clone tenant timeout. %.*s"
#define OB_ERR_CLONE_TENANT__USER_ERROR_MSG "%.*s"
#define OB_ERR_TENANT_SNAPSHOT__USER_ERROR_MSG "%.*s"
#define OB_TENANT_SNAPSHOT_LOCK_CONFLICT__USER_ERROR_MSG "%s"
#define OB_SP_RAISE_APPLICATION_ERROR__USER_ERROR_MSG "%.*s" #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_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" #define OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN__USER_ERROR_MSG "CLOB or NCLOB in multibyte character set not supported"
@ -5987,6 +5987,13 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_TOO_MANY_OPEN_FILES__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9103, too many open files" #define OB_TOO_MANY_OPEN_FILES__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9103, too many open files"
#define OB_DIRECT_LOAD_COMMIT_ERROR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9104, fail to commit direct load" #define OB_DIRECT_LOAD_COMMIT_ERROR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9104, fail to commit direct load"
#define OB_S3_ERROR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9105, S3 error" #define OB_S3_ERROR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9105, S3 error"
#define OB_TENANT_SNAPSHOT_NOT_EXIST__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9106, Tenant snapshot \'%.*s\' does not exist"
#define OB_TENANT_SNAPSHOT_EXIST__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9107, Tenant snapshot \'%.*s\' already exist"
#define OB_TENANT_SNAPSHOT_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9108, Tenant snapshot task timeout. %.*s"
#define OB_CLONE_TENANT_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9109, Clone tenant timeout. %.*s"
#define OB_ERR_CLONE_TENANT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9110, %.*s"
#define OB_ERR_TENANT_SNAPSHOT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9111, %.*s"
#define OB_TENANT_SNAPSHOT_LOCK_CONFLICT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9112, %s"
#define OB_ERR_RESIZE_FILE_TO_SMALLER__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9200, Extend ssblock file to smaller is not allowed" #define OB_ERR_RESIZE_FILE_TO_SMALLER__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9200, Extend ssblock file to smaller is not allowed"
#define OB_MARK_BLOCK_INFO_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9201, Mark blocks timeout(5s) in auto extend process when alloc block fail" #define OB_MARK_BLOCK_INFO_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9201, Mark blocks timeout(5s) in auto extend process when alloc block fail"
#define OB_NOT_READY_TO_EXTEND_FILE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9202, Auto extend param is not ready to start extending file" #define OB_NOT_READY_TO_EXTEND_FILE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9202, Auto extend param is not ready to start extending file"
@ -6283,13 +6290,6 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_CANNOT_USER_IF_EXISTS__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11012, User %.*s does not exist" #define OB_CANNOT_USER_IF_EXISTS__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11012, User %.*s does not exist"
#define OB_ERR_ILLEGAL_USER_VAR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11013, User variable name %.*s is illegal" #define OB_ERR_ILLEGAL_USER_VAR__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11013, User variable name %.*s is illegal"
#define OB_ERR_FT_COLUMN_NOT_INDEXED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11014, Can't find FULLTEXT index matching the column list" #define OB_ERR_FT_COLUMN_NOT_INDEXED__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11014, Can't find FULLTEXT index matching the column list"
#define OB_TENANT_SNAPSHOT_NOT_EXIST__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -12000, Tenant snapshot \'%.*s\' does not exist"
#define OB_TENANT_SNAPSHOT_EXIST__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -12001, Tenant snapshot \'%.*s\' already exist"
#define OB_TENANT_SNAPSHOT_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -12002, Tenant snapshot task timeout. %.*s"
#define OB_CLONE_TENANT_TIMEOUT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -12003, Clone tenant timeout. %.*s"
#define OB_ERR_CLONE_TENANT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -12004, %.*s"
#define OB_ERR_TENANT_SNAPSHOT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -12005, %.*s"
#define OB_TENANT_SNAPSHOT_LOCK_CONFLICT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -12006, %s"
#define OB_SP_RAISE_APPLICATION_ERROR__ORA_USER_ERROR_MSG "ORA%06ld: %.*s" #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_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" #define OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN__ORA_USER_ERROR_MSG "ORA-22998: CLOB or NCLOB in multibyte character set not supported"