brownsys/K9db

Pelton views can contain multiple columns with the same primary key value

Closed this issue · 1 comments

Issue

It is possible for Pelton's views to contain multiple columns with the same primary key value

Cause

On encountering an insert statement with a duplicate primary key value, mariadb's default behaviour seems to be to replace the preexisting entry with the newer one rather than raising an error (changing the behaviour to raise an error instead would be a simple solution to this bug). The materialised views are then updated with the new table entry, but are not asked to delete the older entry, which also persists

Demonstration of Issue

When running websubmit-rs with a pelton backend, entering mutiple lectures with the same id (primary key) resulted in the application listing multiple lecture entries with the same id

Fixed