add error codes for values statement
This commit is contained in:
@ -1063,6 +1063,8 @@
|
||||
#define ER_MULTIPLE_CONSTRAINTS_WITH_SAME_NAME 3939
|
||||
#define ER_CONSTRAINT_NOT_FOUND 3940
|
||||
#define ER_ALTER_CONSTRAINT_ENFORCEMENT_NOT_SUPPORTED 3941
|
||||
#define ER_VALUES_CLAUSE_NEED_HAVE_COLUMN 3942
|
||||
#define ER_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES 3943
|
||||
#define ER_DEPENDENT_BY_CHECK_CONSTRAINT 3959
|
||||
#define ER_MISSING_JSON_VALUE 3966
|
||||
#define ER_MULTIPLE_JSON_VALUES 3967
|
||||
|
File diff suppressed because one or more lines are too long
@ -10,6 +10,13 @@
|
||||
// 致命错误[-8000, -9000),客户端收到8xxx错误,需要关闭SQL连接
|
||||
// backup [-9000, -9500)
|
||||
// pl [-9500, -10000)
|
||||
// OBProxy整体通用错误码,针对公共模块的代码抛出的错误,值域:[-10000, -10100)
|
||||
// OBProxy业务错误码,值域:[-10100, -10300)
|
||||
// OBSharding错误码,值域:[-10300, -10500)
|
||||
// OBKV错误码,值域:[-10500, -10700)
|
||||
// 富客户端错误码,值域:[-10700, -10900)
|
||||
// SQL扩展区段1:[-11000, -12000)
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//error code -1~-999 are reserved
|
||||
//error code -1000~-1999 are reserved for mysql server error, see mysql_errno.h
|
||||
@ -2322,6 +2329,12 @@ DEFINE_ERROR_EXT(OB_ERR_WRONG_USAGE, -9751, ER_WRONG_USAGE, "HY000", "Incorrect
|
||||
DEFINE_PLS_ERROR(OB_ERR_FORALL_ON_REMOTE_TABLE, -9752, -1, "HY000", "FORALL INSERT/UPDATE/DELETE not support on remote tables", 739, "FORALL INSERT/UPDATE/DELETE not support on remote tables");
|
||||
DEFINE_ORACLE_ERROR(OB_ERR_SEQUENCE_NOT_DEFINE, -9753, -1, "HY000", "sequence is not yet defined in this session", 8002, "sequence is not yet defined in this session");
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//error code for SQL [-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_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.");
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// !!! text/blob || clob/blob erro code
|
||||
// for compat we cant not remove this errno!!!!
|
||||
|
@ -1772,6 +1772,8 @@ constexpr int OB_ERR_TABLE_OUT_OF_RANGE = -9750;
|
||||
constexpr int OB_ERR_WRONG_USAGE = -9751;
|
||||
constexpr int OB_ERR_FORALL_ON_REMOTE_TABLE = -9752;
|
||||
constexpr int OB_ERR_SEQUENCE_NOT_DEFINE = -9753;
|
||||
constexpr int OB_ERR_VALUES_CLAUSE_NEED_HAVE_COLUMN = -11000;
|
||||
constexpr int OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES = -11001;
|
||||
constexpr int OB_SP_RAISE_APPLICATION_ERROR = -20000;
|
||||
constexpr int OB_SP_RAISE_APPLICATION_ERROR_NUM = -21000;
|
||||
constexpr int OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN = -22998;
|
||||
@ -3894,6 +3896,8 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_WRONG_USAGE__USER_ERROR_MSG "Incorrect usage of %s"
|
||||
#define OB_ERR_FORALL_ON_REMOTE_TABLE__USER_ERROR_MSG "FORALL INSERT/UPDATE/DELETE not support on remote tables"
|
||||
#define OB_ERR_SEQUENCE_NOT_DEFINE__USER_ERROR_MSG "sequence is not yet defined in this session"
|
||||
#define OB_ERR_VALUES_CLAUSE_NEED_HAVE_COLUMN__USER_ERROR_MSG "Each row of a VALUES clause must have at least one column, unless when used as source in an INSERT statement."
|
||||
#define OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES__USER_ERROR_MSG "A VALUES clause cannot use DEFAULT values, unless used as a source in an INSERT statement."
|
||||
#define OB_SP_RAISE_APPLICATION_ERROR__USER_ERROR_MSG "%.*s"
|
||||
#define OB_SP_RAISE_APPLICATION_ERROR_NUM__USER_ERROR_MSG "error number argument to raise_application_error of '%d' is out of range"
|
||||
#define OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN__USER_ERROR_MSG "CLOB or NCLOB in multibyte character set not supported"
|
||||
@ -6016,6 +6020,8 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_WRONG_USAGE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -9751, Incorrect usage of %s"
|
||||
#define OB_ERR_FORALL_ON_REMOTE_TABLE__ORA_USER_ERROR_MSG "PLS-00739: FORALL INSERT/UPDATE/DELETE not support on remote tables"
|
||||
#define OB_ERR_SEQUENCE_NOT_DEFINE__ORA_USER_ERROR_MSG "ORA-08002: sequence is not yet defined in this session"
|
||||
#define OB_ERR_VALUES_CLAUSE_NEED_HAVE_COLUMN__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11000, Each row of a VALUES clause must have at least one column, unless when used as source in an INSERT statement."
|
||||
#define OB_ERR_VALUES_CLAUSE_CANNOT_USE_DEFAULT_VALUES__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -11001, A VALUES clause cannot use DEFAULT values, unless used as a source in an INSERT statement."
|
||||
#define OB_SP_RAISE_APPLICATION_ERROR__ORA_USER_ERROR_MSG "ORA%06ld: %.*s"
|
||||
#define OB_SP_RAISE_APPLICATION_ERROR_NUM__ORA_USER_ERROR_MSG "ORA-21000: error number argument to raise_application_error of '%d' is out of range"
|
||||
#define OB_CLOB_ONLY_SUPPORT_WITH_MULTIBYTE_FUN__ORA_USER_ERROR_MSG "ORA-22998: CLOB or NCLOB in multibyte character set not supported"
|
||||
@ -6026,7 +6032,7 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
|
||||
#define OB_ERR_DATA_TOO_LONG_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-12899: value too large for column %.*s (actual: %ld, maximum: %ld)"
|
||||
#define OB_ERR_INVALID_DATE_MSG_FMT_V2__ORA_USER_ERROR_MSG "ORA-01861: Incorrect datetime value for column '%.*s' at row %ld"
|
||||
|
||||
extern int g_all_ob_errnos[2118];
|
||||
extern int g_all_ob_errnos[2120];
|
||||
|
||||
const char *ob_error_name(const int oberr);
|
||||
const char* ob_error_cause(const int oberr);
|
||||
|
Reference in New Issue
Block a user