Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1854

SYSCS_COMPRESS_TABLE corrupts table with a single column which is both a primary key and a foreign key

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.1.3.1
    • Fix Version/s: 10.1.3.3, 10.2.1.6, 10.3.1.4
    • Component/s: SQL
    • Labels:
      None
    • Environment:
      Reproduced on Linux, Win2k, and WinXP running JDK 1.4.2.x
    • Urgency:
      Normal
    • Bug behavior facts:
      Regression

      Description

      Running the following short SQL script from ij will cause an error "ERROR XSAI2: The conglomerate (817) requested does not exist.". It appears that the SYSCS_COMPRESS_TABLE function corrupts tables that have a single column which is both a primary key and a foreign key.

      connect 'jdbc:derby:/testdb;create=true';

      CREATE TABLE users (
      user_id INT NOT NULL GENERATED BY DEFAULT AS IDENTITY,
      user_login VARCHAR(255) NOT NULL,
      PRIMARY KEY (user_id));

      CREATE TABLE admins (
      user_id INT NOT NULL,
      PRIMARY KEY (user_id),
      CONSTRAINT admin_uid_fk FOREIGN KEY (user_id) REFERENCES users (user_id));

      INSERT INTO users (user_login) VALUES('TEST1');
      INSERT INTO admins VALUES (VALUES IDENTITY_VAL_LOCAL());

      CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE('APP', 'ADMINS', 0);

      SELECT * from admins;

        Attachments

        1. derby-1854_v1.diff
          12 kB
          Suresh Thalamati
        2. derby-1854.diff
          7 kB
          Suresh Thalamati
        3. derby-1854-andrew-10.1.diff
          7 kB
          Samuel Andrew McIntyre

          Issue Links

            Activity

              People

              • Assignee:
                tsuresh Suresh Thalamati
                Reporter:
                chadloder Chad Loder
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: