You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:15:10 UTC

[jira] [Created] (TRAFODION-194) LP Bug: 1289638 - CREATE TABLE...LOAD IF EXISTS... returns table already exists error 1390

Alice Chen created TRAFODION-194:
------------------------------------

             Summary: LP Bug: 1289638 - CREATE TABLE...LOAD IF EXISTS... returns table already exists error 1390
                 Key: TRAFODION-194
                 URL: https://issues.apache.org/jira/browse/TRAFODION-194
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-exe
            Reporter: Weishiun Tsai
            Assignee: Anoop Sharma
            Priority: Critical


Trafodion SQL Reference Manual describes LOAD IF EXISTS as supported in the CREATE TABLE statement.  This statement should load the data if an empty table already exists.  But it returns error 1390 instead, as shown in the following output.  It does not make any difference if this statement is in a user-defined transaction.  For comparison reason, the second part of the output shows that the same statement works fine on a SQ system.

This is seen on the datalake build trafodion-ci-project-datalake_64_1-20140303-v38027_release.tar.

-------------------------------------------------------------------------
In Trafodion 

>>create table t1 (a int not null primary key, b int, c int);

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

--- 3 row(s) inserted.
>>create table t2 primary key (a) no load as select * from t1;

--- 0 row(s) inserted.
>>create table t2 primary key (a) load if exists as select * from t1;

*** ERROR[1390] Object TRAFODION.SEABASE.T2 already exists in Trafodion.

*** ERROR[8811] Trying to close a statement that is either not in the open state or has not reached EOF.

--- 0 row(s) inserted.
>>begin work;

--- SQL operation complete.
>>create table t2 primary key (a) load if exists as select * from t1;

*** ERROR[1390] Object TRAFODION.SEABASE.T2 already exists in Trafodion.

*** ERROR[8811] Trying to close a statement that is either not in the open state or has not reached EOF.

--- 0 row(s) inserted.

-------------------------------------------------------------------------
In SQ

>>create table t1 (a int not null not droppable primary key, b int, c int);

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

--- 3 row(s) inserted.
>>create table t2 primary key (a) no load as select * from t1;

--- 0 row(s) inserted.
>>create table t2 primary key (a) load if exists as select * from t1;

--- 3 row(s) inserted.
>>



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