You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ek...@apache.org on 2015/01/20 20:04:56 UTC
svn commit: r1653336 -
/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
Author: ekoifman
Date: Tue Jan 20 19:04:56 2015
New Revision: 1653336
URL: http://svn.apache.org/r1653336
Log:
HIVE-9404 NPE in org.apache.hadoop.hive.metastore.txn.TxnHandler.determineDatabaseProduct() (Eugene Koifman, reviewed by Alan Gates)
Modified:
hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
Modified: hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java?rev=1653336&r1=1653335&r2=1653336&view=diff
==============================================================================
--- hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java (original)
+++ hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java Tue Jan 20 19:04:56 2015
@@ -902,7 +902,7 @@ public class TxnHandler {
// so I've tried to capture the different error messages (there appear to be fewer different
// error messages than SQL states).
// Derby and newer MySQL driver use the new SQLTransactionRollbackException
- if (dbProduct == null) {
+ if (dbProduct == null && conn != null) {
determineDatabaseProduct(conn);
}
if (e instanceof SQLTransactionRollbackException ||