Ticket #493 (testing defect: fixed)

Opened 7 years ago

Last modified 6 years ago

maiadbtool.pl --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:
Cc:

Description

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

Changed 7 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...

Changed 7 years ago by dmorton

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

Changed 6 years ago by mortonda@…

  • owner changed from rjl to mortonda@…
  • status changed from new to accepted

see [1384]

Changed 6 years ago by mortonda@…

  • status changed from accepted to testing
  • resolution set to fixed

Changed 6 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.