Upgrading from MariaDB 10.1 to MariaDB 10.2
Contents
How to upgrade
The suggested upgrade procedure is:
- Shutdown MariaDB 10.1
- Take a backup (this is the perfect time to take a backup of your databases)
- Uninstall MariaDB 10.1
- Install MariaDB 10.2 [2]
- Run mysql_upgrade
- Ubuntu and Debian packages do this automatically when they are installed; Red Hat, CentOS, and Fedora packages do not
mysql_upgrade
does two things:- Upgrades the permission tables in the
mysql
database with some new fields - Does a very quick check of all tables and marks them as compatible with MariaDB 10.2
- Upgrades the permission tables in the
- In most cases this should be a fast operation (depending of course on the number of tables)
- Add new options to my.cnf to enable features
- If you change
my.cnf
then you need to restartmysqld
- If you change
Incompatible changes between 10.1 and 10.2
On most servers upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade:
InnoDB instead of XtraDB
MariaDB 10.2 uses InnoDB as the default storage engine, rather than XtraDB, used in MariaDB 10.1 and before. See Why does MariaDB 10.2 use InnoDB instead of XtraDB? In most cases this should have minimal effect as the latest InnoDB has incorporated most of the improvements made in earlier versions of XtraDB. Note that certain XtraDB system variables are now ignored (although they still exist so as to permit easy upgrading).
Options that have changed default values
In particular, take note of the changes to innodb_strict_mode and sql_mode.
Options that have been removed or renamed
The following options should be removed or renamed if you use them in your config files:
Option | Reason |
---|---|
aria_recover | Renamed to aria_recover_options to match myisam_recover_options. |
innodb_additional_mem_pool_size | Deprecated in MariaDB 10.0. |
innodb_api_bk_commit_interval | Memcache never implemented in MariaDB. |
innodb_api_disable_rowlock | Memcache never implemented in MariaDB. |
innodb_api_enable_binlog | Memcache never implemented in MariaDB. |
innodb_api_enable_mdl | Memcache never implemented in MariaDB. |
|innodb_api_trx_level | Memcache never implemented in MariaDB. |
|innodb_use_sys_malloc | Deprecated in MariaDB 10.0 |
New major features you should consider
You might consider using the following major new features in MariaDB 10.2:
- Window Functions
- mysqlbinlog now supports continuous binary log backups
- Recursive Common Table Expressions
- JSON functions