You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Atanu Mishra (JIRA)" <ji...@apache.org> on 2015/08/14 03:15:45 UTC
[jira] [Commented] (TRAFODION-194) LP Bug: 1289638 - CREATE
TABLE...LOAD IF EXISTS... returns table already exists error 1390
[ https://issues.apache.org/jira/browse/TRAFODION-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14696286#comment-14696286 ]
Atanu Mishra commented on TRAFODION-194:
----------------------------------------
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: #3
Verified on the datalake v40174 build. This problem has been fixed:
>>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;
--- 3 row(s) inserted.
Changed in trafodion:
status: Fix Committed → Fix Released
> 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
> Fix For: 1.0 (pre-incubation)
>
>
> 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)