Opened 13 years ago

Last modified 12 years ago

#493 testing defect (fixed) --delete-address can leave database in incorrect state

Reported by: dmorton Owned by: mortonda@…
Priority: high Milestone: 1.0.3
Component: Perl scripts Version: 1.0.2
Severity: major Keywords:


maiadbtool --delete-address currently deletes the users table entry, but if the entry is a primary address with secondary addresses linked, it does not delete the maia_user; however, autocreation expects there to *not* be a maia_user if there is no matching row in the users table.

This can lead to errors from amavisd-maia attempting to create duplicate keys.

maiadbtool should issue a warning when attempting to delete a primary address that has secondary addresses linked to it.

Change History (5)

comment:1 Changed 13 years ago by dmorton

we could add an override option --delete-dependent-addresses which would remove an entire account if the primary address is deleted...

comment:2 Changed 13 years ago by dmorton

and add a --delete-account to delete an entire account

comment:3 Changed 12 years ago by mortonda@…

  • Owner changed from rjl to mortonda@…
  • Status changed from new to accepted

see [1384]

comment:4 Changed 12 years ago by mortonda@…

  • Resolution set to fixed
  • Status changed from accepted to testing

comment:5 Changed 12 years ago by mortonda@…

--delete-account would just be an alias for the other, not needed at this time, maybe it could be alow priority enhancement ticket?

This patch bails out from the deletion before doing anything destructive, and with the optional --delete-dependent-addresses it will remove all linked addresses too.

The equivalent trunk version will need some tweaking, as the id's to delete are different with the schema change.

Note: See TracTickets for help on using tickets.