Subject internal gds software consistency check error
Author Zakir Mahomedy
Hi,
I created a store procedure which adds or deletes entries.
I can add as many entries as possible, however when i issue the delete command
I get this error message. Any idea what would cause this error.
I tested it out using EMS IBManager and I also get the error.

So its my store procedure which could be the problem. I posted my store procedure below
with the errors.

I am using Firebird v1.5.2

Thanks

Zak

*** IBPP::Exception ***
Context: Statement::ExecuteImmediate( EXECUTE PROCEDURE MODIFY_USERTYPES(2,'TEST') )
Message: isc_dsql_execute_immediate failed

SQL Message : -902
Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements

Engine Code : 335544333
Engine Message :
internal gds software consistency check (partner index description not found (175))


After this message, other database operations give the following message.
Then restart firebird.


*** IBPP::Exception ***
Context: Transaction::Rollback

SQL Message : -902
Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements

Engine Code : 335544333
Engine Message :
internal gds software consistency check (can't continue after bugcheck)


Here is my Store Procedure

CREATE PROCEDURE MODIFY_USERTYPES (
COMMAND SMALLINT,
USERTYPE VARCHAR (30) CHARACTER SET NONE)
AS
DECLARE VARIABLE any_items INTEGER;
BEGIN
any_items = 0;

IF( COMMAND = 0 ) THEN /* ADD NEW USERTYPE this works fine*/
BEGIN
SELECT COUNT(UTYPE) FROM user_types WHERE UTYPE = :USERTYPE
INTO :any_items;
IF( any_items > 0 ) THEN
BEGIN
EXCEPTION unique_name_violation;
SUSPEND;
END

INSERT INTO user_types (UTYPE)
VALUES( :USERTYPE );
SUSPEND;
END


/* DELETE EXSISTING USERTYPE */
ELSE IF( COMMAND = 2) THEN

BEGIN
SELECT count(UTYPE) FROM USERS
WHERE UTYPE = :USERTYPE
INTO :any_items;
IF (any_items > 0) THEN
BEGIN
EXCEPTION reassign_utype;
SUSPEND;
END
DELETE FROM user_types WHERE UTYPE = :USERTYPE; //CRASH HERE
SUSPEND;
END

END

[Non-text portions of this message have been removed]