You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Suresh Subbiah (JIRA)" <ji...@apache.org> on 2015/09/17 16:43:04 UTC

[jira] [Assigned] (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:all-tabpanel ]

Suresh Subbiah reassigned TRAFODION-1456:
-----------------------------------------

    Assignee: Suresh Subbiah

> 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
>            Assignee: Suresh Subbiah
>
> 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)