Repository: trafodion
Updated Branches:
  refs/heads/master b04bfda91 -> 0f5f8a7a3


fix JIRA bug 3039, SendEventMsg is used in a wrong way


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

Branch: refs/heads/master
Commit: cdd1e324e3cddbd4f52b06ea7c6556f4a2940a47
Parents: b06e0dc
Author: Kenny <[email protected]>
Authored: Mon Apr 23 07:13:38 2018 +0000
Committer: Kenny <[email protected]>
Committed: Mon Apr 23 07:13:38 2018 +0000

----------------------------------------------------------------------
 core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/cdd1e324/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp 
b/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
index 423b0a6..9936969 100644
--- a/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
+++ b/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
@@ -6533,6 +6533,8 @@ odbc_SQLSrvr_ExtractLob_sme_(
         if (retcode == SQL_ERROR)
         {
             ERROR_DESC_def *p_buffer = 
QryLobExtractSrvrStmt->sqlError.errorList._buffer;
+            char             errNumStr[128];
+            sprintf(errNumStr, "%d", p_buffer->sqlcode);
             strncpy(RequestError, p_buffer->errorText, sizeof(RequestError) - 
1);
 
             SendEventMsg(MSG_SQL_ERROR,
@@ -6541,7 +6543,7 @@ odbc_SQLSrvr_ExtractLob_sme_(
                          ODBCMX_SERVER,
                          srvrGlobal->srvrObjRef,
                          2,
-                         p_buffer->sqlcode,
+                         errNumStr,
                          RequestError);
 
             exception_->exception_nr = odbc_SQLsrvr_ExtractLob_ParamError_exn_;
@@ -6616,6 +6618,9 @@ odbc_SQLSrvr_UpdateLob_sme_(
         if (retcode == SQL_ERROR)
         {
             ERROR_DESC_def * p_buffer = 
QryLobUpdateSrvrStmt->sqlError.errorList._buffer;
+            char             errNumStr[128];
+            sprintf(errNumStr, "%d", p_buffer->sqlcode);
+
             strncpy(RequestError, p_buffer->errorText, sizeof(RequestError) - 
1);
 
             SendEventMsg(MSG_SQL_ERROR,
@@ -6624,7 +6629,7 @@ odbc_SQLSrvr_UpdateLob_sme_(
                          ODBCMX_SERVER,
                          srvrGlobal->srvrObjRef,
                          2,
-                         p_buffer->sqlcode,
+                         errNumStr,
                          RequestError);
             exception_->exception_nr = odbc_SQLSvc_UpdateLob_ParamError_exn_;
             exception_->u.SQLError.errorList._length = 
QryLobUpdateSrvrStmt->sqlError.errorList._length;

Reply via email to