trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [2/3] incubator-trafodion git commit: Update SQLMXConnection.cpp
Date Wed, 17 Aug 2016 18:35:07 GMT
Update SQLMXConnection.cpp

Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/8be75cdd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/8be75cdd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/8be75cdd

Branch: refs/heads/master
Commit: 8be75cddf081fd38ba48a8c78d7ed24d626387e8
Parents: b25f943
Author: mashengchen <mashengchen@gmail.com>
Authored: Fri Aug 12 18:29:56 2016 +0800
Committer: GitHub <noreply@github.com>
Committed: Fri Aug 12 18:29:56 2016 +0800

----------------------------------------------------------------------
 core/conn/jdbc_type2/native/SQLMXConnection.cpp | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8be75cdd/core/conn/jdbc_type2/native/SQLMXConnection.cpp
----------------------------------------------------------------------
diff --git a/core/conn/jdbc_type2/native/SQLMXConnection.cpp b/core/conn/jdbc_type2/native/SQLMXConnection.cpp
index e554715..8c42bf7 100644
--- a/core/conn/jdbc_type2/native/SQLMXConnection.cpp
+++ b/core/conn/jdbc_type2/native/SQLMXConnection.cpp
@@ -240,7 +240,23 @@ JNIEXPORT void JNICALL Java_org_trafodion_jdbc_t2_SQLMXConnection_close
 
     SRVR_CONNECT_HDL *jdbcConnect;
     SQLRETURN rc;
-
+    
+    ExceptionStruct setConnectException;
+    ERROR_DESC_LIST_def sqlWarning;
+    odbc_SQLSvc_SetConnectionOption_sme_(NULL, NULL,
+                 &setConnectException,
+                 dialogueId,
+                 END_SESSION,
+                 0,
+                 NULL,
+                 &sqlWarning);
+    if (setConnectException.exception_nr != CEE_SUCCESS)
+    {
+        throwSetConnectionException(jenv, &setConnectException);
+        FUNCTION_RETURN_VOID(("END_SESSION - setConnectException.exception_nr(%s) is not
CEE_SUCCESS",
+                        CliDebugSqlError(setConnectException.exception_nr)));
+    }
+    
     jdbcConnect = (SRVR_CONNECT_HDL *)dialogueId;
     rc = jdbcConnect->sqlClose();
     switch (rc)


Mime
View raw message