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

LP Bug: 1457207 - Create table and constraint using the same name returns error 1043

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • sql-exe
    • None

    Description

      Create a table with a constraint that has the same name as the table itself now returns a perplexing 1043 error complaining that the constraint already exists. This is a regression introduced sometime between the v0513 build and the v0519 build. It had been working fine until the v0513 build where SQL tests were last run.

      This is seen on the v0513 build.

      --------------------------------------------------------------

      Here is the entire script to reproduce it:

      create schema mytest;
      set schema mytest;
      create table t1 (c1 int , c2 int constraint t1 check (c2 > 10));
      drop schema mytest cascade;

      --------------------------------------------------------------

      Here is the execution output:

      >>create schema mytest;

      — SQL operation complete.
      >>set schema mytest;

      — SQL operation complete.
      >>create table t1 (c1 int , c2 int constraint t1 check (c2 > 10));

          • ERROR[1043] Constraint TRAFODION.MYTEST.T1 already exists.
          • ERROR[1029] Object TRAFODION.MYTEST.T1 could not be created.

      — SQL operation failed with errors.
      >>drop schema mytest cascade;

      — SQL operation complete.

      Attachments

        Activity

          People

            anoopsharma Anoop Sharma
            WTsai Weishiun Tsai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: