Celebrating 15 years of MariaDB Server
It is now 15 years since the first MariaDB Server release of MariaDB 5.1.38 on 29’th of October 2009. The first release of MariaDB Server could not have been possible without a team effort, including several other co-founders Max Mether, Mick Carney, Kaj Arno and others.
The MariaDB project started on April 20 2009, the same day when Oracle announced that Oracle will buy Sun Microsystems, who owned MySQL. The initial MariaDB engineering team consisted of some 20 engineers from the MySQL server team at Sun, and me. It has now grown manifold across both MariaDB plc & MariaDB Foundation + a lot of external contributors.
The reason for creating MariaDB Server is that we all believed that Oracle would not be a good steward of MySQL and we wanted to ensure that MySQL source and spirit would continue living, outside of Oracle. MariaDB Server is actively developed. There have been 27 major releases of MariaDB Server, of which 18 have been long term (LTS) releases. All MariaDB Server changes are tested on 4 different compilers, 6 different architectures, 4 different operating systems and 7 OS distributions. In addition we compile with many different compiler options and code checkers to find issues earlier. MariaDB Server is available on all major OS distributions and runs on all public clouds.
MariaDB Enterprise Server launched in 2019 and has had 6 major releases. The Enterprise Server is a targeted database for users who want longer release and maintenance cycles, higher stability, more performance and enterprise level support with direct contact with the engineers that wrote the code. This includes less reasons to upgrade, thanks to backported features from newer MariaDB releases and easier upgrades, thanks to tools like MariaDB MaxScale.
Until MariaDB 10.0, MariaDB was a true fork of MySQL with a lot of enhancements and performance improvements. Starting from MariaDB 10.0 we stopped doing merges of code from MySQL as this enabled us to add more features and bigger improvements to the code, without having to be constrained by the MySQL code base. We still kept up with most MySQL features and syntax to ensure that it should be trivial to migrate from MySQL to MariaDB. One can still move from MySQL 5.7 and earlier MySQL versions to any newer MariaDB version with almost no changes. MySQL 8.0 changed how things are stored on disk, which means that to move from MySQL 8.0 and above to MariaDB one has mysqldump/mariadb-dump and restore. Apart from that, moving from MySQL to MariaDB is still in many cases easier than moving between MySQL versions.
Here comes a list of some of the most notable features created in MariaDB Server over the last 15 years.
New storage engines:
- Aria storage engine (MyISAM replacement, initially called Maria)
- ColumnStore (Columnar storage, for analytical queries)
- Connect (Allows one to connect to external databases through JDBC/ODBC and also read a lot of legacy database formats)
- Mroonga (fulltext search)
- MyRocks (Compressed storage, used by Facebook)
- Sequence (Allows the creation of ascending or descending sequences)
- Spider (Sharding)
- S3 storage engine
Performance:
- Pool of threads
Optimizer:
- Table elimination
- Better optimizer (First stage in MariaDB Server 5.3-5.5 and second in MariaDB Server 11.0)
- Subquery optimizations in 5.3
- Starting from 11.0 almost all aspects of the optimizer is cost based and costs are tunable.
- Index Condition pushdown
- Semi-join
- Batched key access
- Materialization
- Index_merge / Sort_intersection
- Cost-based choice of range vs. index_merge
- Use extended (hidden) primary keys for InnoDB
- Subquery cache
- Block hash join
- Null-rejecting conditions tested early for NULLs
- Optimizer trace
- ANALYZE … SELECT|UPDATE|DELETE
- See https://mariadb.com/kb/en/optimizer-feature-comparison-matrix/ for a more complete list for the older optimizer features.
- Histogram based statistics
- Split Grouping Optimization
- Descending indexes
- New cost model for Optimizer, optimized for modern hardware
- Sargable date and year
- Vector search
Security:
- Pluggable authentication
- Unix socket authentication
- Roles
- Table level encryption (Patch from Google)
- Password validate plugin
- Password expiration and account locking
- ED25519, PARSEC authentication plugins
- Password reuse plugin
- Hashicorp Key Management Plugin
- SSL enabled by default. No configuration necessary.
Replication:
- Group commit with binary log
- Multi-source replication
- Parallel replication
- Enhanced semisync replication
- Multimaster with Galera
- Global transaction id
- Annotated row based events
- Checksums for binlog events
- Binary log checksums calculated during event creation and not during commit. This gives a great performance boost to replication when using checksums.
- Delay slave
- Semi-sync plugin moved inside server which gives notable better performance.
- Lag free ALTER TABLE in replication
Logging:
- EXPLAIN in slow query log
- Engine statistics in slow query log
DDL enhancements:
- Progress reports for ALTER TABLE, CHECK TABLE, etc.
- RETURNING for INSERT, UPDATE and DELETE
- OR REPLACE for CREATE table and other DDL
- ALTER ONLINE TABLE
- INSTANT ADD COLUMN (code from Tencent Games)
- INSTANT DROP COLUMN, MODIFY COLUMN
- CHECK CONSTRAINT
- DECIMAL decimals increased from 30 to 38 (banking requirement)
- CREATE SEQUENCE
- Multiple triggers for same state
- Invisible columns
- Atomic DDL
DML & DQL enhancements:
- SELECT … OFFSET … FETCH
- SELECT … SKIP LOCKED
- Natural sorting
- INSERT, DELETE, REPLACE returning
Other Features:
- Microsecond support for time data types
- Virtual columns
- Non-blocking client API Library
- Shutdown statement
- Improved spatial functions
- Improved GET_LOCK() with timeout in microseconds.
- Window functions
- PERCENTILE_CONT, PERCENTILE_DISC, and MEDIAN window functions
- Common table expressions
- Oracle compatibility (LOTS of functions, PL-SQL compatibility, packages, null handling etc)
- FLASHBACK; Use binary log to roll back data to a previous state. (Contribution by Alibaba)
- JSON functions
- JSON Table
- System versioned tables (known as AS OF or Temporal Tables)
- Table value constructors
- ROW data type
- INet4 and INet6 data type
- UUID data type
- INTERSECT & EXCEPT
- Storage engine independent column compression
- Support for Persistent Memory
- mariadb-backup and backup locks
- sys schema
- SFORMAT for arbitrary text formatting
- Connection redirection
MariaDB also provides LGPL connectors that works with MariaDB Server and MySQL for the following languages:
- C
- C++
- Java 8+
- ODBC
- Python
- Node.js
- R2DBC
- We are also ensuring that the PHP and Perl connectors work with MariaDB Server.
Last, I want to thank all the MariaDB developers, testers, MariaDB employees, MariaDB contributors and users, investors, sponsors, customers, all who have contributed to make MariaDB a successful project.
This has been only the first 15 years and there are many more to come!
May your database always keep running!