Contents
What You Need to Know
There are no changes in table or index formats between MariaDB 10.0 and MariaDB 10.1, so on most servers the upgrade should be painless.
How to Upgrade
The suggested upgrade procedure is:
- For Windows, see Upgrading MariaDB on Windows instead.
- Set innodb_fast_shutdown to
0. - Shutdown MariaDB 10.0
- Take a backup (this is the perfect time to take a backup of your databases)
- Uninstall MariaDB 10.0
- Install MariaDB 10.1 [1]
- Run mysql_upgrade
- Ubuntu and Debian packages do this automatically when they are installed; Red Hat, CentOS, and Fedora packages do not
mysql_upgradedoes two things:- Upgrades the permission tables in the
mysqldatabase with some new fields - Does a very quick check of all tables and marks them as compatible with MariaDB 10.1
- 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.cnfthen you need to restartmysqld
- If you change
Incompatible Changes Between 10.0 and 10.1
As mentioned previously, on most servers upgrading from 10.0 should be painless. However, there are some things that have changed which could affect an upgrade:
Storage Engines
- The ARCHIVE storage engine is no longer enabled by default, and the plugin needs to be specifically enabled.
- The BLACKHOLE storage engine is no longer enabled by default, and the plugin needs to be specifically enabled.
Replication
- MariaDB 10.1 introduces new, standards-compliant behavior for dealing with primary keys over nullable columns. In certain edge cases this could cause replication issues when replicating from a MariaDB 10.0 master to a MariaDB 10.1 slave using statement-based replication. See MDEV-12248.
Galera
See Upgrading Galera Cluster from MariaDB 10.0 to 10.1 for more details on Galera upgrades.
Options That Have Changed Default Values
Most of the following options have increased in value to give better performance.
| Option | Old default value | New default value |
|---|---|---|
| innodb_log_compressed_pages | ON | OFF |
| join_buffer_size | 128K | 256K |
| max_allowed_packet | 1M | 4M |
| query_alloc_block_size | 8192 | 16384 |
| query_cache_size | 0 | 1M |
| query_cache_type | ON | OFF |
| sync_master_info | 0 | 10000 |
| sync_relay_log | 0 | 10000 |
| sync_relay_log_info | 0 | 10000 |
| query_prealloc_size | 8192 | 24576 |
| secure_auth | OFF | ON |
| sql_log_bin | No longer affects replication of events in a Galera cluster. | |
| sql_mode | empty | NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION |
| table_open_cache | 400 | 2000 |
| thread_pool_max_threads | 500 | 1000 |
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 |
|---|---|
| rpl_recovery_rank | Unused in 10.0 |
Other Issues
Note that explicit or implicit casts from MAX(string) to INT, DOUBLE or DECIMAL now produce warnings (MDEV-8852).
Major New Features To Consider
You might consider using the following major new features in MariaDB 10.1:
- Galera Cluster is now included by default.
- Encryption
- InnoDB/XtraDB Page Compression
Notes
-
↑ If using a MariaDB
aptoryumrepository, it is often enough to replace instances of '10.0' with '10.1' and then run an update/upgrade. For example, in Ubuntu/Debian update the MariaDBsources.listentry from something that looks similar to this:deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main
To something like this:deb http://ftp.osuosl.org/pub/mariadb/repo/10.1/ubuntu trusty main
And then runapt-get update && apt-get upgradeAnd in Red Hat, CentOS, and Fedora, change thebaseurlline from something that looks like this:baseurl = http://yum.mariadb.org/10.0/centos6-amd64
To something that looks like this:baseurl = http://yum.mariadb.org/10.1/centos6-amd64
And then runyum update