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 2015/09/17 02:31:46 UTC

[jira] [Commented] (TRAFODION-1456) Merge statement returns error 3241 when there is unique index in the table

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

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

GitHub user sureshsubbiah opened a pull request:

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

    [TRAFODION-1456] Merge statement returns error 3241 when there is unique index in the table [TRAFODION-1493] Logs TMDUF does not scan udr logs Also enabled merge with views and merge with RI constraint.

    

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

    $ git pull https://github.com/sureshsubbiah/incubator-trafodion jira_bugs2

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

    https://github.com/apache/incubator-trafodion/pull/83.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 #83
    
----
commit 4b2cfc8ac5160a955da5a663df044ab8c48ec44e
Author: Suresh Subbiah <su...@apache.org>
Date:   2015-09-16T23:27:46Z

    [TRAFODION-1456] Merge statement returns error 3241 when there is unique index in the table
    [TRAFODION-1493] Logs TMDUF does not scan udr logs
    Also enabled merge with views and merge with RI constraint.

commit 7de5f8641389a051b996a7d00bb9d06bd580c87a
Author: Suresh Subbiah <su...@apache.org>
Date:   2015-09-17T00:24:04Z

    Rebase changes.
    Removed DETAILED_STATISTICS cqd setting for ustat.

----


> Merge statement returns error 3241 when there is unique index in the table
> --------------------------------------------------------------------------
>
>                 Key: TRAFODION-1456
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1456
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-general
>    Affects Versions: 2.0-incubating
>         Environment: Linux
>            Reporter: Weishiun Tsai
>
> A merge statement now returns error 3241 if the table contains a unique index.  This is a regression compared to previous versions.  It is seen on the v0807 build.
> --------------------------------------------------------------
> Here is the entire script to reproduce it:
> create schema mytest;
> set schema mytest;
> create table mytable (
> c1 int unique,
> c2 char(10),
> c3 int not null not droppable primary key);
> insert into mytable values (1,'A',1),(2,'B',2),(3,'C',3);
> merge into mytable on c3=1 when matched then update set c2='D';
> drop schema mytest cascade;
> --------------------------------------------------------------
> Here is the execution output and the 3241 error returned:
> >>create schema mytest;
>  
> --- SQL operation complete.
> >>set schema mytest;
>  
> --- SQL operation complete.
> >>create table mytable (
> +>c1 int unique,
> +>c2 char(10),
> +>c3 int not null not droppable primary key);
>  
> --- SQL operation complete.
> >>insert into mytable values (1,'A',1),(2,'B',2),(3,'C',3);
>  
> --- 3 row(s) inserted.
> >>merge into mytable on c3=1 when matched then update set c2='D';
>  
> *** ERROR[3241] This MERGE statement is not supported. Reason:  unique indexes not allowed.
>  
> *** ERROR[8822] The statement was not prepared.
>  
> >>drop schema mytest cascade;
>  
> --- SQL operation complete.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)