Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.0, 2.3
-
None
-
CentOS
Description
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