Bugfix46540552:fix mapping bugs for cte error code

This commit is contained in:
obdev
2022-12-13 14:07:55 +00:00
committed by ob-robot
parent d1e99a65ab
commit 2c1b2f160d
14 changed files with 93 additions and 85 deletions

View File

@ -13501,10 +13501,10 @@ static const _error _error_OB_ERR_CTE_COLUMN_NUMBER_NOT_MATCH = {
.error_name = "OB_ERR_CTE_COLUMN_NUMBER_NOT_MATCH",
.error_cause = "Internal Error",
.error_solution = "Contact OceanBase Support",
.mysql_errno = -1,
.mysql_errno = ER_VIEW_WRONG_LIST,
.sqlstate = "HY000",
.str_error = "number of WITH clause column names does not match number of elements in select list",
.str_user_error = "number of WITH clause column names does not match number of elements in select list",
.str_error = "View's SELECT and view's field list have different column counts",
.str_user_error = "View's SELECT and view's field list have different column counts",
.oracle_errno = 32038,
.oracle_str_error = "ORA-32038: number of WITH clause column names does not match number of elements in select list",
.oracle_str_user_error = "ORA-32038: number of WITH clause column names does not match number of elements in select list"
@ -13525,7 +13525,7 @@ static const _error _error_OB_ERR_NEED_UNION_ALL_IN_RECURSIVE_CTE = {
.error_name = "OB_ERR_NEED_UNION_ALL_IN_RECURSIVE_CTE",
.error_cause = "Internal Error",
.error_solution = "Contact OceanBase Support",
.mysql_errno = -1,
.mysql_errno = ER_CTE_RECURSIVE_REQUIRES_UNION,
.sqlstate = "HY000",
.str_error = "recursive WITH clause must use a UNION ALL operation",
.str_user_error = "recursive WITH clause must use a UNION ALL operation",
@ -13549,10 +13549,10 @@ static const _error _error_OB_ERR_NEED_REFERENCE_ITSELF_DIRECTLY_IN_RECURSIVE_CT
.error_name = "OB_ERR_NEED_REFERENCE_ITSELF_DIRECTLY_IN_RECURSIVE_CTE",
.error_cause = "Internal Error",
.error_solution = "Contact OceanBase Support",
.mysql_errno = -1,
.mysql_errno = ER_CTE_RECURSIVE_REQUIRES_SINGLE_REFERENCE,
.sqlstate = "HY000",
.str_error = "recursive WITH clause must reference itself directly in one of the UNION ALL branches",
.str_user_error = "recursive WITH clause must reference itself directly in one of the UNION ALL branches",
.str_error = "In recursive query block of Recursive Common Table Expression, the recursive table must be referenced only once, and not in any subquery",
.str_user_error = "In recursive query block of Recursive Common Table Expression, the recursive table must be referenced only once, and not in any subquery",
.oracle_errno = 32042,
.oracle_str_error = "ORA-32042: recursive WITH clause must reference itself directly in one of the UNION ALL branches",
.oracle_str_user_error = "ORA-32042: recursive WITH clause must reference itself directly in one of the UNION ALL branches"
@ -13717,10 +13717,10 @@ static const _error _error_OB_ERR_CTE_ILLEGAL_RECURSIVE_BRANCH = {
.error_name = "OB_ERR_CTE_ILLEGAL_RECURSIVE_BRANCH",
.error_cause = "Internal Error",
.error_solution = "Contact OceanBase Support",
.mysql_errno = -1,
.mysql_errno = ER_CTE_RECURSIVE_FORBIDS_AGGREGATION,
.sqlstate = "HY000",
.str_error = "unsupported operation in recursive branch of recursive WITH clause",
.str_user_error = "unsupported operation in recursive branch of recursive WITH clause",
.str_error = "Recursive Common Table Expression can contain neither aggregation nor window functions in recursive query block",
.str_user_error = "Recursive Common Table Expression can contain neither aggregation nor window functions in recursive query block",
.oracle_errno = 32486,
.oracle_str_error = "ORA-32486: unsupported operation in recursive branch of recursive WITH clause",
.oracle_str_user_error = "ORA-32486: unsupported operation in recursive branch of recursive WITH clause"
@ -13729,10 +13729,10 @@ static const _error _error_OB_ERR_ILLEGAL_JOIN_IN_RECURSIVE_CTE = {
.error_name = "OB_ERR_ILLEGAL_JOIN_IN_RECURSIVE_CTE",
.error_cause = "Internal Error",
.error_solution = "Contact OceanBase Support",
.mysql_errno = -1,
.mysql_errno = ER_CTE_RECURSIVE_FORBIDDEN_JOIN_ORDER,
.sqlstate = "HY000",
.str_error = "unsupported join in recursive WITH query",
.str_user_error = "unsupported join in recursive WITH query",
.str_error = "In recursive query block of Recursive Common Table Expression, the recursive table must neither be in the right argument of a LEFT JOIN, nor be forced to be non-first with join order hints",
.str_user_error = "In recursive query block of Recursive Common Table Expression, the recursive table must neither be in the right argument of a LEFT JOIN, nor be forced to be non-first with join order hints",
.oracle_errno = 32487,
.oracle_str_error = "ORA-32487: unsupported join in recursive WITH query",
.oracle_str_user_error = "ORA-32487: unsupported join in recursive WITH query"