IPerson.getBranch() should return only one result

Bug #41164 reported by Diogo Matsubara
8
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Unassigned

Bug Description

IPerson.getBranch() is returning more than one result causing OOPS-113D552

Revision history for this message
David Allouche (ddaa) wrote :

Hu-ho.... this oops looks like database fuck-up. This query should never ever return more than one result if the proper db constraints are there.

Therefore, the constraint of "owner, product, name" are unique for Branches is broken. That's VERY bad!

launchpad_prod=> select branch.id, branch.owner, person.name as owner_name, bra\nch.product, product.name as product_name, branch.name from (select owner, prod\uct, name from branch group by owner, product, name having count(*) > 1) as dup\_branch join branch using (owner, product, name) join person on branch.owner = \person.id join product on branch.product = product.id;
  id | owner | owner_name | product | product_name | name
------+-------+------------+---------+-----------------+------
 1128 | 21568 | scotth | 1533 | brightcloud-web | main
 1144 | 21568 | scotth | 1533 | brightcloud-web | main
 1145 | 21568 | scotth | 1533 | brightcloud-web | main
(3 rows)

Revision history for this message
David Allouche (ddaa) wrote :

sorry for the noise backslashes, emacs is not friend with term emulation, I should fix my config one day...

Changed in launchpad:
status: Unconfirmed → Confirmed
David Allouche (ddaa)
Changed in launchpad:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.