ErrNo: Add Error number for feature foreign_key set null

This commit is contained in:
obdev
2023-08-16 07:40:41 +00:00
committed by ob-robot
parent a4bac8c38f
commit b39b92b3fc
4 changed files with 40 additions and 2 deletions

View File

@ -955,6 +955,7 @@
#define ER_JSON_DOCUMENT_TOO_DEEP 3157
#define ER_JSON_DOCUMENT_NULL_KEY 3158
#define ER_INVALID_JSON_PATH_ARRAY_CELL 3165
#define ER_UNSUPPORTED_FK_SET_NULL_ON_GENERATED_COLUMN 3104
#define ER_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN 3105
#define ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN 3106
#define ER_DEPENDENT_BY_GENERATED_COLUMN 3108

File diff suppressed because one or more lines are too long

View File

@ -1153,6 +1153,9 @@ DEFINE_ERROR_EXT(OB_ERR_WINDOW_RANGE_FRAME_NUMERIC_TYPE, -5509, ER_WINDOW_RANGE_
DEFINE_ERROR_EXT(OB_ERR_WINDOW_RANGE_BOUND_NOT_CONSTANT, -5510, ER_WINDOW_RANGE_BOUND_NOT_CONSTANT, "HY000", "Window has a non-constant frame bound.", "Window '%.*s' has a non-constant frame bound.");
DEFINE_ORACLE_ERROR(OB_ERR_DEFAULT_FOR_MODIFYING_VIEWS, -5511, -1, "42000", "Explicit column default is not supported for modifying views", 32575, "Explicit column default is not supported for modifying views");
DEFINE_ERROR_EXT(OB_ERR_FK_COLUMN_NOT_NULL, -5512, ER_FK_COLUMN_NOT_NULL, "HY000", "Column cannot be NOT NULL: needed in a foreign key constraint SET NULL", "Column \'%s\' cannot be NOT NULL: needed in a foreign key constraint \'%s\' SET NULL");
DEFINE_ORACLE_ERROR(OB_ERR_UNSUPPORTED_FK_SET_NULL_ON_GENERATED_COLUMN, -5513, ER_UNSUPPORTED_FK_SET_NULL_ON_GENERATED_COLUMN, "HY000", " Cannot define foreign key with ON DELETE SET NULL clause on a generated column", 54036, "cannot define referential constraint with ON DELETE SET NULL clause on virtual column");
DEFINE_ERROR_EXT(OB_ERR_SP_ALREADY_EXISTS, -5541, ER_SP_ALREADY_EXISTS, "42000", "procedure/function already exists", "%s %.*s already exists");
DEFINE_ERROR_EXT(OB_ERR_SP_DOES_NOT_EXIST, -5542, ER_SP_DOES_NOT_EXIST, "42000", "procedure/function does not exist", "%s %.*s.%.*s does not exist");
DEFINE_PLS_ERROR_EXT(OB_ERR_SP_UNDECLARED_VAR, -5543, ER_SP_UNDECLARED_VAR, "42000", "Undeclared variable", "Undeclared variable: %.*s", 201, "identifier must be declared", "identifier '%.*s' must be declared");

View File

@ -1,3 +1,4 @@
// DO NOT EDIT. This file is automatically generated from `ob_errno.def'.
// Copyright 2016 Alibaba Inc. All Rights Reserved.
@ -863,6 +864,8 @@ constexpr int OB_ERR_WINDOW_RANGE_FRAME_TEMPORAL_TYPE = -5508;
constexpr int OB_ERR_WINDOW_RANGE_FRAME_NUMERIC_TYPE = -5509;
constexpr int OB_ERR_WINDOW_RANGE_BOUND_NOT_CONSTANT = -5510;
constexpr int OB_ERR_DEFAULT_FOR_MODIFYING_VIEWS = -5511;
constexpr int OB_ERR_FK_COLUMN_NOT_NULL = -5512;
constexpr int OB_ERR_UNSUPPORTED_FK_SET_NULL_ON_GENERATED_COLUMN = -5513;
constexpr int OB_ERR_SP_ALREADY_EXISTS = -5541;
constexpr int OB_ERR_SP_DOES_NOT_EXIST = -5542;
constexpr int OB_ERR_SP_UNDECLARED_VAR = -5543;
@ -2814,6 +2817,8 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_ERR_WINDOW_RANGE_FRAME_NUMERIC_TYPE__USER_ERROR_MSG "Window '%.*s' with RANGE frame has ORDER BY expression of numeric type. INTERVAL bound value not allowed."
#define OB_ERR_WINDOW_RANGE_BOUND_NOT_CONSTANT__USER_ERROR_MSG "Window '%.*s' has a non-constant frame bound."
#define OB_ERR_DEFAULT_FOR_MODIFYING_VIEWS__USER_ERROR_MSG "Explicit column default is not supported for modifying views"
#define OB_ERR_FK_COLUMN_NOT_NULL__USER_ERROR_MSG "Column \'%s\' cannot be NOT NULL: needed in a foreign key constraint \'%s\' SET NULL"
#define OB_ERR_UNSUPPORTED_FK_SET_NULL_ON_GENERATED_COLUMN__USER_ERROR_MSG " Cannot define foreign key with ON DELETE SET NULL clause on a generated column"
#define OB_ERR_SP_ALREADY_EXISTS__USER_ERROR_MSG "%s %.*s already exists"
#define OB_ERR_SP_DOES_NOT_EXIST__USER_ERROR_MSG "%s %.*s.%.*s does not exist"
#define OB_ERR_SP_UNDECLARED_VAR__USER_ERROR_MSG "Undeclared variable: %.*s"
@ -4934,6 +4939,8 @@ constexpr int OB_ERR_INVALID_DATE_MSG_FMT_V2 = -4219;
#define OB_ERR_WINDOW_RANGE_FRAME_NUMERIC_TYPE__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -5509, Window '%.*s' with RANGE frame has ORDER BY expression of numeric type. INTERVAL bound value not allowed."
#define OB_ERR_WINDOW_RANGE_BOUND_NOT_CONSTANT__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -5510, Window '%.*s' has a non-constant frame bound."
#define OB_ERR_DEFAULT_FOR_MODIFYING_VIEWS__ORA_USER_ERROR_MSG "ORA-32575: Explicit column default is not supported for modifying views"
#define OB_ERR_FK_COLUMN_NOT_NULL__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -5512, Column \'%s\' cannot be NOT NULL: needed in a foreign key constraint \'%s\' SET NULL"
#define OB_ERR_UNSUPPORTED_FK_SET_NULL_ON_GENERATED_COLUMN__ORA_USER_ERROR_MSG "ORA-54036: cannot define referential constraint with ON DELETE SET NULL clause on virtual column"
#define OB_ERR_SP_ALREADY_EXISTS__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -5541, %s %.*s already exists"
#define OB_ERR_SP_DOES_NOT_EXIST__ORA_USER_ERROR_MSG "ORA-00600: internal error code, arguments: -5542, %s %.*s.%.*s does not exist"
#define OB_ERR_SP_UNDECLARED_VAR__ORA_USER_ERROR_MSG "PLS-00201: identifier '%.*s' must be declared"
@ -6019,7 +6026,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[2116];
extern int g_all_ob_errnos[2118];
const char *ob_error_name(const int oberr);
const char* ob_error_cause(const int oberr);