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