Before we begin… ● I dislike “wall of text” slide presentations, but that's what this is, sorry about that ● I am not a “big time” DBA or a developer, so… – Likely unable to answer in-depth questions ● Covering a lot of ground, so… – Lots of links – http://speakerdeck.com/dbart
What is MariaDB? ● MySQL was named after Monty's oldest daughter, My, MariaDB named after his youngest. ● Community developed branch/fork/evolution of MySQL ● Additional features, storage engines, plugins ● Goal is to be compatible & feature complete with MySQL ● 5 years old! – Project started in early 2009 – First stable (GA) release: 1 Feb 2010
Backed by MariaDB Foundation ● Driver of the MariaDB project ● Foundation not controlled by a single entity or person; has an independent board ● Ensures MariaDB is compatible with MySQL, maintains mariadb.org, keeps community voice ● Major sponsors: MariaDB Corp, Parallels, Booking.com, Automattic, OpenQuery, Percona, Webyog, others…
Aims of MariaDB ● Compatible, drop-in replacement of MySQL – Data on disk & on the wire is the same – Same file names, sockets, port, etc… ● Stable (bug-free) releases with no regressions ● GPLv2, just like Linux kernel ● No closed source “enterprise only” features
MariaDB Popularity ● Wikipedia (English, German), Wikidata run MariaDB – http://blog.wikimedia.org/2013/04/22/wikipedia-adopts-mariadb/ ● Google, Tumblr, SpamExperts, Nimbuzz, Web of Trust, FictionPress, & many others, use MariaDB ● Fedora, OpenSUSE, Suse, Red Hat shipping MariaDB as a default – Slackware, Chakra, Arch, Mageia, others also – Available as alternative in Debian & Ubuntu ● Many success stories: – https://mariadb.com/kb/en/mariadb/case-studies/
Well supported ● Everyone supports MariaDB from a consulting & support standpoint – MariaDB Corp, Percona, etc… ● Jelastic offers MariaDB as PaaS – http://docs.jelastic.com/connection-to-mariadb ● MariaDB in Ubuntu Juju Charm Store – https://jujucharms.com/mariadb/ ● Many different Docker containers, Amazon AMIs, Chef cookbooks, Puppet modules, & etc… ● All stable (GA) releases supported for 5 years (security & bug fixes, and etc…)
Well supported ● Everyone supports MariaDB from a consulting & support standpoint (except Oracle) – MariaDB Corp, Percona, etc… ● Jelastic offers MariaDB as PaaS – http://docs.jelastic.com/connection-to-mariadb ● MariaDB in Ubuntu Juju Charm Store – https://jujucharms.com/mariadb/ ● Many different Docker containers, Amazon AMIs, Chef cookbooks, Puppet modules, & etc… ● All stable (GA) releases supported for 5 years (security & bug fixes, and etc…)
Where to get MariaDB ● Probably already in your distribution's package repository (esp. if you're using a recent release) – 5.5 in some, 10.0 in others ● https://downloads.mariadb.org/ – Official location for latest MariaDB releases – Repositories (apt & yum), generic binary releases, Windows packages, repository configuration tool
10.1 – WebScaleSQL ● Many individual patches – https://mariadb.atlassian.net/browse/MDEV-6039 ● Several of them also backported to 10.0 – …when they were fixing bugs & not changing behavior
10.1 – Galera Cluster ● Full integration of Galera Cluster 4 into MariaDB 10.1 – not a separate download – No lost transactions – Optimisations for WAN replication – Non-blocking DDL – No limits on transaction size ● wsrep_membership & wsrep_status Information Schema tables ● https://mariadb.com/kb/en/mariadb-galera-cluster/
10.1 – Encryption ● Table & Tablespace encryption with support for rolling keys using the AES algorithm – Table encryption: PAGE_ENCRYPTION=1 – Tablespace encryption: encrypts everything including log files (but not the binlog) ● Encryption overhead of ~10% ● XtraDB/InnoDB only; w/ Aria for temp tables ● New file_key_management plugin ● https://mariadb.com/kb/en/table-encryption/
10.1 – Optimistic parallel replication ● Before, only transactions committed in parallel on the master could be run in parallel on slaves ● Now, when replicating multiple transactions, they will be considered to be run in parallel, giving a performance boost in master-to-slave replication ● https://mariadb.atlassian.net/browse/MDEV-6676 ● https://mariadb.com/kb/en/parallel-replication/#optimis tic-mode-of-in-order-parallel-replication
10.1 – InnoDB cont… ● Defragmentation (from Facebook, ported by DaumKakao) – https://mariadb.com/kb/en/defragmenting-innodb- tablespaces/ ● Forced primary key – If option is true, creating a table without a primary key or unique key where all keyparts are NOT NULL is not allowed, instead an error message is printed – https://mariadb.atlassian.net/browse/MDEV-5335 – https://mariadb.com/kb/en/xtradbinnodb-server-sy stem-variables/#innodb_force_primary_key
10.1 – Per query variables ● Port from Percona Server – https://mariadb.atlassian.net/browse/MDEV-5231 ● History: – http://www.bytebot.net/blog/archives/2014/05/04/p er-query-variable-settings-in-mysqlpercona-server webscalesql ● Example: – SET STATEMENT max_statement_time=1000 FOR SELECT name FROM name ORDER BY name;
10.1 – Optimizer ● UNION ALL without temporary tables (5.7) – https://mariadb.com/kb/en/union/ ● Improve ORDER BY in optimizer – https://mariadb.com/kb/en/improvements-to-order-by/ ● EXPLAIN JSON (like 5.6) – https://mariadb.com/kb/en/explain-format-json/ – https://mariadb.com/kb/en/explain-format-json-differences/ ● EXPLAIN ANALYZE with FORMAT=JSON – Includes data from the query execution itself – MariaDB only – https://mariadb.com/kb/en/analyze-format-json/
10.1 – Passwords ● Password validation plugin API – https://mariadb.com/kb/en/password-validation/ ● simple_password_check plugin – Can enforce a minimum password length and guarantee that a password contains at least a specified number of upper and lowercase letters, digits, and punctuation characters – https://mariadb.com/kb/en/simple_password_check/ ● cracklib_password_check plugin – Allows passwords that are strong enough to pass the CrackLib test (same test that pam_cracklib.so does) – https://mariadb.com/kb/en/cracklib_password_check/
10.1 – GIS ● Full compliance for the OGC standards around GIS – https://mariadb.com/kb/en/what-is-mariadb-101/#gis ● MariaDB GIS is now OpenGIS compliant, and passes all the OpenGIS conformance tests – https://mariadb.atlassian.net/browse/MDEV-7509
10.1 – Other bits ● Slaves can execute triggers w/ row-based replication – https://mariadb.atlassian.net/browse/MDEV-5095 ● CONNECT has full JSON/BSON support – https://mariadb.com/kb/en/connect/ ● CREATE or REPLACE for most database objects minus indexes – https://mariadb.atlassian.net/browse/MDEV-5359 ● SET DEFAULT ROLE (there is a default role for current user) – https://mariadb.atlassian.net/browse/MDEV-4397 ● Kerberos authentication plugin – https://mariadb.atlassian.net/browse/MDEV-4691
10.1 – Other bits cont… ● FRM files are now not created for temporary tables – https://mariadb.atlassian.net/browse/MDEV-4260 ● INFORMATION_SCHEMA.SYSTEM_VARIABLES – https://mariadb.atlassian.net/browse/MDEV-6138 – https://mariadb.com/kb/en/information-schema-system_ variables-table/ ● Compiled with security hardening options, fortify source – https://mariadb.atlassian.net/browse/MDEV-5730 ● @@sql_log_slow can now be controlled on a session basis (not just globally)
10.1 – Other bits cont… ● Audit plugin to track password changes – https://mariadb.com/kb/en/mariadb-audit-plugin/ ● Ipv6/Ipv4 datatype (pending review) – https://mariadb.atlassian.net/browse/MDEV-274 ● Additional character sets (GB18030) for Chinese government mandate (pending review) – https://mariadb.atlassian.net/browse/MDEV-7495 ● Overview of new status & system variables in 10.1: – https://mariadb.com/kb/en/system-variables-added-in-mariadb-101/ – https://mariadb.com/kb/en/status-variables-added-in-mariadb-101/
10.1 – Compatibility ● Temporary tables are stored in Aria but now there is a --default-tmp-storage-engine option – https://mariadb.atlassian.net/browse/MDEV-6107 ● engine_condition_pushdown flag removed (it's always on for engines that support it) – https://mariadb.atlassian.net/browse/MDEV-6513 ● --mysql56-temporal-format option to use the MySQL 5.6 low level formats to store TIME, DATETIME, and TIMESTAMP types – https://mariadb.com/kb/en/server-system-variables/#mysql56_te mporal_format ● PERFORMANCE_SCHEMA disabled by default (like in 10.0) – https://mariadb.com/kb/en/performance-schema/
10.1 – How to get it ● https://downloads.mariadb.org ● Not listed in the repository configurator – https://downloads.mariadb.org/mariadb/repositories/ – People were installing it in production when it was still alpha! – Now partially hidden to help save people from themselves – Choose MariaDB 10.0, then in the instructions, replace 10.0 with 10.1 – Will be added to the configuration tool when it reaches gamma (release candidate) stage
Feedback plugin ● Disabled by default, consider enabling it to show use! – https://mariadb.com/kb/en/feedback-plugin/ – Collected data: http://mariadb.org/feedback_plugin ● Data from over 150 countries! ● But only ~6000 servers actively uploading data, most of them Windows (so not many production servers) ● Can also be used for internal statistics gathering (with feedback-url option)
Online Resources ● Knowledge Base: – https://mariadb.com/kb ● JIRA (bug/dev tracker): – http://mariadb.org/jira ● Code: – All dev trees are now on GitHub – https://github.com/MariaDB/server