[MDEV-10392] Document incompatibilities between MariaDB 10.1 and MySQL 5.7 Created: 2016-07-19 Updated: 2020-08-25 Resolved: 2018-06-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation |
| Affects Version/s: | 10.1 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Kenneth Dyer (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | documentation | ||
| Description |
|
I started a section here, but haven't added much yet: |
| Comments |
| Comment by Chris Calender (Inactive) [ 2016-07-27 ] | ||||||||||||||||||||||||||||||||||
|
Brain-dump: There are some differences between the respective versions, which are all outlined here (though I do not see anything regarding data incompatibility-type issues): https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ > I also found another blog from Fred Flintstone saying that migration from MySQL to MariaDB after MySQL 5.5 would be a one-way trip: Yes, it's a one way trip. This is mainly because the tables in mysql.user are being updated to MariaDB. In theory, if one copies the tables in mysql.user one can downgrade to MySQL any tables that > In the future, if there were different implementations of a same feature, would migration from MySQL be fully compatible? MySQL 5.6 has a different implementation of timestamp with microseconds than MariaDB 5.5 MySQL 5.7 has different implementation of replication and virtual fields than MariaDB. MariaDB 10.2 should have all major features of MySQL 5.7 and be data compatible on disk. The one feature we haven't yet decided to implement is the x protocol > 3. Will migration from MySQL always be as simple as installing MariaDB binary and running mysql_upgrade? For most cases, yes. 1. I found some MySQL features that are not supported in MariaDB which are not mentioned in this link: https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ b) MySQL Memcached Plugin https://jira.mariadb.org/browse/MDEV-10265 Along the way, I ran across the following 3 pages which all contain useful compatibility and new feature details. I think you will find the first two especially helpful: https://mariadb.com/blog/mysql-56-vs-mariadb-100 As for some specifics, first of all, I know GTID is briefly mentioned, as there are different implementations. Of course, when migrating, this means you could not mix-and-match MySQL and MariaDB servers in replication using GTID. However, when you do migrate, you would need to change the variables used, so that you could continue to use GTID. Thus I think this is a good topic to highlight for your users. The GTID-related variables in MySQL 5.6 are:
Conversely, in MariaDB 10.1, the GTID-related variables are:
And the variables (for MariaDB) are described in detail here: https://mariadb.com/kb/en/mariadb/server-system-variables/ And MariaDB GTID implementation, in general, is described here: https://mariadb.com/kb/en/mariadb/gtid/ Second, optimizer changes are not mentioned on the "compatibility" page, as they are really behind-the-scenes anyway, however, it is something to be aware of (especially for those who might notice some differing EXPLAIN plans on queries). I did add this link above, but I wanted to highlight it here, to be clear: https://mariadb.com/kb/en/mariadb/differences-between-the-mysql-and-mariadb-query-optimizer/ Third, I do not see any mention of the "federated" storage engine. MariaDB dropped Federated and instead uses FederatedX, since active development had stopped on Federated. They should behave the same, and the CREATE TABLE syntax appears to be the same. The only difference I see is that MySQL allows Federated tables to be created by both CREATE TABLE and CREATE SERVER commands. I do not see a CREATE SERVER command for MariaDB. Thus any Federated tables created in this manner in MySQL would need to be re-created in MariaDB using the CREATE TABLE command, as far as I can tell. https://mariadb.com/kb/en/mariadb/about-federatedx/ Fourth, I see "delayed replication" (MASTER_DELAY) as an option in MySQL 5.6, but do not see it available in MariaDB: http://dev.mysql.com/tech-resources/articles/whats-new-in-mysql-5.6.html That is about it, at least as far as I can find, for MySQL 5.6. Getting into MySQL 5.7, I see it offers both ngram and MeCab full-text parser plugins (for Chinese/Japanese/Korean languages): http://dev.mysql.com/doc/refman/5.7/en/mysql-nutshell.html I do not see these in MariaDB, so that is a difference. I did file feature requests to add them, however: https://jira.mariadb.org/browse/MDEV-10267 I also see 5.7 supports JSON with a native type. However, MariaDB currently has support for JSON using the CONNECT JSON table type: http://dev.mysql.com/doc/refman/5.7/en/json.html Lastly, I see that MySQL 5.7 supports multiple triggers (of the same type) for a table. This does not currently exist in MariaDB, though there is an existing feature request for that here: https://jira.mariadb.org/browse/MDEV-6112 Downgrading, if necessary: However, this approach gets complicated though, and is prone to change as well, so I would opt to use the mysqldump/import method for the 'mysql' schema tables (i.e., mysql.user) that need migrating, which, again, is the same/only method MySQL recommends for a 5.7 -> 5.6 downgrade. Feel free to ask me any questions about any of the above if anything is not clear, but I needed to brain-dump all of these findings somewhere before I forget. | ||||||||||||||||||||||||||||||||||
| Comment by Kenneth Dyer (Inactive) [ 2018-06-07 ] | ||||||||||||||||||||||||||||||||||
|
I added lines to the Compatibility page for the five points that I couldn't find mention of otherwise:
Given that this ticket is a couple years old, is there anything else that we need to add on these sections? | ||||||||||||||||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2018-06-08 ] | ||||||||||||||||||||||||||||||||||
|
The documentation is probably still missing some details, but I don't know how much research you want to do to ensure that its complete. For example, a quick Google search shows that MySQL 5.7 has the sha256_password plugin, but MariaDB does not. https://dev.mysql.com/doc/refman/5.7/en/sha256-pluggable-authentication.html https://jira.mariadb.org/browse/MDEV-9804 MySQL 5.7 also has transportable tablespaces for partitioned InnoDB tables, but MariaDB does not. https://dev.mysql.com/doc/refman/5.7/en/tablespace-copying.html https://jira.mariadb.org/browse/MDEV-10568 http://www.geoffmontee.com/importing-innodb-partitions-in-mysql-5-6-and-mariadb-10-010-1/ MySQL 5.7 also has online undo tablespace truncation, but that was only added in MariaDB 10.2. https://dev.mysql.com/doc/refman/5.7/en/truncate-undo-tablespace.html https://jira.mariadb.org/browse/MDEV-8994 MySQL 5.7 also has a new version of performance_schema and a sys schema wrapper, but MariaDB does not yet support that. https://dev.mysql.com/doc/refman/5.7/en/performance-schema.html https://dev.mysql.com/doc/refman/5.7/en/sys-schema.html https://jira.mariadb.org/browse/MDEV-6114 https://jira.mariadb.org/browse/MDEV-9077 MySQL 5.7 added multi-source replication and replication channels, but MariaDB's multi-source replication (added in 10.0) uses different syntax. https://dev.mysql.com/doc/refman/5.7/en/replication-multi-source.html https://dev.mysql.com/doc/refman/5.7/en/replication-channels.html https://mariadb.com/kb/en/library/multi-source-replication/ MySQL 5.7 added group replication, but this is incompatible with MariaDB's Galera Cluster replication. https://dev.mysql.com/doc/refman/5.7/en/group-replication.html https://mariadb.com/kb/en/library/galera-cluster/ There may be others too. It might help to go through the "What's new in MySQL 5.7" page. | ||||||||||||||||||||||||||||||||||
| Comment by Kenneth Dyer (Inactive) [ 2018-06-19 ] | ||||||||||||||||||||||||||||||||||
|
Thanks Geoff. Added content for the points you made as well as a few others found on MySQL's What's New page. |