[
https://issues.apache.org/jira/browse/TRAFODION-1602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sandhya Sundaresan closed TRAFODION-1602.
-----------------------------------------
> LOB: Using unique constraint/key on LOB should be caught at the create/alter
> table time
> ---------------------------------------------------------------------------------------
>
> Key: TRAFODION-1602
> URL: https://issues.apache.org/jira/browse/TRAFODION-1602
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-exe
> Affects Versions: 1.2-incubating
> Reporter: Sandhya Sundaresan
> Assignee: Sandhya Sundaresan
> Priority: Major
>
> Specifying a unique constraint on a LOB column is probably not supported, but
> this error is currently not being caught at the create table time. As shown
> in the following execution output. Table t1 was created and the lob column c1
> has a unique constraint. The ddl was successful. But the next insert
> statement crashed sqlci at HbaseInsert::preCodeGen().
> Using alter table to modify table t2 and add a unique constraint to the lob
> column c2 gets worse. It cored tdm_arkcmp at HbaseInsert::preCodeGen(), while
> it should have returned an error gracefully.
> control query default TRAF_BLOB_AS_VARCHAR 'OFF';
> control query default TRAF_CLOB_AS_VARCHAR 'OFF';
> create schema mytest5;
> set schema mytest5;
> create table t2 (c1 blob not null not droppable, c2 clob not null not
> droppable);
> alter table t2 add unique (c2);
> insert into table t2 values (stringtolob('column 1'), stringtolob('column
> 2'));
> drop table t2 cascade;
> drop schema mytest5 cascade;
> ---------------------
> Specifying a lob column in store by is probably not supported, but this error
> is currently not being caught at the create table time. As shown in the
> following execution output. Table t was created with the lob column c1 in
> store by. The ddl was successful. But the next insert statement returned a
> compiler internal error 2235 and a perplexing 4035 error.
> control query default TRAF_BLOB_AS_VARCHAR 'OFF';
> control query default TRAF_CLOB_AS_VARCHAR 'OFF';
> create schema mytest6;
> set schema mytest6;
> create table t (c1 blob not null not droppable, c2 clob not null not
> droppable) store by (c1);
> insert into table t values (stringtolob('column 1'), stringtolob('column 2'));
> drop table t cascade;
> drop schema mytest6 cascade;
> -----------------------
> Using LOB as primary key should be caught at the create/alter table time
> As shown in the following execution output. Table t1 was created with a lob
> column c1 as the primary key. The ddl was successful. But the next insert
> statement returned a compiler internal error 2235 and a perplexing error 4035.
> Using alter table to modify table t2 and add the lob column c2 as a primary
> key gets worse. It cored tdm_arkcmp at HbaseInsert::preCodeGen(), while it
> should have returned an error gracefully.
> control query default TRAF_BLOB_AS_VARCHAR 'OFF';
> control query default TRAF_CLOB_AS_VARCHAR 'OFF';
> create schema mytest1;
> set schema mytest1;
> create table t1 (c1 blob not null not droppable primary key, c2 clob not null
> not droppable);
> insert into table t1 values (stringtolob('column 1'), stringtolob('column
> 2'));
> drop table t1 cascade;
> drop schema mytest1 cascade;
> ----------
> e schema mytest2;
> set schema mytest2;
> create table t2 (c1 blob not null not droppable, c2 clob not null not
> droppable);
> alter table t2 add primary key (c2);
> insert into table t2 values (stringtolob('column 1'), stringtolob('column
> 2'));
> drop table t2 cascade;
> --------------------
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)