hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ekoif...@apache.org
Subject hive git commit: HIVE-14292 ACID table creation fails on mysql with MySQLIntegrityConstraintViolationException(Eugene Koifman, reviewed by Wei Zheng)
Date Fri, 22 Jul 2016 17:14:48 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-1 a29d9b29f -> f21a40e8b


HIVE-14292 ACID table creation fails on mysql with MySQLIntegrityConstraintViolationException(Eugene
Koifman, reviewed by Wei Zheng)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/f21a40e8
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/f21a40e8
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/f21a40e8

Branch: refs/heads/branch-1
Commit: f21a40e8bfa0f219bdf48fd0347831cc32fd1aaf
Parents: a29d9b2
Author: Eugene Koifman <ekoifman@hortonworks.com>
Authored: Fri Jul 22 10:14:37 2016 -0700
Committer: Eugene Koifman <ekoifman@hortonworks.com>
Committed: Fri Jul 22 10:14:37 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/f21a40e8/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
index 16d45ed..2d6b177 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
@@ -3141,7 +3141,9 @@ abstract class TxnHandler implements TxnStore, TxnStore.MutexAPI {
         }
         break;
       case MYSQL:
-        if(ex.getErrorCode() == 1022 && "23000".equals(ex.getSQLState())) {
+        //https://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html
+        if((ex.getErrorCode() == 1022 || ex.getErrorCode() == 1062 || ex.getErrorCode() ==
1586)
+          && "23000".equals(ex.getSQLState())) {
           return true;
         }
         break;


Mime
View raw message