[
https://issues.apache.org/jira/browse/TRAFODION-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16134647#comment-16134647
]
ASF GitHub Bot commented on TRAFODION-2702:
-------------------------------------------
GitHub user Weixin-Xu opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1214
[TRAFODION-2702] fix wrong offset while converting sql to c with ucs2
For last PR , the bug on windows has not been mentioned
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Weixin-Xu/incubator-trafodion master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1214.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1214
----
commit 83aa92d6f98ce132cda4e4e81a2f503c71344883
Author: Weixin-Xu <[email protected]>
Date: 2017-08-21T02:40:47Z
[TRAFODION-2702] fix wrong offset while converting sql to c with ucs2
----
> [ODBC] The SQL type is set to CHAR (n) CHARACTER SET USC2, SQLGetData to read
> data multiple times returns the wrong length value
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: TRAFODION-2702
> URL: https://issues.apache.org/jira/browse/TRAFODION-2702
> Project: Apache Trafodion
> Issue Type: Bug
> Components: client-odbc-linux
> Affects Versions: 2.2-incubating, 2.3-incubating
> Environment: CentOS
> Reporter: haolin.song
> Fix For: 2.2-incubating, 2.3-incubating
>
>
> The SQL type is set to 'CHAR (N)' CHARACTER SET USC2, SQLGetData will read
> data multiple times when the length of buffer is less than the length of the
> data but returns wrong size of length.
> "CREATE TABLE TB_DEBUG(C1 CHAR(20) CHARACTER SET UCS2)"
> "INSERT INTO TB_DEBUG VALUES (_UCS2'0123456789abcdefghij')"
> "select * from TB_DEBUG"
> SQLFetch(hstmt);
> while (retcode != SQL_NO_DATA_FOUND)
> ...
> retcode =
> SQLGetData(hstmt,(SWORD)(1),SQL_C_CHAR,UCS2Output,11,&len);
> ...
> the SQLGetData will return 5 times and the len is 20,31,21,11,1
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)