You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2017/08/29 22:25:44 UTC

[1/2] incubator-trafodion git commit: [TRAFODION-2702] fix wrong offset while converting sql to c with ucs2

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master dec408b9b -> b882491fe


[TRAFODION-2702] fix wrong offset while converting sql to c with ucs2


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

Branch: refs/heads/master
Commit: 83aa92d6f98ce132cda4e4e81a2f503c71344883
Parents: ba88033
Author: Weixin-Xu <we...@esgyn.cn>
Authored: Mon Aug 21 10:40:47 2017 +0800
Committer: Weixin-Xu <we...@esgyn.cn>
Committed: Mon Aug 21 10:40:47 2017 +0800

----------------------------------------------------------------------
 win-odbc64/odbcclient/drvr35/sqltocconv.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/83aa92d6/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/sqltocconv.cpp b/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
index 37922c0..ef3fec8 100644
--- a/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
+++ b/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
@@ -3445,7 +3445,10 @@ unsigned long ODBC::ConvertSQLToC(SQLINTEGER	ODBCAppVersion,
 			}
 			else
 			{
-				DataLen = charlength-Offset;
+				if (srcCharSet == SQLCHARSETCODE_UCS2)
+					DataLen = charlength / 2 - Offset;
+				else
+					DataLen = charlength - Offset;
 				if (DataLen >= targetLength)
 				{
 					DataLenTruncated = DataLen;


[2/2] incubator-trafodion git commit: Merge [TRAFODION-2702] PR 1214 Fix offset bug concerning UCS2

Posted by db...@apache.org.
Merge [TRAFODION-2702] PR 1214 Fix offset bug concerning UCS2


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

Branch: refs/heads/master
Commit: b882491fe8ec04aee4aa0ecfc6bd4becc4969311
Parents: dec408b 83aa92d
Author: Dave Birdsall <db...@apache.org>
Authored: Tue Aug 29 22:24:51 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Tue Aug 29 22:24:51 2017 +0000

----------------------------------------------------------------------
 win-odbc64/odbcclient/drvr35/sqltocconv.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b882491f/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
----------------------------------------------------------------------