Error for Index in combination with Invalid Primary Key

Details

Detail name Value
Changelog Number 6648
Type Bug
Status Resolved
Affected Versions Exasol 6.1.0, Exasol 6.1.beta1, Exasol 6.1.rc1
Fix Versions Exasol 6.1.0
Resolution Date 2018-08-23

Background

If there exists an index for column C1 in table T1, it is possible that
the use of WITH INVALID PRIMARY KEY(C1) leads to an internal server error.

Example

create or replace table T1 (
    C1 decimal(18,0)
    , C2 decimal(23,0)
);
insert into T1 values (1, 1);

enforce index on T1 (C1);

select C2 with invalid primary key (C1)
from T1;

Workaround

Add a WITH clause that pre-materializes the selection, preventing access to the index:

WITH subs as (
    select C1, C2
    from T1
    order by false
)
select C2 with invalid primary key (C1)
from subs;