[ 
https://issues.apache.org/jira/browse/TRAFODION-229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Atanu Mishra closed TRAFODION-229.
----------------------------------
       Resolution: Fixed
         Assignee:     (was: Anoop Sharma)
    Fix Version/s: 0.8 (pre-incubation)

> LP Bug: 1308695 - Indexes caused insert to assert in 
> ../optimizer/BindRelExpr.cpp
> ---------------------------------------------------------------------------------
>
>                 Key: TRAFODION-229
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-229
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>            Reporter: Weishiun Tsai
>            Priority: Critical
>             Fix For: 0.8 (pre-incubation)
>
>
> When a table is dropped and recreated with the same name, if indexes were 
> created for the tables, the insert on the second table returns an internal 
> error:
> *** ERROR[2006] Internal error: assertion failure (tgtcols.entries() == 
> baseColRefs().entries()) in file ../optimizer/BindRelExpr.cpp at line 11964. 
> [2014-04-16 11:27:30]
> This is seen on the beta v39140 build, both on a workstation, and on the 
> cluster installation.
> Here is the script to reproduce this problem.  Following it are 2 execution 
> outputs.  The 1st output shows the errors.  The 2nd output shows that the 
> insert runs fine if the indexes were not created.
> ==================================================================================================
> Create table T3(F int default null,
> G smallint default null,
> H largeint not null not droppable primary key,
> I numeric(9,3) default null);
> create index num_idx on T3(I);
> insert into T3 values(2, 1,1,1);
> drop table T3 cascade;
> Create table T3(F int not null not droppable ,
> G smallint not null not droppable ,
> H largeint not null not droppable ,
> I numeric(9,3) default null,
> primary key (F,G,H) );
> create index num_idx on T3(I);
> insert into T3 values(2, 1,1,1);
> insert into T3 values(4, 2,2,1);
> ==================================================================================================
> SQL>Create table T3(F int default null,
> +>G smallint default null,
> +>H largeint not null not droppable primary key,
> +>I numeric(9,3) default null);
> --- SQL operation complete.
> SQL>create index num_idx on T3(I);
> --- SQL operation complete.
> SQL>insert into T3 values(2, 1,1,1);
> --- 1 row(s) inserted.
> SQL>drop table T3 cascade;
> --- SQL operation complete.
> SQL>Create table T3(F int not null not droppable ,
> +>G smallint not null not droppable ,
> +>H largeint not null not droppable ,
> +>I numeric(9,3) default null,
> +>primary key (F,G,H) );
> --- SQL operation complete.
> SQL>create index num_idx on T3(I);
> --- SQL operation complete.
> SQL>insert into T3 values(2, 1,1,1);
> *** ERROR[2006] Internal error: assertion failure (tgtcols.entries() == 
> baseColRefs().entries()) in file ../optimizer/BindRelExpr.cpp at line 11964. 
> [2014-04-16 11:27:30]
> SQL>insert into T3 values(4, 2,2,1);
> *** ERROR[2006] Internal error: assertion failure (tgtcols.entries() == 
> baseColRefs().entries()) in file ../optimizer/BindRelExpr.cpp at line 11964. 
> [2014-04-16 11:27:30]
> ==================================================================================================
> SQL>Create table T3(F int default null,
> +>G smallint default null,
> +>H largeint not null not droppable primary key,
> +>I numeric(9,3) default null);
> --- SQL operation complete.
> SQL>-- create index num_idx on T3(I);
> SQL>insert into T3 values(2, 1,1,1);
> --- 1 row(s) inserted.
> SQL>drop table T3 cascade;
> --- SQL operation complete.
> SQL>Create table T3(F int not null not droppable ,
> +>G smallint not null not droppable ,
> +>H largeint not null not droppable ,
> +>I numeric(9,3) default null,
> +>primary key (F,G,H) );
> --- SQL operation complete.
> SQL>-- create index num_idx on T3(I);
> SQL>insert into T3 values(2, 1,1,1);
> --- 1 row(s) inserted.
> SQL>insert into T3 values(4, 2,2,1);
> --- 1 row(s) inserted.



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

Reply via email to