Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-309

LP Bug: 1323878 - can't find table after add contraint primary key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 0.8 (pre-incubation)
    • None
    • None

    Description

      1) add constraint reportly complete without error
      2) showddl didn't display add constraint
      3) can't find table afterward. can't drop table because of that.

      SQL>get tables;

      Tables in Schema TRAFODION.DEBUG_DDL04
      ======================================

      T1A011

      — SQL operation complete.

      SQL>alter table t1a011 add constraint ca011 primary key (ubin0_uniq ) droppable;

      — SQL operation complete.

      SQL>get tables;

      — SQL operation complete.

      SQL>showddl t1a011;

      CREATE TABLE TRAFODION.DEBUG_DDL04.T1A011
      (
      SBIN0_10 NUMERIC(18, 0) NO DEFAULT NOT NULL NOT
      DROPPABLE
      , CHAR0_2 CHAR(8) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
      , UDEC0_UNIQ DECIMAL(9, 0) UNSIGNED NO DEFAULT NOT NULL
      NOT DROPPABLE
      , UBIN0_UNIQ NUMERIC(9, 0) UNSIGNED NO DEFAULT NOT NULL
      NOT DROPPABLE
      , SDEC0_500 DECIMAL(9, 0) NO DEFAULT NOT NULL NOT
      DROPPABLE
      , VARCHAR0_10 VARCHAR(16) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
      , VARCHAR1_20 VARCHAR(8) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
      , SBIN1_5000 NUMERIC(4, 0) NO DEFAULT NOT NULL NOT
      DROPPABLE
      , SDEC1_4 DECIMAL(18, 0) NO DEFAULT NOT NULL NOT
      DROPPABLE
      , CHAR1_4 CHAR(8) CHARACTER SET ISO88591 COLLATE
      DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
      )
      STORE BY (UDEC0_UNIQ ASC)
      ;

      — SQL operation complete.

      SQL>-- fail to drop table

      SQL>drop table t1a011;

          • ERROR[1389] Object TRAFODION.DEBUG_DDL04.T1A011 does not exist in Trafodion. [2014-05-27 16:15:31]

      SQL>drop table t1a011 cascade;

          • ERROR[1389] Object TRAFODION.DEBUG_DDL04.T1A011 does not exist in Trafodion. [2014-05-27 16:15:31]

      – test script:
      og a02log clear;
      – #testcase a01 altered table -add constraint
      create schema TRAFODION.debug_ddl04;
      set schema TRAFODION.debug_ddl04;
      Create Table t1a011
      (
      sbin0_10 Numeric(18) signed not null,
      char0_2 Character(8) not null,
      udec0_uniq Decimal(9) unsigned not null,
      ubin0_uniq PIC 9(9) COMP not null,
      sdec0_500 PIC S9(9) not null,
      varchar0_10 varchar(16) not null,
      varchar1_20 varchar(8) not null,
      sbin1_5000 Numeric(4) signed not null,
      sdec1_4 Decimal(18) signed not null,
      char1_4 Character(8) not null

      )
      store by (udec0_uniq)
      ;
      get tables;
      alter table t1a011 add constraint ca011 primary key (ubin0_uniq ) droppable;
      get tables;
      showddl t1a011;
      – can't find table
      drop table t1a011 cascade;
      get tables;
      alter table t1a011 drop constraint ca011;
      select * from t1a011;
      showddl t1a011;
      drop table t1a011;
      drop table t1a011 cascade;
      log off;
      exit;

      Attachments

        Activity

          People

            Unassigned Unassigned
            apachetrafodion Apache Trafodion
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: