trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ryzuo <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #853: [TRAFODION-1262]ODBC:Varchar col oper...
Date Thu, 01 Dec 2016 01:57:35 GMT
Github user ryzuo commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/853#discussion_r90182330
  
    --- Diff: core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdesc.cpp ---
    @@ -595,9 +597,19 @@ unsigned long CDescRec::setDescRec(short DescMode, SQLItemDesc_def
*SQLItemDesc)
     		break;
     	case SQLTYPECODE_VARCHAR_WITH_LENGTH:
     		if (m_SQLCharset == SQLCHARSETCODE_UCS2)
    -			m_SQLOctetLength = SQLItemDesc->maxLen+4;
    +		{
    +			if(SQLItemDesc->maxLen > 0x7fff)
    +				m_SQLOctetLength = SQLItemDesc->maxLen+6;
    +			else
    +				m_SQLOctetLength = SQLItemDesc->maxLen+4;
    +		}
     		else
    -			m_SQLOctetLength = SQLItemDesc->maxLen+3;
    +		{
    +			if(SQLItemDesc->maxLen > 0x7fff)
    --- End diff --
    
    ditto


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message