You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/05 11:06:00 UTC

[jira] [Commented] (TRAFODION-2677) odb load source with src=-file is failure

    [ https://issues.apache.org/jira/browse/TRAFODION-2677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074585#comment-16074585 ] 

ASF GitHub Bot commented on TRAFODION-2677:
-------------------------------------------

GitHub user SuJinpei opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1164

    [TRAFODION-2677] odb load source with src=-file is failure

    root cause: each thread try to call splitcso to get Catalog/Schema/Table from the same tgt buffer, but splitcso will modify tgt buffer, so only one thread can get the correct result.
    fix way: 1. Catalog/Schema/Table can be determined when creating etab,  so move it forward.
                 2. etab[*].tgt is used elsewhere and is assumed not split, so make a copy of tgt.
                 3. add globalPointers to save pointers to buffers which may be shared by many thread and length determined at run time.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SuJinpei/incubator-trafodion TRAFODION-2677

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1164.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1164
    
----
commit ee497fe94d5e6e7ca24657288fbc62f47a9e4e17
Author: SuJinpei <87...@qq.com>
Date:   2017-07-05T01:52:44Z

    [TRAFODION-2677] odb load source with src=-file is falure

commit ecc76bd45282008d7ea45e4bea4090a6d3616bcd
Author: SuJinpei <87...@qq.com>
Date:   2017-07-05T10:10:32Z

    fix TRAFODION-2677

----


> odb load source with src=-file is failure
> -----------------------------------------
>
>                 Key: TRAFODION-2677
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2677
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: db-utility-odb
>            Reporter: 苏锦佩
>             Fix For: 2.3-incubating
>
>
> I'm using the statement "odb64luo -u trafuser -p trafpasswd -d trafdb -l src=-odb_load_file:tgt=trafodion.odb_test.sp_person3:max=10000:rows=5000:parallel=1:loadcmd=UL:fs=\!:sq=\"" to load some files into a trafodion table,then I see the error display as follow.
> ERROR MESSAGES
> Connected to Trafodion
> Connected to Trafodion
> Connected to Trafodion
> [4] odb(13004) [2017-06-08 01:16:30] - [Trafodion ODBC Driver][Trafodion Database] SQL ERROR:*** ERROR[8822] The statement was not prepared. [2017-06-08 01:16:30] (State: X08MU Native Err: -8822)
> [4] odb(13004) [2017-06-08 01:16:30] - [Trafodion ODBC Driver][Trafodion Database] SQL ERROR:*** ERROR[4082] Object TRAFODION.QA.TRAFODION does not exist or is inaccessible. [2017-06-08 01:16:30] (State: 42000 Native Err: -4082)
> odb [Oload(6388)] - Error analyzing target table (null).(null).TRAFODION
> odb: thread 4 closing connection...
> odb: thread 4 is ending...
> odb: thread 5 closing connection...
> [2] odb(13004) [2017-06-08 01:16:30] - [Trafodion ODBC Driver][Trafodion Database] SQL ERROR:*** ERROR[8822] The statement was not prepared. [2017-06-08 01:16:30] (State: X08MU Native Err: -8822)
> [2] odb(13004) [2017-06-08 01:16:30] - [Trafodion ODBC Driver][Trafodion Database] SQL ERROR:*** ERROR[4082] Object TRAFODION.QA.TRAFODION does not exist or is inaccessible. [2017-06-08 01:16:30] (State: 42000 Native Err: -4082)
> odb [Oload(6388)] - Error analyzing target table (null).(null).TRAFODION
> odb: thread 2 closing connection...
> odb: thread 2 is ending...
> odb: thread 3 closing connection...
> odb: thread 5 is ending...
> odb: thread 3 is ending...
> odb [Oload(7053)] - INSERT statement:PID","FNAME","LNAME","COUNTRY","CITY","BDATE","SEX","EMAIL","SALARY","EMPL","NOTES","LOADTS") VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
> [0] odb(7150) [2017-06-08 01:16:34] - [Trafodion ODBC Driver][Trafodion Database] SQL ERROR:*** ERROR[8822] The statement was not prepared. [2017-06-08 01:16:34] (State: X08MU Native Err: -8822)
> [0] odb(7150) [2017-06-08 01:16:34] - [Trafodion ODBC Driver][Trafodion Database] SQL ERROR:*** ERROR[15005] Unmatched quote in input (unterminated string): PID","FNAME","LNAME","COUNTRY","CITY","BDATE","SEX","EMAIL","SALARY","EMPL","NOTES","LOADTS") VALUES(?,?,?,?,?,?,?,?,?,?,?,?); [2017-06-08 01:16:34] (State: 42000 Native Err: -15005)
> odb: thread 1 closing connection...
> odb: thread 0 closing connection...
> odb: thread 0 is ending...
> odb: thread 1 is ending...
> odb [2017-06-08 01:16:34]: exiting. Session Elapsed time 6.588 seconds (00:00:06.588)
> *step to reproduce:*
> 1. create trafodion table 
> CREATE TABLE TRAFODION.odb_test."SP_PERSON3" (PID BIGINT SIGNED NOT NULL,FNAME CHAR(20) NOT NULL,LNAME CHAR(20) NOT NULL,COUNTRY VARCHAR(40) NOT NULL,CITY VARCHAR(40) NOT NULL,BDATE DATE NOT NULL,SEX CHAR(1) NOT NULL,EMAIL VARCHAR(40) NOT NULL,SALARY NUMERIC(9,2) NOT NULL,EMPL VARCHAR(40) NOT NULL,NOTES VARCHAR(80),LOADTS TIMESTAMP(0),PRIMARY KEY (PID));
> 2.create directory and create three file in this directory, then input data to these files.
> example
> mkdir -p data
> touch data/test1
> touch data/test2
> touch data/test3
> data format as follow.
> 1!"Shi-Fu"!"Wu"!"Canada"!"Shanghai"!1918-06-23!"U"!"pear@gmail.edu"!304030!"Esgyn"!"aaaa"!2016-10-24 17:04:24
> 3.touch file named "odb_load_file",it contain content as follow.
> src=data/test1
> src=data/test2
> src=data/test3
> 4.execute the odb statement as follow.
> odb64luo -u trafuser -p trafpasswd -d trafdb -l src=-odb_load_file:tgt=trafodion.odb_test.sp_person3:max=10000:rows=5000:parallel=1:loadcmd=UL:fs=\!:sq=\"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)