You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2016/12/16 08:31:28 UTC
[1/3] incubator-trafodion git commit: [TRAFODION-2375]SQLGetDiagRec
return wrong msg len win/unix ODBC:SQLGetDiagRec return wrong len value when
data truncate
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 3f91dbfb2 -> 2581c0d4f
[TRAFODION-2375]SQLGetDiagRec return wrong msg len
win/unix ODBC:SQLGetDiagRec return wrong len value when data truncate
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/8c465fdf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/8c465fdf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/8c465fdf
Branch: refs/heads/master
Commit: 8c465fdf282f8083f5066ccfa095ce157a3790b3
Parents: ea16d38
Author: rwbzx <xi...@esgyn.cn>
Authored: Wed Dec 7 14:46:32 2016 +0800
Committer: rwbzx <xi...@esgyn.cn>
Committed: Wed Dec 7 14:46:32 2016 +0800
----------------------------------------------------------------------
core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp | 4 ++--
win-odbc64/odbcclient/drvr35/cdiag.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8c465fdf/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp
index 7ff05f3..f21e5e6 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp
@@ -427,8 +427,8 @@ SQLRETURN CDiagRec::GetDiagRec(SQLSMALLINT RecNumber,
{
if((rc = icuConv->OutArgTranslationHelper((SQLCHAR *)MsgStruct.lpsMsgText.c_str(), tmpStrLen,
(char*)MessageText, translateLengthMax, (int *)&translateLength, NULL, (char *)errorMsg)) != SQL_SUCCESS)
- rc = SQL_SUCCESS; // Supress SQL_ERROR or SQL_SUCCESS_WITH_INFO to prevent trace from looping;
- strLen = translateLength;
+ rc = SQL_SUCCESS_WITH_INFO;
+ strLen = tmpStrLen;
}
if (TextLengthPtr != NULL)
*TextLengthPtr = strLen;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8c465fdf/win-odbc64/odbcclient/drvr35/cdiag.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/cdiag.cpp b/win-odbc64/odbcclient/drvr35/cdiag.cpp
index 38d68d3..57cd0ed 100644
--- a/win-odbc64/odbcclient/drvr35/cdiag.cpp
+++ b/win-odbc64/odbcclient/drvr35/cdiag.cpp
@@ -389,8 +389,8 @@ SQLRETURN CDiagRec::GetDiagRec(SQLSMALLINT RecNumber,
translateLengthMax/2, (int *)&translateLength, (char *)errorMsg)) != SQL_SUCCESS )
rc = SQL_SUCCESS_WITH_INFO; //ERROR;
- strLen = translateLength;
- ((wchar_t *)MessageText)[strLen] = L'\0' ;
+ ((wchar_t *)MessageText)[translateLength] = L'\0';
+ strLen = tmpStrLen;
}
if (TextLengthPtr != NULL)
*TextLengthPtr = strLen;
[2/3] incubator-trafodion git commit: [TRAFODION-2375]SQLGetDiagRec
return wrong msg len logic added:return actual number of characters needed
when MessageText is NULL
Posted by li...@apache.org.
[TRAFODION-2375]SQLGetDiagRec return wrong msg len
logic added:return actual number of characters needed when MessageText is NULL
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/1973cbd2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/1973cbd2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/1973cbd2
Branch: refs/heads/master
Commit: 1973cbd2af56eb747e8931dd18dec9c26fa7798d
Parents: 8c465fd
Author: rwbzx <xi...@esgyn.cn>
Authored: Thu Dec 8 14:10:14 2016 +0800
Committer: rwbzx <xi...@esgyn.cn>
Committed: Thu Dec 8 14:10:14 2016 +0800
----------------------------------------------------------------------
core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp | 6 ++++++
win-odbc64/odbcclient/drvr35/cdiag.cpp | 8 +++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1973cbd2/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp
index f21e5e6..6dbc88f 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp
@@ -430,6 +430,12 @@ SQLRETURN CDiagRec::GetDiagRec(SQLSMALLINT RecNumber,
rc = SQL_SUCCESS_WITH_INFO;
strLen = tmpStrLen;
}
+ else
+ {
+ rc = SQL_SUCCESS_WITH_INFO;
+ strLen = tmpStrLen;
+ }
+
if (TextLengthPtr != NULL)
*TextLengthPtr = strLen;
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1973cbd2/win-odbc64/odbcclient/drvr35/cdiag.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/cdiag.cpp b/win-odbc64/odbcclient/drvr35/cdiag.cpp
index 57cd0ed..01ac023 100644
--- a/win-odbc64/odbcclient/drvr35/cdiag.cpp
+++ b/win-odbc64/odbcclient/drvr35/cdiag.cpp
@@ -392,8 +392,14 @@ SQLRETURN CDiagRec::GetDiagRec(SQLSMALLINT RecNumber,
((wchar_t *)MessageText)[translateLength] = L'\0';
strLen = tmpStrLen;
}
+ else
+ {
+ rc = SQL_SUCCESS_WITH_INFO;
+ strLen = tmpStrLen;
+ }
+
if (TextLengthPtr != NULL)
- *TextLengthPtr = strLen;
+ *TextLengthPtr = strLen;
}
else
{
[3/3] incubator-trafodion git commit: Merge Fix for
[TRAFODION-2375]ODBC:SQLGetDiagRec return wrong msg length when data truncate
Posted by li...@apache.org.
Merge Fix for [TRAFODION-2375]ODBC:SQLGetDiagRec return wrong msg length when data truncate
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/2581c0d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/2581c0d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/2581c0d4
Branch: refs/heads/master
Commit: 2581c0d4f8cca92280fe8538d1e183e4671ad636
Parents: 3f91dbf 1973cbd
Author: Liu Ming <li...@apache.org>
Authored: Fri Dec 16 08:22:27 2016 +0000
Committer: Liu Ming <li...@apache.org>
Committed: Fri Dec 16 08:22:27 2016 +0000
----------------------------------------------------------------------
.../conn/unixodbc/odbc/odbcclient/unixcli/cli/cdiag.cpp | 10 ++++++++--
win-odbc64/odbcclient/drvr35/cdiag.cpp | 12 +++++++++---
2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------