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/08/18 10:16:00 UTC

[jira] [Commented] (TRAFODION-2721) When setting max property , copy data from mysql to trafodion failed

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

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

GitHub user SuJinpei opened a pull request:

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

    [TRAFODION-2721] When setting max property , copy data from mysql to trafodion failed

    root cause: logic error when trying to limit max rows to be copied.  AlreadyLoadRows is actually not already loaded Rows but already fetched rows. lf statement in Oloadbuff may cause less insertion. It 's better to limit max rows to be copied at fetching data.

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

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

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

    https://github.com/apache/incubator-trafodion/pull/1210.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 #1210
    
----
commit 4275d781a4ba0a937aa35ea79287935cb11f4903
Author: SuJinpei <87...@qq.com>
Date:   2017-08-18T09:48:32Z

    fix TRAFODION-2721

----


> When setting max property , copy data from mysql to trafodion failed
> --------------------------------------------------------------------
>
>                 Key: TRAFODION-2721
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2721
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: db-utility-odb
>    Affects Versions: 2.2-incubating
>            Reporter: 苏锦佩
>             Fix For: 2.3-incubating
>
>
> When I run odb statement with max property On EsgynDB2.3 and the max value is less than actual copy records, I found that copying data from mysql to trafodion failed. 
> This is Error Log. You can reproduce it.
> ----------------------------------------
> Usecase : mysql copy with pwhere and commit=auto:rows=5000:max=3
> Command : odb64luo -u odb:trafodion -p odb:traf123 -d mysql:traf -cp src=odb_copy_customer10:tgt=TRAFODION.ODB_COPY.mysql_copy_customer10:pwhere="ID>5":max=3:commit=auto:rows=5000:loadcmd=UL 
> -v
> Result : failed
> During : 2s
> Details :
> Connected to MySQL
> odb [2017-08-02 13:57:19]: starting ODBC connection(s)... 0 >1 >2
> Connected to Trafodion
> [0] odb [Ocopy(10248)] - SOURCE statement: SELECT * FROM ODB_COPY_CUSTOMER10 WHERE ID>5 
> [0] odb [Ocopy(10596)] - TARGET statement: UPSERT USING LOAD INTO TRAFODION.ODB_COPY.mysql_copy_customer10 VALUES (?,?)
> [1] 0 records copied [commit]
> odb: thread 2 closing connection...
> odb: thread 1 closing connection...
> [0] odb version 1.1.0 Copy statistics:
>         [0] Source: ODB_COPY_CUSTOMER10
>         [0] Target: TRAFODION.ODB_COPY.mysql_copy_customer10
>         [0] Total number of columns: 2
>         [0] ODBC row size: 140 B (data) + 16 B (len ind)
>         [0] Rowset size: 3
>         [0] Rowset buffer size: 0.46 KiB
>         [0] Pre-copy time: 2.108 s (00:00:02.108)
>         [0] Copy time: 0.001 s (00:00:00.001)
>         [0] Total records copied: 0 (0.000 krec/s)
>         [0] Copy throughput (ODBC): 0.000 MiB/s (0.000 GiB/h)
>                 [0] Total/Wait cycles: 1/0
>                         [0>1] 0 records copied in 0.001 (00:00:00.001 s)
>                         [0>2] 0 records copied in 0.001 (00:00:00.001 s)
> odb: thread 0 closing connection...
> Error in my_thread_global_end(): 1 threads didn't exit
> odb: thread 0 is ending...
> odb: thread 1 is ending...
> odb: thread 2 is ending...
> odb [2017-08-02 13:57:22]: exiting. Session Elapsed time 2.122 seconds (00:00:02.122)
> ----------------------------------------
> Create mysql table statement.
> CREATE TABLE `odb_copy_customer10` (
>   `id` int(11) DEFAULT NULL,
>   `name` varchar(32) DEFAULT NULL
> );



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