Part of an article originally published in the article MySQL Forks: Which one is right for me?, published in the June edition of php[architect]. The preceding portions of the article are available:

Having left Sun in September 2008, Monty Widenius started Monty Program AB to continue work on Aria, his replacement for the MyISAM non-transactional storage engine.  He later decided to fork the MySQL code and release his own community-developed version of MySQL called MariaDB, named after his daughter Maria.

Monty has had many public differences of opinion with the Oracle, Sun Microsystems, and even MySQL AB (which he did not fully control).  He has long argued for more openness from the corporate sponsor of MySQL.  He has disagreed with some of the decisions made along the way which resulted in a more closed-source way of doing things.

MariaDB aims to be a true community-developed database server.  They welcome patches from anyone who wishes to contribute, and do not require the contributor agreements that MySQL AB (and now Oracle) have required. You may still choose to sign a contributor agreement, which would allow them to re-submit your patches upstream to Oracle.

MariaDB includes several community-developed storage engines in addition to the basic storage engines included by MySQL.  These additional storage engines include:

* XtraDB, the InnoDB replacement from Percona
* HandlerSocket, the NoSQL API to InnoDB/XtraDB tables
* Aria, which is used instead of MyISAM for temporary tables, and purports to be crash-safe
* FederatedX, which allows you to connect to tables on other MySQL-compatible servers
* Connect, which connects to external sources of data, such as ODBC connections, dBase files, XML files, Excel files, and even Windows WMI providers, among many others
* SphinxSE, which allows direct querying of a Sphinx full-text search engine
* CassandraSE, which accesses data in a Cassandra cluster
* Mroonga, which connects to a Mroonga full-text search server
* Spider, which allows for vertical partitioning/sharding of data
* OQGraph, which allows fast traversal querying of a connected-graph
* Sequence, which is a special-purpose “storage engine” used for joining against sequences of numbers; no data is actually stored

MariaDB also includes many improvements to the core database engine.  One of their first major improvements was to improve the speed of subqueries, which has been a sore spot with MySQL users for years.  They also added many other optimization features such as group commit, thread pools, segmented key cache, index merge optimization, table elimination, and more.  Each of these features is beyond the scope of this article, but the general intent is to make queries faster.

MariaDB also adds many new features for users of MySQL:

* Virtual columns allow you to specify a column as an expression; these can be determined either when written or when read
* Dynamic columns are schema-less columns defined at the time of the query; while not as transparent as could be hoped, they can be useful
* Geospatial (GIS) functions have been fixed so that they actually work correctly; this community patch was also adopted by MySQL 5.6
* Microsecond precision for DATETIME, TIME, and TIMESTAMP columns
* Multi-source replication allows multiple replication masters to be specified
* Pluggable authentication, which has since been implemented in MySQL 5.6
* SHOW EXPLAIN can explain a running query from another thread
* Progress reporting (percentage complete) for ALTER TABLE and LOAD DATA INFILE commands
* Atomic writes (no double-buffering) when using Fusion IO solid-state drives

Monty has also tried to “fix” some of the decisions that he felt made MySQL less open.  Years ago, the MySQL C client libraries were relicensed as GPL, which meant that programs which were not GPL-compatible could not use them.  They had to grant a special exemption to PHP, for example, in order for PHP to continue to bundle its MySQL extension.  Others were required to purchase a commercial license if their product was not released under the GPL.  MariaDB released a fully compatible client library licensed under the LGPL, which allows linking to non-GPL applications.

MariaDB packages a clustered version of their server called MariaDB Galera Cluster.  It adds the same synchronous multi-master features to MariaDB that can be found in Percona XtraDB Cluster, since the clustering is based on the same product.  The same benefits and warnings apply.

Monty has also been working to create free documentation for MySQL.  MySQL AB made the decision to make their documentation free to view, but did not allow redistribution.  This is very much a work in progress; it is nowhere near as complete as the official MySQL documentation.  As Oracle allows free access to the documentation, this project does not have the direct impact on most users.  If that were to change (something I deem unlikely), this project would probably get more attention from the community.

Before December 2012, MariaDB was still very much a niche project, and not widely used.  They did not have any major deployments to speak of, and many users of MySQL were not even aware of the project’s existence.  Since then, several major developments have occurred.  Mozilla and Wikipedia (English and German) have both announced that they have switched to MariaDB.  Previously, Mozilla was running Percona Server, and Wikipedia was using MySQL 5.1 with the Facebook patch.

Perhaps even more important to the long-term success of MariaDB, it has been adopted as the default mysqld in Fedora 19, OpenSUSE 12.3, and even the venerable Slackware distribution.  They hope that these changes will eventually be pushed to the major enterprise Linux distributions, Red Hat Enterprise Linux and SUSE Linux Enterprise.

Also in December 2012, MariaDB announced the formation of the MariaDB Foundation, which will provide open governance for the project.  Their board includes Simon Phipps as Chief Executive Officer; he also serves as the President of the Open Source Initiative.

MariaDB has also made the somewhat controversial step of renumbering their next release as 10.0.  Previously, their release numbers had loosely tracked the Oracle MySQL releases.  Since their product has so many significant differences from Oracle’s MySQL, they decided that it would be best to choose a number that makes it clear that their product is not just a patched version of MySQL.  It is still a drop-in replacement for MySQL, and probably not ready to be completely self-sustaining, but it is also different enough to be considered a true fork.


Since publication of this article, I’ve been told that Mozilla has decided to switch from MariaDB to Oracle MySQL 5.6.

Next week: Other MySQL derivatives

Share →

7 Responses to MySQL Forks: MariaDB

  1. Monty has also tried to “fix” some of the decisions that he felt made MySQL less open. Years ago, the MySQL C client libraries were relicensed as GPL, which meant that programs which were not GPL-compatible could not use them. They had to grant a special exemption to PHP, for example, in order for PHP to continue to bundle its MySQL extension. Others were required to purchase a commercial license if their product was not released under the GPL. MariaDB released a fully compatible client library licensed under the LGPL, which allows linking to non-GPL applications.

    Why is this a good thing for anyone except MariaDB?
    1) if you care about open source, probably your application is open source, and you can use the GPL connectors;
    2) if your application is not open source, then it is only fair that you pay something to use a non-GPL connector.
    3) the Java connector was forked from the BSD Drizzle connector and, after being modified in secrecy for more than one year (so much for open development), re-licensed as LGPL. Is this better for anyone? I don’t think so.
    4) The C connector is a fork of MySQL 3.23 connector with enhancements to make it usable with the more recent MySQL protocol. If I were releasing a commercial application that requires a MySQL connector, I would need to either pay an attorney to make sure that the changes made by MariaDB are not infringing any copyright, or I could pay Oracle for a license, which probably would cost me less.

    • Steve Meyers says:

      You make some good points. However, I disagree with your implication that a non-GPL is a bad thing. It’s not that common for a library to be released under the GPL, and much more common for them to be LGPL, BSD, or similar. The official client libraries for PostgreSQL for example, are licensed similar to BSD.

      The FOSS exception alleviates this somewhat for software that is open source, but incompatible with the GPL. However, it’s a bit of a hack job, and if any of those software packages upgrade their license, they are out of compliance with MySQL’s client library license until the FOSS exception is updated.

      In my opinion, the only company that benefits from the GPL connector library is Oracle, which can use that fact to get more money. Monty did not ever fully agree with that decision when it was made at MySQL AB, and now that he is no longer employed there, has taken steps to ameliorate the situation.

      Even if you believe that he made a bad decision in this case, I don’t see how it changes the substance of my article. I stated that he felt it was a problem that needed to be “fixed”, and so he did what he could to fix it.

      In my article, I tried to give a fair shake to each of the MySQL-derived servers. I thought you made some good points in your post about the problems with MySQL forks, which I addressed previously ( It was well done, and definitely made me rethink some of my previous opinions. As this article was written in May, it predates that discussion.

      • What’s wrong with Oracle, and thus the MySQL team, making some money?
        If they don’t get benefits from MySQL, they can hardly pay the salaries for the hundreds of employees that are making and maintaining MySQL. And this same paradigm has worked well for MySQL AB. Probably Monty has a different opinion on that, and keeps repeating that the best people have left, but I know mostly everyone in both camps, and I can tell that there is plenty of talent left in the original MySQL team, and they deserve to get some financial return for their work. I have sustained this point long before the company was acquired, and I still stand by it.

        Coming back to the point: I believe that the GPL is good protection for software, and I don’t mind playing by its rules. This release of LGPL connectors, IMO, is just smoke.

        • Steve Meyers says:

          I don’t think that’s an invalid opinion at all, and I have no problem with it. Not everybody agrees with it, however, and I think there are good arguments to be made on both sides.

          To understand why MariaDB is what it is, you need to at least somewhat understand Monty’s mindset. He’s never been afraid to have an opinion, and he disagreed with some of the things that were done with MySQL when he worked there. That’s what I was trying to explain in my article.

          • I understand Monty’s mindset only too well.
            You probably don’t have first hand experience of what Monty did or did not at MySQL. Therefore your knowledge on the matter seems to be coming from what Monty says. Which I usually define as “unburdened by truth.”

  2. Joro says:

    You sir need to get your facts straight.

    • Steve Meyers says:

      Do you have any examples of facts that I got wrong? I made a couple of minor corrections from my original draft based on feedback from Colin Charles, Chief Evangelist of MariaDB (now part of SkySQL). The corrections were minor, though, and were generally a matter of clarifying rather than changing the information presented.

Leave a Reply

%d bloggers like this: