[debian-mysql] Bug#841345: Bug#841345: mysql-server-5.7: Unable to switch from mariadb to mysql, "downgrade" is aborted

Lars Tangvald lars.tangvald at oracle.com
Wed Oct 19 18:56:14 UTC 2016


----- fsateler at debian.org wrote:

> On 19 October 2016 at 14:08, Lars Tangvald <lars.tangvald at oracle.com>
> wrote:
> >
> > ----- fsateler at debian.org wrote:
> >
> >> Package: mysql-server-5.7
> >> Version: 5.7.15-1
> >> Severity: important
> >>
> >>
> >> Switching from mariadb to mysql fails with the following error
> >> message:
> >>
> >> Aborting downgrade from (at least) 10.0 to 5.7.
> >> If are sure you want to downgrade to 5.7, remove the file
> >> /var/lib/mysql/debian-*.flag and try installing again.
> >>
> >>
> >> The test[1] seems to be a bit naive, given that mariadb uses the
> same
> >> flag file.
> >>
> >> Mariadb and mysql are supposed to be drop-in replacements, so
> >> switching
> >> between them should be supported.
> >>
> > This is a misunderstanding, unfortunately. MySQL and MariaDB are not
> drop-in replacements of each other.
> 
> Oh, bummer.
> 
> > MariaDB is able to read the databases of some MySQL versions (5.5
> and earlier and probably 5.6, since the database structure didn't
> change too much there), but as far as I know they don't yet support
> 5.7-created databases in any released version.
> > MySQL does not support running with a MariaDB-created database.
> >
> > While the flag system does need a redesign (there's an issue to
> track this at
> https://bugs.launchpad.net/ubuntu/+source/mysql-5.7/+bug/1490071) it's
> more likely the solution there will be to move the old versions data
> "out of the way", possibly with an option to try using it.
> 
> 
> Then mysql and mariadb should not share the /var/lib/mysql directory,
> and instead there should be a command to offer trying to "seed" the
> db
> using the other database's files.
> 
> -- 
> 
Yes, separating the actual files of the two seems a better long-term solution to me (and the packaging for both could check for the presence of the others and ask users if an attempt to import should be made).

But while this isn't a huge task for MySQL and MariaDB, I know there are other packages that use them with hard-coded paths, and they will start breaking. I'd say this is to be considered a bug in those packages, but it does mean it's not a small task.

--
Lars



More information about the pkg-mysql-maint mailing list