Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object is in use when creating a Foreign Key [CORE3082] #3461

Closed
firebird-automations opened this issue Jul 26, 2010 · 5 comments
Closed

Object is in use when creating a Foreign Key [CORE3082] #3461

firebird-automations opened this issue Jul 26, 2010 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Felipe Jaekel (fkj)

Votes: 1

It was mentioned here CORE2613 that starting from Firebird 2 it would be possible to create/drop foreign key while someone else is connected to a database, but I still have this issue with Firebird 2.1.3.

Error message:
ISC ERROR CODE:335544345

ISC ERROR MESSAGE:
lock conflict on no wait transaction
unsuccessful metadata update
object SCDESPV is in use

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

The current functionality is "as designed" within the current engine design/limitation.

Previously, you couldn't perform FK operations if any users was connected. Now, you can perform the operations with connected users.

What is, perhaps, not explicitly stated is that the object (any object) can't be referenced by a current connection/prepared statement.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

This is support question and should be asked in support list

Creation of FK requires PR (protected read) locks on both relation's metadata.
I.e. if any if two relation is used by active concurrent transaction and this transaction hold PR or EX lock on relation's metadata, FK creation will fail.
Ask for more details in support list, if you really need it ;)

@firebird-automations
Copy link
Collaborator Author

Commented by: Felipe Jaekel (fkj)

This link could be updated too http://www.firebirdfaq.org/faq22/. It also gives the impression that only earlier versions of Firebird had this limitation.

Can it be considered as a "Improvement" or "New Feature" then?

I face this problem since version 1.5, and disconnecting all users from database to maintain foreign keys is too stressful.

Thanks

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant