You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "苏锦佩 (JIRA)" <ji...@apache.org> on 2017/03/15 02:36:41 UTC
[jira] [Updated] (TRAFODION-2536) user variable was not be bind but
the value changed by SQLFetch
[ https://issues.apache.org/jira/browse/TRAFODION-2536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
苏锦佩 updated TRAFODION-2536:
---------------------------
Environment:
server:
SQL>exit
[trafodion@gyvm-15 scripts]$ sqvers
cat: /opt/hptc/pdsh/nodes: No such file or directory
TRAF_HOME=/home/trafodion/apache-trafodion-2.1.0
who@host=trafodion@gyvm-15.novalocal
JAVA_HOME=/opt/share/Yunpeng/JDK/jdk1.7.0_67
linux=2.6.32-642.11.1.el6.x86_64
redhat=6.8
libarkcmp_dll.so tdm_arkcmp Version 1.0.1 Apache_Trafodion Release 2.1.0 (Build release [2.0.1rc3-1412-ge48a2be_Bld40], branch e48a2be-no_branch, date 20170310_0540)
hadoop version: HDP2.3
installation package from:
http://traf-builds.esgyn.com/downloads/trafodion/publish/daily/20170310_0545-release/
client info:
centos7.2, driver from installation package.
was:
server:
SQL>exit
[trafodion@gyvm-15 scripts]$ sqvers
cat: /opt/hptc/pdsh/nodes: No such file or directory
TRAF_HOME=/home/trafodion/apache-trafodion-2.1.0
who@host=trafodion@gyvm-15.novalocal
JAVA_HOME=/opt/share/Yunpeng/JDK/jdk1.7.0_67
linux=2.6.32-642.11.1.el6.x86_64
redhat=6.8
libarkcmp_dll.so tdm_arkcmp Version 1.0.1 Apache_Trafodion Release 2.1.0 (Build release [2.0.1rc3-1412-ge48a2be_Bld40], branch e48a2be-no_branch, date 20170310_0540)
hadoop version: HDP2.3
installation package from:
http://traf-builds.esgyn.com/downloads/trafodion/publish/daily/20170310_0545-release/
client info:
Win10, driver from installation package.
> user variable was not be bind but the value changed by SQLFetch
> ---------------------------------------------------------------
>
> Key: TRAFODION-2536
> URL: https://issues.apache.org/jira/browse/TRAFODION-2536
> Project: Apache Trafodion
> Issue Type: Bug
> Components: client-odbc-linux
> Affects Versions: 2.1-incubating
> Environment: server:
> SQL>exit
> [trafodion@gyvm-15 scripts]$ sqvers
> cat: /opt/hptc/pdsh/nodes: No such file or directory
> TRAF_HOME=/home/trafodion/apache-trafodion-2.1.0
> who@host=trafodion@gyvm-15.novalocal
> JAVA_HOME=/opt/share/Yunpeng/JDK/jdk1.7.0_67
> linux=2.6.32-642.11.1.el6.x86_64
> redhat=6.8
> libarkcmp_dll.so tdm_arkcmp Version 1.0.1 Apache_Trafodion Release 2.1.0 (Build release [2.0.1rc3-1412-ge48a2be_Bld40], branch e48a2be-no_branch, date 20170310_0540)
> hadoop version: HDP2.3
> installation package from:
> http://traf-builds.esgyn.com/downloads/trafodion/publish/daily/20170310_0545-release/
> client info:
> centos7.2, driver from installation package.
> Reporter: 苏锦佩
> Attachments: main.cpp
>
>
> please see code below:
> void checkIllegalAccess(SQLHANDLE hstmt)
> {
> SQLRETURN retcode;
> char buf1[1024] = "hello";
> TIMESTAMP_STRUCT CTimestampOutput[9];
> SQLLEN olen;
> char buf2[1024] = "world";
> retcode = SQLExecDirect(hstmt, (SQLCHAR*)"CREATE TABLE SQLTOTIMESTAMP(C1 CHAR(30),C2 VARCHAR(30),C3 DATE,C4 TIME,C5 TIMESTAMP,C6 LONG VARCHAR,C7 NCHAR(30),C8 NCHAR VARYING(30),C9 LONG VARCHAR CHARACTER SET UCS2) NO PARTITION", SQL_NTS);
> retcode = SQLExecDirect(hstmt, (SQLCHAR*)"INSERT INTO SQLTOTIMESTAMP VALUES ('1997-10-11 03:45:04.34', '1999-01-01 15:29:42.321', { d '1993-12-30' }, { t '10:11:12' }, { ts '1992-12-31 23:45:23.123456' }, '1998-12-23 10:49:02.654321', _UCS2'1997-10-11 03:45:04.34', _UCS2'1999-01-01 15:29:42.321', _UCS2'1998-12-23 10:49:02.654321')", SQL_NTS);
> retcode = SQLExecDirect(hstmt, (SQLCHAR*)"SELECT * FROM SQLTOTIMESTAMP", SQL_NTS);
> for (int i = 0; i < 9; i++)
> {
> retcode = SQLBindCol(hstmt, i+1, SQL_C_TIMESTAMP, &CTimestampOutput[i], 0, &olen);
> }
> retcode = SQLFetch(hstmt); //<<============ SQLFetch will change value of buf1 here.
> printf("%s,%s\n", buf1, buf2);
> return;
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)