Skip to content

Deleting a tuple that has a Foreign Key constraint correctly fails, but it is removed from the filter #1511

@dmgerman

Description

@dmgerman

Details for the issue

What did you do?

Assume the following schema:

create table parent (a int, primary key a);
create table child(a int, b int, primary key (a,b), foreign key (a) references parent);

add values:

insert into parent values (1), (2), (3);
insert into child values (1,10), (2,20), (3,30);

make sure that the foreign key pragma is on.

now, try to delete a tuple in parent (any). it will get an error. This is ok.

the bug:

  1. browsing parent, set the filter of attribute a with value equal 1, you will see only one tuple.
  2. delete that tuple

you will get an error, this is ok

  1. (after the error) the tuple is no longer in the filter. it has disappeared.
  2. reset the filter
  3. filter again with attribute equal 1, the tuple is still there.

What did you expect to see?

The tuple I am trying to delete should always be displayed.

What did you see instead?

The tuple disappears from the view (but it has not been deleted)

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • Windows: ( version: ___ )
  • [ X] Linux: ( distro: ubuntu 18.04 ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

What is your DB4S version?

  • [X ] 3.10.1
  • 3.10.0
  • 3.9.1
  • Other: ___

Did you also

Metadata

Metadata

Assignees

Labels

bugConfirmed bugs or reports that are very likely to be bugs.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions