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

Atanu Mishra commented on TRAFODION-229:
----------------------------------------

Anoop Sharma (anoop-sharma) on 2014-05-05
Changed in trafodion:
status: In Progress → Fix Committed
Weishiun Tsai (wei-shiun-tsai) wrote on 2014-05-09:     #1
Verified on the datalake v40174 build. This problem has been fixed:

>>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.
>>
>>create index num_idx on T3(I);

--- SQL operation complete.
>>
>>insert into T3 values(2, 1,1,1);

--- 1 row(s) inserted.
>>
>>drop table T3 cascade;

--- SQL operation complete.
>>
>>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.
>>
>>create index num_idx on T3(I);

--- SQL operation complete.
>>
>>insert into T3 values(2, 1,1,1);

--- 1 row(s) inserted.
>> insert into T3 values(4, 2,2,1);

--- 1 row(s) inserted.

Changed in trafodion:
status: Fix Committed → Fix Released


> 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
>            Assignee: Anoop Sharma
>            Priority: Critical
>
> 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