Subject internal gds software consistency check (partner index description not found (17
Author Ed Dressel
FB 1.5

I have a pretty simple m/d relationship between two tables, but when I go to post a detail record, I get an GDS inconsistency check exception:

ISC ERROR MESSAGE:
internal gds software consistency check (partner index description not found (175))

Here is the DDL and for the table I am trying to insert into (except the triggers) and IB Monitor Log follows:

<-------------------------------------------------
--DDL---------------------------------------------
-------------------------------------------------->
CREATE TABLE PENDINGPLANCHANGES (
PENDINGPLANCHANGE_ID DM_INTEGER NOT NULL /* DM_INTEGER = INTEGER */,
CREATED_DATETIME DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
UPDATED_DATETIME DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
ISACTIVE DM_TF /* DM_TF = CHAR(1) CHECK(VALUE IN ('F','T')) */,
CHANGETYPE_ID DM_INTEGER /* DM_INTEGER = INTEGER */,
DESCRIP DM_MEMO /* DM_MEMO = BLOB SUB_TYPE 1 SEGMENT SIZE 100 */,
PENSIONPLAN_ID SMALLINT NOT NULL,
PENDING_DATE DM_DATETIME /* DM_DATETIME = TIMESTAMP */,
LINK DM_MEMO /* DM_MEMO = BLOB SUB_TYPE 1 SEGMENT SIZE 100 */
);




/*************************************************************/
/**** Primary Keys ****/
/*************************************************************/

ALTER TABLE PENDINGPLANCHANGES ADD CONSTRAINT PK_PENDINGPLANCHANGES PRIMARY KEY (PENDINGPLANCHANGE_ID);


/*************************************************************/
/**** Foreign Keys ****/
/*************************************************************/

ALTER TABLE PENDINGPLANCHANGES ADD CONSTRAINT FK_PENDINGPLANCHANGES_1 FOREIGN KEY (PENSIONPLAN_ID) REFERENCES PENSIONPLANS (PENSIONPLAN_ID) ON DELETE CASCADE;


/*********************************************************/
/**** Triggers ****/
/*********************************************************/


SET TERM ^ ;

CREATE OR ALTER TRIGGER PENDINGPLANCHANGES_BI0 FOR PENDINGPLANCHANGES
ACTIVE BEFORE INSERT POSITION 0
AS
begin
New.pendingplanchange_id = Gen_ID(GEN_MISC_ID, 1);
New.Created_DateTime = Current_Timestamp;
New.Updated_DateTime = Current_Timestamp;
New.IsActive = 'T';
end
^
CREATE OR ALTER TRIGGER PENDINGPLANCHANGES_BU0 FOR PENDINGPLANCHANGES
ACTIVE BEFORE UPDATE POSITION 0
AS
begin
New.Updated_DateTime = Current_Timestamp;
end
^

</------------------------------------------------
--DDL---------------------------------------------
-------------------------------------------------->


The full IB Monitor log is also below.

<-------------------------------------------------
--IB Monitor Log----------------------------------
-------------------------------------------------->

/*---
START TRANSACTION
DB HANDLE COUNT 1
TR_HANDLE = 72429544
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900

SELECT RDB$PROCEDURE_NAME
FROM RDB$PROCEDURES
ORDER BY RDB$PROCEDURE_NAME ASC

PLAN (RDB$PROCEDURES ORDER RDB$INDEX_21)

FIELDS = [ Version 1 SQLd 1 SQLn 30
RDB$PROCEDURES.RDB$PROCEDURE_NAME = <NIL> ]

SECONDS = 0.015
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900
PARAMS = [ ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900

SELECT S.RDB$FIELD_NAME
, I.RDB$RELATION_NAME
, C.RDB$CONSTRAINT_NAME
FROM RDB$RELATION_CONSTRAINTS C
, RDB$INDICES I
, RDB$INDEX_SEGMENTS S
WHERE C.RDB$CONSTRAINT_TYPE IN ( 'PRIMARY KEY', 'UNIQUE' )
AND C.RDB$RELATION_NAME = I.RDB$RELATION_NAME
AND C.RDB$INDEX_NAME = I.RDB$INDEX_NAME
AND I.RDB$INDEX_NAME = S.RDB$INDEX_NAME
ORDER BY I.RDB$RELATION_NAME ASC
, C.RDB$CONSTRAINT_NAME ASC
, S.RDB$FIELD_POSITION ASC

PLAN SORT (JOIN (C NATURAL,I INDEX (RDB$INDEX_5),S INDEX (RDB$INDEX_6)))

FIELDS = [ Version 1 SQLd 3 SQLn 30
RDB$INDEX_SEGMENTS.RDB$FIELD_NAME = <NIL>
RDB$INDICES.RDB$RELATION_NAME = <NIL>
RDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_NAME = <NIL> ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900
PARAMS = [ ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429544
STMT_HANDLE = 72429736

select PENDINGPLANCHANGE_ID, PENSIONPLAN_ID, CREATED_DATETIME,
UPDATED_DATETIME, ISACTIVE, PENDING_DATE, CHANGETYPE_ID, DESCRIP, LINK
from PENDINGPLANCHANGES
where PensionPlan_ID = ? /* PensionPlan_ID */
ORDER BY PENDING_DATE ASC
;

PLAN SORT ((PENDINGPLANCHANGES INDEX (FK_PENDINGPLANCHANGES_1)))

FIELDS = [ Version 1 SQLd 9 SQLn 30
PENDINGPLANCHANGES.PENDINGPLANCHANGE_ID = <NIL>
PENDINGPLANCHANGES.PENSIONPLAN_ID = <NIL>
PENDINGPLANCHANGES.CREATED_DATETIME = <NIL>
PENDINGPLANCHANGES.UPDATED_DATETIME = <NIL>
PENDINGPLANCHANGES.ISACTIVE = <NIL>
PENDINGPLANCHANGES.PENDING_DATE = <NIL>
PENDINGPLANCHANGES.CHANGETYPE_ID = <NIL>
PENDINGPLANCHANGES.DESCRIP = <NIL>
PENDINGPLANCHANGES.LINK = <NIL> ]

SECONDS = 0.016
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900

SELECT R.RDB$FIELD_NAME
, R.RDB$RELATION_NAME
FROM RDB$RELATION_FIELDS R
, RDB$FIELDS F
WHERE R.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME
AND F.RDB$COMPUTED_SOURCE IS NOT NULL
AND NOT R.RDB$RELATION_NAME STARTING WITH 'RDB$'
ORDER BY 1 ASC

PLAN SORT (JOIN (F NATURAL,R INDEX (RDB$INDEX_3)))

FIELDS = [ Version 1 SQLd 2 SQLn 30
RDB$RELATION_FIELDS.RDB$FIELD_NAME = <NIL>
RDB$RELATION_FIELDS.RDB$RELATION_NAME = <NIL> ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900
PARAMS = [ ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900

SELECT S.RDB$FIELD_NAME
, I.RDB$RELATION_NAME
, C.RDB$CONSTRAINT_NAME
FROM RDB$RELATION_CONSTRAINTS C
, RDB$INDICES I
, RDB$INDEX_SEGMENTS S
WHERE C.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY'
AND C.RDB$RELATION_NAME = I.RDB$RELATION_NAME
AND C.RDB$INDEX_NAME = I.RDB$INDEX_NAME
AND I.RDB$INDEX_NAME = S.RDB$INDEX_NAME
ORDER BY I.RDB$RELATION_NAME ASC
, C.RDB$CONSTRAINT_NAME ASC
, S.RDB$FIELD_POSITION ASC

PLAN SORT (JOIN (C NATURAL,I INDEX (RDB$INDEX_5),S INDEX (RDB$INDEX_6)))

FIELDS = [ Version 1 SQLd 3 SQLn 30
RDB$INDEX_SEGMENTS.RDB$FIELD_NAME = <NIL>
RDB$INDICES.RDB$RELATION_NAME = <NIL>
RDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_NAME = <NIL> ]

SECONDS = 0.016
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900
PARAMS = [ ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900

SELECT S.RDB$FIELD_NAME
, I.RDB$RELATION_NAME
, C.RDB$CONSTRAINT_NAME
FROM RDB$RELATION_CONSTRAINTS C
, RDB$INDICES I
, RDB$INDEX_SEGMENTS S
WHERE C.RDB$CONSTRAINT_TYPE = 'UNIQUE'
AND C.RDB$RELATION_NAME = I.RDB$RELATION_NAME
AND C.RDB$INDEX_NAME = I.RDB$INDEX_NAME
AND I.RDB$INDEX_NAME = S.RDB$INDEX_NAME
ORDER BY I.RDB$RELATION_NAME ASC
, C.RDB$CONSTRAINT_NAME ASC
, S.RDB$FIELD_POSITION ASC

PLAN SORT (JOIN (C NATURAL,I INDEX (RDB$INDEX_5),S INDEX (RDB$INDEX_6)))

FIELDS = [ Version 1 SQLd 3 SQLn 30
RDB$INDEX_SEGMENTS.RDB$FIELD_NAME = <NIL>
RDB$INDICES.RDB$RELATION_NAME = <NIL>
RDB$RELATION_CONSTRAINTS.RDB$CONSTRAINT_NAME = <NIL> ]

SECONDS = 0.015
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900
PARAMS = [ ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900

SELECT S.RDB$FIELD_NAME
, I.RDB$RELATION_NAME
FROM RDB$RELATION_CONSTRAINTS C
, RDB$INDICES I
, RDB$INDEX_SEGMENTS S
WHERE RDB$CONSTRAINT_TYPE = 'FOREIGN KEY'
AND C.RDB$RELATION_NAME = I.RDB$RELATION_NAME
AND C.RDB$INDEX_NAME = I.RDB$INDEX_NAME
AND I.RDB$INDEX_NAME = S.RDB$INDEX_NAME
ORDER BY 1 ASC
, S.RDB$FIELD_POSITION ASC

PLAN SORT (JOIN (C NATURAL,I INDEX (RDB$INDEX_5),S INDEX (RDB$INDEX_6)))

FIELDS = [ Version 1 SQLd 2 SQLn 30
RDB$INDEX_SEGMENTS.RDB$FIELD_NAME = <NIL>
RDB$INDICES.RDB$RELATION_NAME = <NIL> ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900
PARAMS = [ ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900

SELECT F.RDB$FIELD_NAME F_FieldName
, F.RDB$RELATION_NAME F_RelationName
, F.RDB$DEFAULT_SOURCE F_DefaultSource
, D.RDB$DEFAULT_SOURCE D_DefaultSource
, D.RDB$FIELD_TYPE D_FieldType
FROM RDB$RELATION_FIELDS F
INNER JOIN RDB$FIELDS D
ON D.RDB$FIELD_NAME = F.RDB$FIELD_SOURCE
WHERE (( F.RDB$DEFAULT_SOURCE IS NOT NULL ) OR ( D.RDB$DEFAULT_SOURCE IS NOT NULL ))
AND NOT F.RDB$RELATION_NAME STARTING WITH 'RDB$'
ORDER BY 1 ASC

PLAN SORT (JOIN (F NATURAL,D INDEX (RDB$INDEX_2)))

FIELDS = [ Version 1 SQLd 5 SQLn 30
RDB$RELATION_FIELDS.RDB$FIELD_NAME[F_FIELDNAME] = <NIL>
RDB$RELATION_FIELDS.RDB$RELATION_NAME[F_RELATIONNAME] = <NIL>
RDB$RELATION_FIELDS.RDB$DEFAULT_SOURCE[F_DEFAULTSOURCE] = <NIL>
RDB$FIELDS.RDB$DEFAULT_SOURCE[D_DEFAULTSOURCE] = <NIL>
RDB$FIELDS.RDB$FIELD_TYPE[D_FIELDTYPE] = <NIL> ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 72429640
STMT_HANDLE = 72428900
PARAMS = [ ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 72429544
STMT_HANDLE = 72429736
PARAMS = [ Version 1 SQLd 1 SQLn 1
[PENSIONPLAN_ID] = 423 ]
----*/
/*---
PREPARE STATEMENT
TR_HANDLE = 72429544
STMT_HANDLE = 72428900

SELECT GEN_ID ( GEN_MISC_ID, 1 )
FROM RDB$DATABASE
PLAN (RDB$DATABASE NATURAL)

FIELDS = [ Version 1 SQLd 1 SQLn 1
GEN_ID = 4294967296 ]
----*/
/*---
EXECUTE2 DSQL
TR_HANDLE = 72429544
STMT_HANDLE = 72428900
PARAMS = [ ]
FIELDS = [ Version 1 SQLd 1 SQLn 1
GEN_ID = 177 ]

SELECT COUNT: 1
----*/
/*---
EXECUTE IMMEDIATE
DB_HANDLE = 72430076
TR_HANDLE = 72429544

INSERT INTO PENDINGPLANCHANGES
( PENDINGPLANCHANGE_ID
, PENSIONPLAN_ID
, PENDING_DATE
, DESCRIP
, LINK )
VALUES
( ? /* PENDINGPLANCHANGE_ID */
, ? /* PENSIONPLAN_ID */
, ? /* PENDING_DATE */
, ? /* DESCRIP */
, ? /* LINK */ )

PARAMS = [ Version 1 SQLd 5 SQLn 5
PENDINGPLANCHANGES.PENDINGPLANCHANGE_ID = 177
PENDINGPLANCHANGES.PENSIONPLAN_ID = 423
PENDINGPLANCHANGES.PENDING_DATE = '31 Dec 1899'
PENDINGPLANCHANGES.DESCRIP = BLOB ID ( 0, 1 )
PENDINGPLANCHANGES.LINK = BLOB ID ( 0, 2 ) ]

SECONDS = 0.016

ERRCODE = 335544333
----*/
/*---
INTERPRET BUFFER =

ERRCODE = 83
----*/
/*---
INTERPRET BUFFER = internal gds software consistency check (partner index description not found (175))

ERRCODE = -1
----*/

</------------------------------------------------
--IB Monitor Log----------------------------------
-------------------------------------------------->

What am I doing wrong? This seems rather simple.

Ed Dressel