Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
2.1-incubating
-
None
-
None
-
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.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.
Description
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',
,
{ 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;
}