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

Silly FK attempt asserts in the DEV_BUILD and gives wrong error in RELEASE. [CORE2574] #2984

Open
firebird-automations opened this issue Jul 25, 2009 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Claudio Valderrama C. (robocop)

Nobody would normally attempt such silly FK relationship, but the engine should handle it gracefully:

create table t(a int primary key);
alter table mon$statements add constraint z foreign key(mon$statement_id) references t(a);

Produces in the debug build:
Statement failed, SQLSTATE = 08006
connection lost to database
Statement failed, SQLSTATE = 08006
Error writing data to the connection.

The release build says:
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-persistent table "MON$STATEMENTS" cannot reference persistent table "T"

that's a sign it's not handling the case entirely well, since it identifies MON$STATEMENTS as persistent.

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