MariaDB: story of a MySQL fork

MariaDB was born as a fork of MySQL that means they share the same code up to a certain point, that point was MySQL v5.1 (29 Sep 2009). The community decided to fork MySQL due to concernsabout the Oracle acquisition and what MySQL would become.

Oracle was mainly a software company and most of its core business was at the time, well, databasesOracle Database is the Oracle’s main product and it is often regarded as the standard database for the enterprise. With the acquisition of MySQL, the community feared that Oracle would limit the growth of what used to be a complete open source DBMS. The day Oracle announced the acquisition of Sun, Ulf Michael Widenius, the main author of MySQL, announced the fork of MySQL and the birth of MariaDB. The cofounder of MySQL took a handful of MySQl developers with him.

Oracle has since created derived products: MySQL Community Editions (the “original”, open source) and MySQL Standard, Enterprise editions that include closed source software and Oracle support.

A drop-in replacement

The main selling point of the newly born DBMS (Data Base Management System) was to keep compatibility with MySQL and to be a drop-in replacement for it.

Drop-in replacement means that a software using either won’t notice if you switch between the two and will continue working without any problem. This was done in order to provide users with an easy way to switch to the new software without disrupting their activities.

Maintaining MariaDB as a drop-in replacement was a right call to allow users to switch in the short period, but it would’ve been a double-edged sword in the long run: MariaDB would’ve had to implement every single change implemented by Oracle, and that would’ve defeated the original reason behind the fork. That’s why not all versions of MariaDB are compatible with MySQL (more in a while).

MariaDB, MySQL: storage engines

First and foremost MariaDB released Aria, a storage engine to replace the older, but still widely used, MyISAM. For a short while MariaDB used XtraDB (a storage engine from Percona) as default, to later return to InnoDB. It may not seem like a great feat now, but at the time MyISAM, the default MySQL storage engine, would employ table-wide locks that resulted in poor performance and query stacking.

In time MariaDB’s InnoDB, the current default engine, diverged substantially from MySQL’s InnoDB, leading to incompatibilities, up to the point that no version of MariaDB can be used as drop-in replacement for MySQL 8.

At the moment MariaDB supports the following engines:

  • InnoDB (since version MariaDB 10.3 it has diverged substantially from MySQL’s implementation)
  • XtraDB
  • Aria
  • MyISAM
  • ColumnStore
  • TokuDB
  • MyRocks
  • follow this link for a full list.

While MySQL supports:

  • InnoDB
  • MyISAM
  • Memory
  • CSV
  • Archive
  • Blackhole
  • NDB
  • Merge
  • Federated
  • Example

Notice that Memory, CSV, Archive, Blackhole, Merge, Federated, Example are also available in MariaDB.