PHOENIX-2086 CONSTRAINT_VIOLATION error code should use sqlstate 23, not 22
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/ffe24906 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/ffe24906 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/ffe24906 Branch: refs/heads/4.x-HBase-1.0 Commit: ffe2490623ef16dcdac1e2ee54c1c7dff207d885 Parents: ef34d1d Author: Samarth <[email protected]> Authored: Tue Jan 5 12:59:56 2016 -0800 Committer: Samarth <[email protected]> Committed: Tue Jan 5 12:59:56 2016 -0800 ---------------------------------------------------------------------- .../java/org/apache/phoenix/exception/SQLExceptionCode.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/ffe24906/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java index 228f06f..38e8ea0 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java @@ -83,11 +83,8 @@ public enum SQLExceptionCode { SINGLE_ROW_SUBQUERY_RETURNS_MULTIPLE_ROWS(215, "22015", "Single-row sub-query returns more than one row."), SUBQUERY_RETURNS_DIFFERENT_NUMBER_OF_FIELDS(216, "22016", "Sub-query must return the same number of fields as the left-hand-side expression of 'IN'."), AMBIGUOUS_JOIN_CONDITION(217, "22017", "Ambiguous or non-equi join condition specified. Consider using table list with where clause."), - CONSTRAINT_VIOLATION(218, "22018", "Constraint violation."), + CONSTRAINT_VIOLATION(218, "23018", "Constraint violation."), - /** - * Constraint Violation (errorcode 03, sqlstate 23) - */ CONCURRENT_TABLE_MUTATION(301, "23000", "Concurrent modification to table.", new Factory() { @Override public SQLException newException(SQLExceptionInfo info) {
