Error removing data with a foreign key
--------------------------------------
Key: CORE-4141
URL: http://tracker.firebirdsql.org/browse/CORE-4141
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 2.5.2 Update 1
Environment: Windows 7 64bit
Reporter: Paul Gardner
Priority: Minor
I have a table called SCHEDULE_COMPLETIONS. This table has a field called
S_ID. I have another table called SCHEDULED_DETAIL. This table ALSO has a
field called S_ID. There exists a foreign key on SCHEDULE_COMPLETIONS for the
S_ID field. It refers back to the SCHEDULED_DETAIL table also for the S_ID
field. The DELETION rule is set to CASCADE.
I have about 12,000 records in the SCHEDULED_DETAIL table, and none can be
deleted because of the foreign key. The cascade rule should allow this.
I have created a very simple copy of this database which I will attach. In
this copy, I have dropped all other tables, indices, generators, procedures,
views, triggers, and UDF records. I've also deleted every record from
SCHEDULED_DETAIL that it allowed me to delete. What remains is a small
database with only two tables, and 4 indices. Also, it contains the records
that cannot be deleted. The database backs up and restores fine so there are
no orphaned records.
Hopefully this helps in tracking down the issue.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel