[TRAFODION-2821] Trafodion core code base needs to be thread safe
Fixes as per review comments and missed out changes in the commit 073cf68dd4d3
diff --git a/core/sql/executor/HBaseClient_JNI.cpp b/core/sql/executor/HBaseClient_JNI.cpp
index bf9bee1..88c3431 100644
--- a/core/sql/executor/HBaseClient_JNI.cpp
+++ b/core/sql/executor/HBaseClient_JNI.cpp
@@ -430,6 +430,7 @@
jenv_->CallVoidMethod(javaObj_, JavaMethods_[JM_REL_HTC].methodID, j_htc);
if (jenv_->ExceptionCheck()) {
getExceptionDetails(__FILE__, __LINE__, "HBaseClient_JNI::releaseHTableClient()");
+ jenv_->PopLocalFrame(NULL);
return HBC_ERROR_REL_HTC_EXCEPTION;
}
}
@@ -902,7 +903,6 @@
if (jenv_->ExceptionCheck())
{
getExceptionDetails(__FILE__, __LINE__, "HBaseClient_JNI::drop()");
- logError(CAT_SQL_HBASE, "HBaseClient_JNI::drop()", getLastError());
jenv_->PopLocalFrame(NULL);
return HBC_ERROR_DROP_EXCEPTION;
}
@@ -3318,7 +3318,7 @@
if (jenv_->ExceptionCheck())
{
- logError(CAT_SQL_HBASE, "HTableClient_JNI::setWriteBufferSize()", getLastError());
+ getExceptionDetails(__FILE__, __LINE__, "HTableClient_JNI::setWriteBufferSize()");
jenv_->PopLocalFrame(NULL);
return HTC_ERROR_WRITEBUFFERSIZE_EXCEPTION;
}
@@ -3957,6 +3957,13 @@
return HVC_ERROR_GET_ALLTBL_EXCEPTION;
}
+ if (j_tblNames == NULL)
+ {
+ GetCliGlobals()->setJniErrorStr(getErrorText(HVC_ERROR_EXISTS_EXCEPTION));
+ jenv_->PopLocalFrame(NULL);
+ return HVC_ERROR_EXISTS_EXCEPTION;
+ }
+
int numTables = convertStringObjectArrayToList(heap_, j_tblNames,
tblNames);
if (numTables == 0) {