Mysql Vs Mariadb Where Are We Now? Hey! a BRIEF HISTORY of the UNIVERSE
Total Page:16
File Type:pdf, Size:1020Kb
MySQL vs MariaDB Where are we now? Hey! A BRIEF HISTORY OF THE UNIVERSE (of MySQL and MariaDB) #cPConf Herman Hollerith #cPConf Unireg Begins Essentially, the origin of what we know MySQL as today, establishing its code base. 1981 (~1979) #cPConf Unireg Begins 1995 Essentially, the origin of what we know MySQL as today, establishing its code base. MySQL is released In 1995, MySQL was first released for usage under dual licensing. 1981 (~1979) #cPConf Unireg Begins 1995 MySQL Goes Open Essentially, the origin The MySQL platform of what we know goes Open Source, MySQL as today, and begins to follow establishing its code the terms of the GPL. base. MySQL is released In 1995, MySQL was first released for usage under dual licensing. 1981 2000 (~1979) #cPConf Unireg Begins 1995 MySQL Goes Open 2008 Essentially, the origin The MySQL platform of what we know goes Open Source, MySQL as today, and begins to follow establishing its code the terms of the GPL. base. MySQL is released Sun Acquires MySQL In 1995, MySQL was Sun Microsystems first released for purchases MySQL AB usage under dual for $1 billion (only to licensing. be acquired by Oracle in 2009 for $7.4 billion) 1981 2000 (~1979) #cPConf MariaDB is founded Unireg Begins 1995 MySQL Goes Open 2008 As Oracle begins drifting Essentially, the origin The MySQL platform further away from open of what we know goes Open Source, source, Monty founds MySQL as today, and begins to follow MariaDB designed as a establishing its code the terms of the GPL. pluggable replacement. base. MySQL is released Sun Acquires MySQL In 1995, MySQL was Sun Microsystems first released for purchases MySQL AB usage under dual for $1 billion (only to licensing. be acquired by Oracle in 2009 for $7.4 billion) 1981 2000 2009 (~1979) #cPConf MariaDB is founded Unireg Begins 1995 MySQL Goes Open 2008 2015 As Oracle begins drifting Essentially, the origin The MySQL platform further away from open of what we know goes Open Source, source, Monty founds MySQL as today, and begins to follow MariaDB designed as a establishing its code the terms of the GPL. pluggable replacement. base. MySQL is released Sun Acquires MySQL cPanel-supported In 1995, MySQL was Sun Microsystems In response to industry first released for purchases MySQL AB shifts indicating a move usage under dual for $1 billion (only to towards MariaDB, cPanel licensing. be acquired by Oracle officially introduced in 2009 for $7.4 billion) support for it into the 11.48 release. 1981 2000 2009 (~1979) #cPConf MariaDB is founded The battle continues Unireg Begins 1995 MySQL Goes Open 2008 2015 As Oracle begins drifting While MariaDB made Essentially, the origin The MySQL platform further away from open major progress for the of what we know goes Open Source, source, Monty founds industry, MySQL 5.7 MySQL as today, and begins to follow MariaDB designed as a and 8.0 have brought establishing its code the terms of the GPL. pluggable replacement. new drive to the base. competition. MySQL is released Sun Acquires MySQL cPanel-supported In 1995, MySQL was Sun Microsystems In response to industry first released for purchases MySQL AB shifts indicating a move usage under dual for $1 billion (only to towards MariaDB, cPanel licensing. be acquired by Oracle officially introduced in 2009 for $7.4 billion) support for it into the 11.48 release. 1981 2000 2009 Now & (~1979) Later #cPConf WHAT’S THE DIFFERENCE? #cPConf MySQL 5.7 MARIADB 10.2 JSON DATATYPE JSON DATATYPE (KIND ENGINE IMPROVEMENTS ENGINE IMPROVEMENTS SECURITY IMPROVEMENTS SECURITY IMPROVEMENTS ADDED SYNTAX/QUERIES ADDED SYNTAX/QUERIES #cPConf MySQL 5.7 MARIADB 10.2 JSON DATATYPE JSON DATATYPE (KIND Stores data in binary Stores data as LONGTEXT SELECT JSON_EXTRACT(c, “$.id”) 25 JSON functions 26 JSON functions SELECT c->"$.id" JSON_PRETTY JSON_STORAGE_ JSON_COMPAC JSON_DETAILE JSON_MERGE_PATC JSON_MERGE_PRE JSON_EXISTS JSON_LOOSE -> ->> JSON_QUERY JSON_VALUE JSON_EXTRACT JSON_UNQUOTE(JSON_EX #cPConf MySQL 5.7 MARIADB 10.2 ENGINE IMPROVEMENTS ENGINE IMPROVEMENTS mysql> SHOW STATUS WHERE Variable_name='InnoDB_buffer_pool_resize_status'; +----------------------------------+----------------------------------+InnoDB | Variable_name | Value | +----------------------------------+----------------------------------+ DDL Performance Smart Doublewrite | Innodb_buffer_pool_resize_status | Resizing also other hash tables. | Dynamic+----------------------------------+----------------------------------+ Buffer Pool More Transportable MyISAM #cPConf MySQL 5.7 MARIADB 10.2 ENGINE IMPROVEMENTS ENGINE IMPROVEMENTS InnoDB InnoDB DDL Performance Smart Doublewrite InnoDB as Default Improved Crash Dynamic Buffer Pool More Transportable Spatial Indexes Recovery MyISAM #cPConf MySQL 5.7 MARIADB 10.2 ENGINEkey_cache_segments IMPROVEMENTS ENGINE IMPROVEMENTS •Description: The number of segments in a key cache. InnoDB InnoDB •Commandline: --key-cache-segments=# DDL •PerformanceScope: GlobalSmart Doublewrite InnoDB as Default Improved Crash Dynamic•Dynamic: Buffer Pool More Yes Transportable Spatial Indexes Recovery •Type: numeric MyISAM MyISAM •Default Value: 0 (non-segmented) Segmented Key Caching •Range: 0 to 64 Adjustable Hash Size #cPConf MySQL 5.7 MARIADB 10.2 ENGINE IMPROVEMENTS ENGINE IMPROVEMENTS mysql> SHOW STATUS WHERE Variable_name='InnoDB_buffer_pool_resize_status'; +----------------------------------+----------------------------------+InnoDB InnoDB | Variable_name | Value | +----------------------------------+----------------------------------+ DDL Performance Smart Doublewrite | Innodb_buffer_pool_resize_status | Resizing also otherMyISAM hash tables. | Dynamic+----------------------------------+----------------------------------+ Buffer Pool More Transportable MyRocks MyISAM Aria CONNECT MongoDB #cPConf MySQL 5.7 MARIADB 10.2 SECURITY IMPROVEMENTSCommand-Line Format SECURITY IMPROVEMENTS --require-secure-transport[={OFF|ON}] “Secure byIntroduced: Default” 5.7.8 SystemRequire Secure Variable: require_secure_transport Single Root Transport Scope: Global User table constraintsDynamic: Yes Type: Boolean Default Value: OFF #cPConf MySQL 5.7 MARIADB 10.2 SECURITY IMPROVEMENTSCommand-Line Format SECURITY IMPROVEMENTS --require-secure-transport[={OFF|ON}] “Secure byIntroduced: Default” 5.7.8 ed25519 SystemRequire Secure Variable: require_secure_transport Single Root Transport OpenSSL 1.1 & LibreSSL Scope: Global Dynamic: Yes User table constraints AWS Key Management Type: Boolean Default Value: OFF #cPConf MySQL 5.7 MARIADB 10.2 ADDED SYNTAX/QUERIES ADDED SYNTAX/QUERIES MySQL [(none)]>EXPLAIN explain for connection 1; +----+-------------+--------+------+---------------+------+---------+------+--------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | No+----+-------------+--------+------+---------------+------+---------+------+--------+-------------+ Temp Tables on UNION ALL | 1 | SIMPLE | orders | ALL | NULL | NULL | NULL | NULL | 922880 | Using where | +----+-------------+--------+------+---------------+------+---------+------+--------+-------------+ #cPConf MySQL 5.7 MARIADB 10.2 ADDED SYNTAX/QUERIES ADDED SYNTAX/QUERIES SHOW CREATE USER foo4@test\G *************************** 1. row *************************** SHOW CREATE USER CREATE EXPLAINUSER 'foo4'@'test' REQUIRE ISSUER 'foo_issuer' No SUBJECTTemp Tables 'foo_subject' on UNION ALL CHECK CONSTRAINT CIPHER 'text' FOLLOWS/PRECEDES #cPConf SO WHAT’S THE PUBLIC DOING? #cPConf #cPConf #cPConf DROPPING IN? #cPConf THE RISK OF MOVING TO MARIADB SERVER IF YOU AREN’T USING NEWER MYSQL FEATURES MAY BE MINIMAL, BUT THE RISK OF MOVING OUT OF MARIADB SERVER TO MYSQL IS VERY PREVALENT. Percona https://www.percona.com/blog/2017/11/02/mysql-vs-mariadb-reality-check/ #cPConf It depends… MYSQL MARIADB 5.5 5.5 5.6 10.0 5.7 10.1 8.0 10.2 10.3 10.4? #cPConf 5.7 -> 10.1 Incompatibilities • MariaDB 10.1 does not support MySQL 5.7's online undo tablespace truncation. However, this feature was added to MariaDB 10.2. • MariaDB 10.1 does not support MySQL 5.7's transportable tablespaces for partitioned InnoDB tables. ALTER TABLE ... {DISCARD|IMPORT} PARTITION is not supported. • MariaDB 10.1 does not support the use of multiple triggers of the same type for a table. This feature was introduced in MariaDB 10.2.2. #cPConf 5.7 -> 10.2 Incompatibilities • MariaDB 10.2 does not support MySQL's SELECT MAX_STATEMENT_TIME = N ... syntax • MariaDB 10.2 does not support MySQL 5.7's “native” InnoDB partitioning handler. • MariaDB 10.2 does not support the MySQL X plugin. • MariaDB 10.2 does not support the MySQL Memcached plugin. • Users created with MySQL's SHA256 password algorithm cannot be used in MariaDB 10.2. • MariaDB's GTID is not compatible with MySQL's. #cPConf mysql> SHOW STATUS WHERE Variable_name='InnoDB_buffer_pool_resize_status'; +----------------------------------+----------------------------------+ | Variable_name | Value | +----------------------------------+----------------------------------+ | Innodb_buffer_pool_resize_status | Resizing also other hash tables. | +----------------------------------+----------------------------------+ #cPConf What’d you think? events.bizzabo.com/polls/011721 Rate this presentation on the Conference app or by navigating to the above link in your browser. Or, without the app: events.bizzabo.com/polls/011721 #cPConf.