Users are never given option to remove data files

Bug #1602945 reported by Lars Tangvald on 2016-07-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Lars Tangvald

Bug Description

When purging the server package, the user should be given the option to remove data files. This is especially important if switching between MySQL and MariaDB, as they are not compatible, so not cleaning up after one is likely to make installation of the other fail.

However, the dialogue for this is never shown.

The cause is that there's a check that skips the dialog if the server binary exists (is executable), which never passes. It seems to have been copied from an old version (4.1) that had the logic in the metapackage mysql-server (Debian bug #307473).

[Impact]

Users are never given the option to remove data files when purging the package. This causes fairly significant issues for users wanting to go from MariaDB to MySQL or vice-versa, since the two packages occupy the same data directories, but are not compatible with each other.

The fix removes the useless file check, so users are given the data removal option when purging the package.

[Test case]
Install mysql-server package, then purge it.

[Regression Potential]
This change has been in Yakkety for some time (5.7.15-0ubuntu2).

It's possible that a user might have a MySQL server installed in some other way not covered by the package system, so they wouldn't want to purge data, but this will only give the option to do so.

Robie Basak (racb) on 2016-07-14
Changed in mysql-5.7 (Ubuntu):
status: New → Triaged
Changed in mysql-5.7 (Ubuntu Xenial):
status: New → Triaged
Changed in mysql-5.7 (Ubuntu):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.7 - 5.7.15-0ubuntu2

---------------
mysql-5.7 (5.7.15-0ubuntu2) yakkety; urgency=medium

  * Add working dir to perl lib path for dep8 upstream.
    New versions of perl will no longer automatically include working dir in
    the path. This was causing the mtr suite to fail to start.
  * Change mysql-testsuite dependency from python to libjson-perl.
    Tests written in python were rewritten in perl, so testsuite no longer
    depends on python, but tests fail if libjson-perl is missing.
  * Build with DWITH_LZ4=system
    If the flag is not set the package will be built with a bundled liblz4
    instead of the one provided by the liblz4-dev build-dep.
  * Add support for custom datadir to systemd service (LP: #1574782)
    The service was reporting errors if no database was found in /var/lib/mysql
    It will now check the path specified in the config
  * Fix support for soft-link datadir (LP: #1474212)
    Upgrading more than once when datadir is soft-link was causing errors
  * Escape special characters in password (LP: #1598992)
    The password string was not escaped, causing SQL errors if certain special
    characters such as apostrophes were included.
  * Removed always-false check on purge in postrm (LP: #1602945)
    Users were never seeing the query to remove data on a package purge

 -- Lars Tangvald <email address hidden> Fri, 16 Sep 2016 22:23:41 +0200

Changed in mysql-5.7 (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Changed in mysql-5.7 (Ubuntu Xenial):
assignee: nobody → Lars Tangvald (lars-tangvald)
status: Triaged → Fix Committed
Changed in mysql-5.7 (Ubuntu Xenial):
status: Fix Committed → In Progress
Robie Basak (racb) on 2017-01-06
Changed in mysql-5.7 (Ubuntu Xenial):
milestone: none → xenial-updates
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers