[debian-mysql] Bug#853972: Bug#853972: mariadb-10.1: upgrading from mysql-5.7 renders old data inaccessible with no option to abort
Julian Gilbey
jdg at debian.org
Thu Feb 2 17:04:57 UTC 2017
On Thu, Feb 02, 2017 at 04:36:02PM +0000, Robie Basak wrote:
> Hi Julian,
>
> I'm not very keen on failing preinsts.
Indeed, neither am I. I don't suggest this lightly, but given that
the preinst already interrupts the user with a question (critical),
and there are a few other preinsts which do the same to avoid things
going crunch, this may not be terrible.
> You seem to be making an assumption that your data will still be
> readable after switching from MySQL to MariaDB. However, I don't make
> that assumption if I switch from MySQL to Postgres.
Indeed. However, Debian will now automatically switch if you install
the default-mysql-server package, and in many people's minds, while
MySQL is clearly different from Postgres, MariaDB which is a
community-based MySQL server is not obviously so. (I think of
LibreOffice and OpenOffice as an example of a similar split which was
essentially compatible, as far as I know.) Installing
default-mysql-server while upgrading jessie -> stretch is fine, but
installing it after upgrading mysql-server to 5.7 will cause the
trouble I've pointed out here.
I wish there could be a big fat warning prior to installing
default-mysql-server (which is more problematic than mariadb-server,
which - as you say - sounds clearly distinct from mysql-server).
> One difference is that the MySQL and MariaDB packages do conflict, for
> various reasons. This is fundamental as they both listen on the same
> port (and pretty much speak the same protocol) by default. However, I
> don't think this is enough of a reason to rely on a user assumption
> which simply isn't true upstream, and that we don't advertise.
>
> I think the right thing to do is the same as the MySQL->Postgres
> scenario. The data should be able to stay put. The new daemon should
> start (perhaps with a new empty database, as MariaDB is currently doing
> if I understand correctly). And the user should be able to seamlessly
> switch back. That the packages conflict shouldn't come in to it.
That would be a great step forward! If mariadb were able to have its
databases stored in /var/lib/mariadb instead of /var/lib/mysql, then
this bug would be solved instantly (and in a much better way than my
suggestion). If an existing /var/lib/mysql were present, then mariadb
could ask on first installation whether to import the databases from
there (assuming that they could be), and otherwise leave it (and
/etc/mysql) alone entirely.
I recall that there was mention of other packages making assumptions
about /var/lib/mysql, but I don't remember more than that. I guess
that's something to solve during the next release cycle.
> Separately, mysqldump isn't in mysql-server-core-5.7. Could it be, and
> if it could, would this be conflict-free?
No: mariadb-server-5.7 Conflicts against mysql-server-core-5.7, so
that wouldn't help.
Best wishes,
Julian
More information about the pkg-mysql-maint
mailing list