You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "David Wayne Birdsall (JIRA)" <ji...@apache.org> on 2017/10/03 20:37:00 UTC

[jira] [Updated] (TRAFODION-2762) UPDATE STATS fails when creating sample table with nullable key

     [ https://issues.apache.org/jira/browse/TRAFODION-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Wayne Birdsall updated TRAFODION-2762:
--------------------------------------------
    Description: 
Trafodion contains an experimental feature that optionally allows one to create a table with a nullable primary key. That is, NULL values can be used in the primary key. For purposes of uniqueness, NULL is treated like any other value.

One can turn on this feature via CQD ALLOW_NULLABLE_UNIQUE_KEY_CONSTRAINT 'ON'.

However, if one creates a table with a nullable primary key, then later in another session without this CQD attempts to do UPDATE STATISTICS where a sample table is created, UPDATE STATISTICS will fail. For example:

update statistics for table Traf2762 on every column sample;

*** ERROR[9214] Object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_1505757284_535476 could not be created.
*** ERROR[1135] Clustering key column inputuid must be assigned a NOT NULL NOT DROPPABLE constraint.
*** ERROR[8839] Transaction was aborted.
*** ERROR[9201] Unable to DROP object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_15057572 84_535476. 
*** ERROR[1389] Object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_1505757284_535476 does not exist in Trafodion.
*** ERROR[8839] Transaction was aborted.

Note: This example assumes that Traf2762 is a large enough table that a sample table is required by UPDATE STATISTICS.

A more reliable way to reproduce the error (which does not depend on table size) is "update statistics for table Traf2762 create sample random 10 percent".

  was:
Trafodion contains an experimental feature that optionally allows one to create a table with a nullable primary key. That is, NULL values can be used in the primary key. For purposes of uniqueness, NULL is treated like any other value.

One can turn on this feature via CQD ALLOW_NULLABLE_UNIQUE_KEY_CONSTRAINT 'ON'.

However, if one creates a table with a nullable primary key, then later in another session without this CQD attempts to do UPDATE STATISTICS where a sample table is created, UPDATE STATISTICS will fail. For example:

update statistics for table "InputErrors_10_TestClientData_10" on every column sampl e;

*** ERROR[9214] Object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_1505757284_535476 could not be created.
*** ERROR[1135] Clustering key column inputuid must be assigned a NOT NULL NOT DROPPABLE constraint.
*** ERROR[8839] Transaction was aborted.
*** ERROR[9201] Unable to DROP object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_15057572 84_535476. 
*** ERROR[1389] Object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_1505757284_535476 does not exist in Trafodion.
*** ERROR[8839] Transaction was aborted.


> UPDATE STATS fails when creating sample table with nullable key
> ---------------------------------------------------------------
>
>                 Key: TRAFODION-2762
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2762
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.3-incubating
>         Environment: All
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>            Priority: Minor
>
> Trafodion contains an experimental feature that optionally allows one to create a table with a nullable primary key. That is, NULL values can be used in the primary key. For purposes of uniqueness, NULL is treated like any other value.
> One can turn on this feature via CQD ALLOW_NULLABLE_UNIQUE_KEY_CONSTRAINT 'ON'.
> However, if one creates a table with a nullable primary key, then later in another session without this CQD attempts to do UPDATE STATISTICS where a sample table is created, UPDATE STATISTICS will fail. For example:
> update statistics for table Traf2762 on every column sample;
> *** ERROR[9214] Object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_1505757284_535476 could not be created.
> *** ERROR[1135] Clustering key column inputuid must be assigned a NOT NULL NOT DROPPABLE constraint.
> *** ERROR[8839] Transaction was aborted.
> *** ERROR[9201] Unable to DROP object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_15057572 84_535476. 
> *** ERROR[1389] Object TRAFODION.SEABASE.TRAF_SAMPLE_05267662795492559847_1505757284_535476 does not exist in Trafodion.
> *** ERROR[8839] Transaction was aborted.
> Note: This example assumes that Traf2762 is a large enough table that a sample table is required by UPDATE STATISTICS.
> A more reliable way to reproduce the error (which does not depend on table size) is "update statistics for table Traf2762 create sample random 10 percent".



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)