[
https://issues.apache.org/jira/browse/TRAFODION-837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14639793#comment-14639793
]
RuoYu Zuo commented on TRAFODION-837:
-------------------------------------
This has been fixed long time ago, "UPSERT" supporting in ODBC is working for a
while. The launchpad status shows the fix is released.
> LP Bug: 1404038 - ODBC upsert not working with arrays.
> ------------------------------------------------------
>
> Key: TRAFODION-837
> URL: https://issues.apache.org/jira/browse/TRAFODION-837
> Project: Apache Trafodion
> Issue Type: Bug
> Components: client-odbc-linux
> Reporter: Guy Groulx
> Assignee: RuoYu Zuo
> Priority: Critical
> Fix For: 1.0 (pre-incubation)
>
>
> Have an C program that uses ODBC to perform various operations.
> Below: Test 1 is a unique insert. Test 6 is an insert using ODBC arrays.
> R indicates row arrays, C indicates column arrays.
> NC indicates to use UPSERT instead of INSERT.
> UL indicates to use USING LOAD.
> /home/squser2/guy/ODBCAtomics> ./ODBCatomics SpinelTraf user pass TBL500 500
> 1 N 500 30 NC UL
> Loops: 9500 for 30.883 seconds for test IUSN0500.
> -- Loops: 9500 for 30.883 seconds for for test IUSN0500.
> /home/squser2/guy/ODBCAtomics> ./ODBCatomics SpinelTraf user pass TBL500 500
> 1 N -500 30 NC UL
> Loops: 9500 for 30.808 seconds for test IUSN0500.
> -- Loops: 9500 for 30.808 seconds for for test IUSN0500.
> /home/squser2/guy/ODBCAtomics> ./ODBCatomics SpinelTraf user pass TBL500 500
> 6 R 500 30
> Loops: 18000 for 29.913 seconds for test IRSN0500.
> -- Loops: 18000 for 29.913 seconds for for test IRSN0500.
> /home/squser2/guy/ODBCAtomics> ./ODBCatomics SpinelTraf user pass TBL500 500
> 6 C 500 30
> Loops: 15000 for 29.879 seconds for test ICSN0500.
> -- Loops: 15000 for 29.879 seconds for for test ICSN0500.
> /home/squser2/guy/ODBCAtomics> ./ODBCatomics SpinelTraf user pass TBL500 500
> 6 C -500 30 UL
> Loops: 16500 for 30.251 seconds for test ICSN0500.
> -- Loops: 16500 for 30.251 seconds for for test ICSN0500.
> /home/squser2/guy/ODBCAtomics> ./ODBCatomics SpinelTraf user pass TBL500 500
> 6 R -500 30 UL
> Loops: 18000 for 29.939 seconds for test IRSN0500.
> -- Loops: 18000 for 29.939 seconds for for test IRSN0500.
> /home/squser2/guy/ODBCAtomics> ./ODBCatomics SpinelTraf squser2 redhat06
> TBL500 500 6 R -500 30 UL NC
> Segmentation fault (core dumped)
> Above is showing that UPSERTS works with single inserts but fails using
> arrays.
> /home/squser2/guy/ODBCAtomics> ls /local/cores/$UID
> core.1418942238.spinel-hn1.16244.ODBCatomics
> core.1418942596.spinel-hn1.26295.ODBCatomics
> /home/squser2/guy/ODBCAtomics>
> Core was generated by `./ODBCatomics SpinelTraf user pass TBL500 500 6 R -500
> 30 UL NC'.
> Program terminated with signal 11, Segmentation fault.
> #0 0x00007ffff61d6857 in memcpy () from /lib64/libc.so.6
> Missing separate debuginfos, use: debuginfo-install
> glibc-2.12-1.107.el6.x86_64 libgcc-4.4.6-4.el6.x86_64
> libstdc++-4.4.6-4.el6.x86_64 nss-pam-ldapd-0.7.5-14.el6_2.1.x86_64
> zlib-1.2.3-29.el6.x86_64
> (gdb) bt
> #0 0x00007ffff61d6857 in memcpy () from /lib64/libc.so.6
> #1 0x00007ffff789fd19 in odbc_SQLDrvr_Execute_pst_ () from
> /home/squser2/guy/ODBCAtomics/odbc/lib64/libtrafodbc_l64.so
> #2 0x00007ffff78dc722 in SQLEXECUTE_ () from
> /home/squser2/guy/ODBCAtomics/odbc/lib64/libtrafodbc_l64.so
> #3 0x00007ffff78d741c in ThreadControlProc(void*) () from
> /home/squser2/guy/ODBCAtomics/odbc/lib64/libtrafodbc_l64.so
> #4 0x00007ffff78c235c in CStmt::SendExecute(int) () from
> /home/squser2/guy/ODBCAtomics/odbc/lib64/libtrafodbc_l64.so
> #5 0x00007ffff78c24ba in CStmt::Execute() () from
> /home/squser2/guy/ODBCAtomics/odbc/lib64/libtrafodbc_l64.so
> #6 0x00007ffff78e79fe in ODBC::Execute(void*) () from
> /home/squser2/guy/ODBCAtomics/odbc/lib64/libtrafodbc_l64.so
> #7 0x00007ffff78e4762 in NeoExecute(void*) () from
> /home/squser2/guy/ODBCAtomics/odbc/lib64/libtrafodbc_l64.so
> #8 0x00007ffff792bf38 in SQLExecute () from
> /home/squser2/guy/ODBCAtomics/odbc/lib64/libtrafodbc_l64.so
> #9 0x00000000004048d4 in insert_with_rowsets (wantRandom=0) at
> ODBCatomics.c:1090
> #10 0x000000000040daa8 in main (argc=12, argv=0x7fffffff85c8) at
> ODBCatomics.c:3784
> (gdb)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)