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 00:37:47 UTC

[jira] [Commented] (TRAFODION-311) LP Bug: 1323906 - allow create schema although drop schema failed

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

Atanu Mishra commented on TRAFODION-311:
----------------------------------------

ying-wen ku (ying-wen-ku) wrote on 2014-06-05:	#2
Ran the test script twice. verify that table was dropped successfully.

Changed in trafodion:
status:	Fix Committed → Fix Released


> LP Bug: 1323906 - allow create schema although drop schema failed
> -----------------------------------------------------------------
>
>                 Key: TRAFODION-311
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-311
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: Apache Trafodion
>            Assignee: Anoop Sharma
>            Priority: Blocker
>
> 1) drop schema reported error 1069 schema could not be dropped
> 2) get tables showed that there were tables in schema.
> 3) but create schema reported successful.
> 4) get tables showed that there were tables in schema although schema just created.
> 5) create table failed because there were already in schema.
> SQL>set schema debug_tab002;
> --- SQL operation complete.
> SQL>get tables;
> Tables in Schema TRAFODION.DEBUG_TAB002
> =======================================
>  
> DIRECTORS
> FEMALE_ACTORS
> MALE_ACTORS
> MOVIE_TITLES
> MOVIE_TITLES4
> MOVIE_TITLES5
> --- SQL operation complete.
> SQL>drop schema debug_tab002 cascade;
> *** ERROR[1069] Schema TRAFODION.DEBUG_TAB002 could not be dropped. [2014-05-27 18:47:50]
> SQL>get tables;
> Tables in Schema TRAFODION.DEBUG_TAB002
> =======================================
>  
> FEMALE_ACTORS
> MOVIE_TITLES4
> MOVIE_TITLES5
> --- SQL operation complete.
> SQL>create schema debug_tab002;
> --- SQL operation complete.
> SQL>set schema debug_tab002;
> --- SQL operation complete.
> SQL>get tables;
> Tables in Schema TRAFODION.DEBUG_TAB002
> =======================================
>  
> FEMALE_ACTORS
> MOVIE_TITLES4
> MOVIE_TITLES5
> --- SQL operation complete.
> SQL>env;
> COLSEP          " "
> HISTOPT         DEFAULT [No expansion of script files]
> IDLETIMEOUT     30 min(s) 
> LIST_COUNT      0 [All Rows]
> LOG FILE        setuplog
> LOG OPTIONS     CLEAR,CMDTEXT ON
> MARKUP          RAW
> PROMPT          SQL>
> SCHEMA          SEABASE
> SERVER          rhel-cdh1.hpl.hp.com:37800
> SQLTERMINATOR   ;
> STATISTICS      OFF
> TIME            OFF
> TIMING          OFF
> USER            trafodion
> SQL>version;
> Trafodion Platform              : Release 0.7.0 
> Trafodion Connectivity Services : Version 1.0.0 Release 0.7.0 (Build release [40963], date 24May14)
> Trafodion JDBC Type 4 Driver    : Traf_JDBC_Type4_Build_40954
> Trafodion Command Interface     : TrafCI_Build_40954
> SQL>show remoteprocess;
> REMOTE PROCESS \rhel-cdh2.hpl.hp.com:1.$Z010KXD
> --  test script
> log setuplog clear;
> env;
> version;
> show remoteprocess;
> set schema debug_tab002;
> get tables;
> drop schema debug_tab002 cascade;
> get tables;
> create schema debug_tab002;
> set schema debug_tab002;
> get tables;
> create table Female_actors (
> f_no          int not null not droppable,
> f_name        varchar(30) not null,
> f_realname    varchar(50) default null,
> f_birthday    date  constraint md1 check (f_birthday > date '1900-01-01'),
> primary key (f_no)
> )
> ;
> create table Male_actors (
> m_no          int not null not droppable unique,
> m_name        varchar(30) not null,
> m_realname    varchar(50) default null,
> m_birthday    date  constraint md2 check (m_birthday > date '1900-01-01')
> ) no partition;
> create table Directors (
> d_no          int not null not droppable,
> d_name        varchar(30) not null,
> "d_specialty" varchar(15) not null unique,
> primary key (d_no),
> constraint td1 check ("d_specialty" <> 'Music Video'),
> unique (d_no, "d_specialty")
> );
> get tables;
> Create table Movie_titles (
> mv_no          int not null not droppable,
> mv_name        varchar (40) not null,
> mv_malestar    int default NULL constraint debug_tab002.ma_fk 
>                                 references male_actors(m_no),
> mv_femalestar  int default NULL,
> mv_director    int default 0 not null,
> mv_yearmade    int check (mv_yearmade > 1901),
> mv_star_rating char(4),
> mv_movietype   varchar(15),
> primary key (mv_no),
> constraint fa_fk foreign key (mv_femalestar) 
>            references female_actors,
> constraint d_fk foreign key (mv_director, mv_movietype) 
>            references directors (d_no, "d_specialty")
> );
> get tables;
> -- #expect any *6 row(s) inserted*
> insert into directors values (0, 'No director named','Unknown')
>                             ,(1234, 'Alfred Hitchcock', 'Mystery')
>                             ,(1345, 'Clint Eastwood','Action')
>                             ,(1456, 'Fred Zinneman', 'Western')
>                             ,(1567, 'George Cukor', 'Drama')
>                             ,(1789, 'Roger Corman','Scary')
>                             ;
> -- #expect any *4 row(s) inserted*
> insert into Male_actors values 
>     (0, 'No male actor','No male actor', current_date)
>    ,(1111, 'Cary Grant','Archibald Alec Leach',date '1904-01-18')
>    ,(1222, 'Gary Cooper','Frank James Cooper', date '1901-05-07')
>    ,(1333, 'Clint Eastwood','Clinton Eastwood Jr.', date '1930-05-31')
>    ;
> -- #expect any *5 row(s) inserted*
> insert into Female_actors values 
>     (0, 'No female actor','No female actor', current_date),
>     (6111, 'Grace Kelly', 'Grace Patricia Kelly', date '1929-11-12'),
>     (6123, 'Katherine Hepburn','Katharine Houghton Hepburn', date '1907-05-12'),
>     (6124, 'Joan Crawford','Lucille Fay LeSueur', date '1904-03-23'),
>     (6125, 'Ingrid Bergman', 'Ingrid Bergman', date '1915-08-29');
> -- #expect any *6 row(s) inserted*
> insert into Movie_titles values 
> (1,'To Catch a Thief',1111, 6111, 1234, 1955, '****','Mystery'),
> (2,'High Noon',1222, 6111, 1456, 1951, '****','Western'),
> (3,'Unforgiven', 1333, 0, 1345, 1990, '***', 'Action'),
> (4,'The Women', 0, 6124, 1567, 1939, '****', 'Drama'),
> (5,'The Philadelphia Story',1111, 6123,1567, 1940, '****','Drama'),
> (6,'Notorious', 1111, 6125, 1234, 1946, '****','Mystery');
> select mv_name, m_name, f_name, d_name, mv_star_rating from
> movie_titles, male_actors, female_actors, directors
> where mv_malestar = m_no and
>       mv_femalestar = f_no and
>       mv_director = d_no
>       order by d_name, f_name;
> log off;
> exit;



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