Issue 81929 - FKs not deleting properly
Summary: FKs not deleting properly
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.3
Hardware: Other Windows Vista
: P3 Trivial (vote)
Target Milestone: ---
Assignee: dbaneedsconfirm
QA Contact: issues@dba
URL: http:///
Keywords: needmoreinfo
Depends on:
Blocks:
 
Reported: 2007-09-25 11:50 UTC by smoke3723
Modified: 2008-05-07 10:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
The corrupted base file (159.21 KB, application/vnd.sun.xml.base)
2007-09-25 11:51 UTC, smoke3723
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description smoke3723 2007-09-25 11:50:44 UTC
I added a few tables to an existing database, but when I was mid-way through
setting the relationships in the GUI I realised I had assigned an incorrect
field length.  I deleted the tables from the relationship window, made the
changes and went back to establish the relationships; but every time I did it
returned a 'Foreign Key already exists' error message.  So I deleted the tables
entirely and rebuilt them from scratch, and that seemed to fix the problem.  But
when I restarted Base, the connection to that db (and only that db) was lost.

The above was all done in v2.2.1; I checked for OO updates and installed v2.3,
which gave me a nice verbose error message: "error in script file line 41:
constraint already exists: SYS_FK_932 in statement [CREATE CACHED TABLE ....]"
(and then it defines the table indices).

Clearly, the indexes were not correctly purged when I made those deletions.  The
problem is, now I can't access the db in order to remove the duplicate key in
the GUI.  Can someone please advise me how to do this manually?  I'm running
Vista Home Premium 32-bit.

I'll also attach the corrupted file for autopsy.
Comment 1 smoke3723 2007-09-25 11:51:53 UTC
Created attachment 48472 [details]
The corrupted base file
Comment 2 smoke3723 2007-09-30 10:24:52 UTC
I had this issue occur to me again; it seems to happen if I delete an FK, rename
the table, and then re-do the FK.  You only notice it after restarting Base and
the connection is re-connected.
Comment 3 Frank Schönheit 2007-10-08 14:57:28 UTC
For how to fix the concrete DB: Unzip the .odb, edit the file database/script,
in line 41, and try to e.g. renamed the first occurrence of SYS_FK_932 to
SYS_FK_933. The re-zip, and try again.
(side note: The proper place to get this kind of support is our project's
mailing list, see http://wiki.services.openoffice.org/wiki/Base_Mailing_List.
You would have got an answer much faster, probably.)
Comment 4 Frank Schönheit 2007-10-08 15:04:35 UTC
For the concrete problem: Sadly, I cannot reproduce it. Neither with the
original description, nor with what you wrote in the additional comment.

Could you try reproducing this, again, and explain step-for-step what you're
doing, preferrably with a sample database?
Comment 5 christoph.lukasiak 2007-10-23 15:48:18 UTC
set 'worksforme'
Comment 6 christoph.lukasiak 2008-05-07 10:44:47 UTC
no respond => close