This is an automated email from the ASF dual-hosted git repository.
gates pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 1ae1c48 HIVE-21680 Backport HIVE-17644 to branch-2.3 (Yuming Wang via
Alan Gates)
1ae1c48 is described below
commit 1ae1c483fac71e7950d270075455136373e248a0
Author: Alan Gates <[email protected]>
AuthorDate: Fri May 3 13:25:58 2019 -0700
HIVE-21680 Backport HIVE-17644 to branch-2.3 (Yuming Wang via Alan Gates)
---
.../java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
index 22c1a33..227ba15 100644
---
a/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
+++
b/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
@@ -173,7 +173,7 @@ class MetaStoreDirectSql {
tx.begin();
doCommit = true;
}
- Query dbQuery = null, tblColumnQuery = null, partColumnQuery = null;
+ Query dbQuery = null, tblColumnQuery = null, partColumnQuery = null,
constraintQuery = null;
try {
// Force the underlying db to initialize.
@@ -186,6 +186,9 @@ class MetaStoreDirectSql {
partColumnQuery = pm.newQuery(MPartitionColumnStatistics.class, "dbName
== ''");
partColumnQuery.execute();
+ constraintQuery = pm.newQuery(MConstraint.class, "childIntegerIndex <
0");
+ constraintQuery.execute();
+
return true;
} catch (Exception ex) {
doCommit = false;
@@ -205,6 +208,9 @@ class MetaStoreDirectSql {
if (partColumnQuery != null) {
partColumnQuery.closeAll();
}
+ if (constraintQuery != null) {
+ constraintQuery.cancelAll();
+ }
}
}