Subject RE: [ib-support] 5.6 Child Tables
Author Bill Morrison
st_contains is the child table. The deletes in the parent occur normally.

InterBase will normally never return from trying to read the first entry
(even letting it run overnight).

While waiting for a response I did some more research and believe I found
the problem.

st_contains looked like this :

constraint pk_st_contains primary key(seq,dict_id),
constraint fk_short_term_seq foreign key (SEQ) references SHORT_TERM (SEQ),
constraint fk_short_term_dict_id foreign key (DICT_ID) references DICTIONARY
(DICT_ID) on update cascade on delete cascade);

The deletion for when a short_term entry is deleted is accomplished by a
trigger (I've been trying to overcome this issue for a while and tried
moving it from a on delete cascade).

Now, with a "bad" copy of st_contains, if I remove the constraints, then the
data becomes accessible again, pointing to something going wrong with the

I am unsure why this behavior exists. I am now trying a run where I only
have the primary key as a constraint and rely on the triggers to keep the
data integrity (lousy way to do it, but until an alternative comes

If anyone has any additional input on this matter, I'd appreciate hearing
it. Also, I will try to supply more information if the corruption occurs.


Bill M

-----Original Message-----
From: Paul Reeves [mailto:paul@...]
Sent: Thursday, October 25, 2001 2:38 PM
Subject: Re: [ib-support] 5.6 Child Tables

Bill Morrison wrote:
> This works fine, however after a certain amount of time doing this
> the st_contains table starts corrupting itself, apparently not deleting

Which is st_contains - parent or child?

> records. Attempts to access the first record of the table will freeze the
> server, and also lock the OAT on the server up upon restart. Doing a
> select count(*) from childtable will also do the same.

I would guess that you are killing InterBase as soon as it appears to
'freeze'. Have you tried just letting it run? Without more information I
cannot be sure, but I first hunch would be that InterBase is just trying to
expunge deleted records. This might be taking some time.

Can you, next time it freezes, do a gstat -h on the table, and post the
to the list?


Paul Reeves
taking InterBase further

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to