← Back to team overview

maria-discuss team mailing list archive

sanity check: mysql_upgrade MariaDB 5.5 straight to 10.1

 

Hi all -

I believe I know the answer to this question, however hoping someone can confirm all the assumptions (looks like there are three) are correct.

Basically if one installs mariadb-10.1 on top of a data directory that's currently 5.5, and we run mysql_upgrade, is it as good/compatible/safe as if we had upgraded first to 10.0 in the interim?

Per mariadb's documentation:

https://mariadb.com/kb/en/mariadb/upgrading-from-mariadb-55-to-mariadb-100/

"There are no changes in table or index formats between MariaDB 5.5 and
MariaDB 10.0"

https://mariadb.com/kb/en/mariadb/upgrading-from-mariadb-100-to-101/,

"There are no changes in table or index formats
between MariaDB 10.0 and MariaDB 10.1"

So assumption 1, transitively we can conclude there are no changes in table or index formats between 5.5 and 10.1.

Next, mysql_upgrade seems like it alters some tables in the mysql database, and runs mysqlcheck --check-upgrade --auto-repair, which itself is mainly running CHECK TABLE.

assumption 2 is then: the table changes in mysql_upgrade work against a 5.5 database going straight to 10.1. This would mean that if there were some tables/column changes in 5.5->10.0, and some more in 10.0->10.1, the mysql_upgrade command encapsulates both sets of changes as shipped in 10.1. It looks like this step comes from the .sql files in scripts/ by way of concatenating them into the "comp_sql" tool. Doing a diff of these scripts between 10.0.28 and 10.1.18 seems like only mysql_system_tables_fix.sql has the important bits (we don't use the performance schema stuff) and it looks like it only adds ALTER statements for more columns, the new columns from the 10.0 script are maintained. Not to mention it documents in a very open-ended way "This part converts any old privilege tables to privilege tables suitable for current version of MySQL".

assumption 3 is, the Mariadb 10.1 engine running CHECK TABLE against a 5.5 database is fully compatible. The schema changes seem to be straightforward and as CHECK TABLE seems to regard the table and index formats which in assumption 1 have not changed, this should be totally fine as well.

Note that I'm being kind of vague about what mysql_upgrade and mysqlcheck do, as I've only read the public documentation, browsed the source code a bit and am hoping this is all there is to it. There are a few blog posts on the web that illustrate a 5.5->10.1 direct upgrade, but these are not "official". Thanks for any guidance people can offer here!