Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The MySQL and MariaDB story - Michael "Monty" Widenius - Codemotion Milan 2014

The story of how MySQL was created, why it was successful and how it grow until it was sold to Sun, who was then overtaken by Oracle. It will also cover how and why MariaDB was created and what we are doing to ensure that there will always be a free version of MySQL (under the name of MariaDB). The talk will also explains the challenges we have had to do this fork, especially the merge with MySQL 5.5 and MySQL 5.6 and how we are working with the MariaDB/MySQL community.

  • Be the first to comment

The MySQL and MariaDB story - Michael "Monty" Widenius - Codemotion Milan 2014

  1. 1. The MySQL – MariaDB story The MySQL-MariaDB story Codemotion, November 29, 2014 Michael “Monty” Widenius Entrepreneur, MariaDB hacker monty@mariadb.org http://mariadb.org/ Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  2. 2. Questions addressed in talk 1) Brief MySQL & MariaDB history 2) What challenges did you face in the beginning and how did you overcome them? Eg Convincing early employees to join you, raising seed & venture capital etc. 3) How did you handle the growth of your venture? 4) Liquidity event. 5) End of story (or is it?) 6) Where is MariaDB today 7) Features of the different MariaDB releases 8) Challenges faced while creating MariaDB 9) Reasons for the success Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  3. 3. The origin of My (SQL) At start: Lots of traveling and meeting interesting people Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  4. 4. The origin of My (SQL) Combined with working from home Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  5. 5. The origin of My (SQL) Things were good Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  6. 6. The origin of Max (DB) We also made a MaxDB (based on SAP DB) and MySQL-max Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  7. 7. The origin of My (SQL) Even if there were some growing pains Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  8. 8. The origin of My (SQL) Then we came into strange company Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  9. 9. The origin of My (SQL) Which scared some of us a bit... Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  10. 10. The origin of My (SQL) and Maria (DB) Fortunately there is someone else that can continue Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  11. 11. The origin of My While My continues to travel (And study) Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  12. 12. The origin of Maria (DB) But is the next generation up to it? Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  13. 13. The origin of Maria (DB) It's a hard job taking over a success Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  14. 14. The origin of Maria (DB) Like pulling out a rabbit from a hat Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  15. 15. The origin of Maria (DB) But we are confident we can pull it off Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  16. 16. (Very brief) MySQL history ● Unireg (base of MySQL code) was started 1981. ● MySQL released December 1995 under dual licensing. ● MySQL Finland Ab took in investment and hired Mårten Mickos (2001). ● Made an agreement with SAP and released MaxDB 2003 ● Oracle bought the InnoDB engine 2005. ● MySQL Ab was sold to Sun in March 2008 for 1 billion $ ● Monty & others left Sun in Feb 2009 to work on Maria engine in Monty Program Ab. ● Oracle started to acquire Sun (including MySQL) in April 2009. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  17. 17. (Very brief) MySQL history ● Original MySQL developers starts focusing on MariaDB. ● MariaDB foundation was created in 2012. ● MariaDB is replacing MySQL in most distributions in 2013. ● Monty Program Ab merged with SkySQL in April 2013 ● SkySQL Ab renamed to MariaDB Corporation in October 2014. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  18. 18. Why MySQL was released as Free Software ● David Axmark and Monty had been using Free software for 10 + years and wanted to give something back ● MySQL was our first program suitable for wider usage ● We earned money mainly by doing software development and consulting: ● Releasing MySQL under open source would not harm our income ● We choose to do dual licensing to be able to work full time on MySQL ● Second project with dual licensing (ghostscript was the first) ● After 2 months we where profitable and could spend all time on developing and spreading MySQL. ● Nowadays I am advocating Business Source to companies who wants do create open source products but can't do dual licensing. See http://monty-says.blogspot.com/ Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  19. 19. The challenges of growing ● During 1995 – 2000 we grow from 2 to 15 people ● All developers; No sales people, marketing people or lawyers ● MySQL Ab was a virtual company (no offices) from day 1 ● Getting the MySQL name out ● We were very lucky; Web was emerging and everyone needed a free database ● PHP & Perl developers were spreading the news about MySQL ● Monty wrote more than 30,000 emails helping people with MySQL ● David was visiting conferences; Spent probably more time on airplanes than home ● After the 3'rd year we started to be approached by investors ● Best early offer was 50M USD in 1999 ● However, we didn't want to sell the whole company and “loose all control” at once ● We spent 5 years developing MySQL until “good enough” Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  20. 20. Why the MySQL founders took in investors ● Internal challenges to manage everything with 15 people ● We needed more people to handle support, documentation, administration, HR and sales ● Customers and users were demanding more features ● We needed to hire more developers ● Increased competition from databases like PostgreSQL Three choices: ● Continue as before and grow very slowly ● Sell MySQL (we had already said no to 50M USD) ● Take in investors to: ● Hire a CEO, Mårten Mickos, to drive the company ● Get more resources to do more development ● Get more users and more customers We decided the last one was the best for MySQL long term Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  21. 21. The Sun deal How was it made and what happened at Sun ● When you take in investors, you get money but loose control ● Company will go either public or get sold ● The internal decision was to go public in 2008 ● MySQL Ab had started to fall apart internally since 2005 ● Big chasm between managers in USA and “the rest” ● Monty + group of developers about to leave in Dec 2007 ● MySQL Ab got several offers and Mårten decided we should sell to Sun instead of going public. (I got to know this in Dec 2007) ● Sun deal was, in my opinion, much better than going public: ● Sun did understand development ● Should be able to fix MySQL development organization ● Sun did understand and promote Open Source ● No risk of making part of MySQL closed source Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  22. 22. Why MariaDB was created “Save the People, Save the Product” ● To keep the MySQL talent together ● To ensure that a free version of MySQL always exists ● To get one community developed and maintained branch ● Work with other MySQL forks/branches to share knowhow and code After Oracle announced it wanting to buy Sun & MySQL this got to be even more important. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  23. 23. Monty Program Ab 2009-2013 ● Started in February 2009 after Monty's exit from Sun ● Shifted focus from (M)aria storage engine to MariaDB (A branch of MySQL) after Oracle acquired Sun. ● Did drive (but doesn't own) the MariaDB development ● “Virtual company” (no offices) with about 20 employees all over the world. All original 'core' developers of MySQL are employed. (Full optimizer team, 3 of 4 MySQL architects, etc) ● Very technical company (only development, open source consulting and L3 (bug fix & advanced) support) ● Used the Hacking Business Model ('Company is owned by the employees') ● Merged with SkySQL in April 2013 Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  24. 24. MariaDB Corporation Overview SkySQL Ab renamed to MariaDB Corporation in October 2014 ● Owner of the MariaDB trademark, except for 3 parts which the MariaDB foundation owns. ● Employes +80 people, of which +20 are engineers working on MariaDB and related software (Maxscale, binary slaves etc). ● Have the best MariaDB engineers & most of the MariaDB captains. ● Is for now the biggest driver of the MariaDB project. ● Sells support, subscriptions and tools around MariaDB. (The MariaDB server is guaranteed to always be free software) Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  25. 25. MariaDB Foundation Overview The Foundation is the owner of the main MariaDB server project Custodian of the code, Guardian of the community Foundation can never to be controlled by a single entity or person Note that the Foundation is not about the MariaDB trademark or to decide upon the MariaDB roadmap! The Foundation was created to ensure that anyone can become a contributor to the MariaDB project on equal terms! Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  26. 26. MariaDB Foundation Goals That MariaDB be actively developed in the community and to: ● Increase adoption of MariaDB ● Ensure sustainable high-quality efforts to build, test and distribute MariaDB ● Ensure that community patches are reviewed and adopted ● Guarantee a community voice and define development rules ● Keep MariaDB compatible with MySQL ● Maintain mariadb.org. The MariaDB foundation now employes: ● Management team: Michael Widenius as CTO ● New CEO will start in December ● 3 full time MariaDB developers (including the CTO) ● 1 documentation writer Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  27. 27. MariaDB Foundation members Many of the MariaDB 10.0 features has been developed together with the MariaDB foundation! The foundation are very grateful to it's 2013 and 2014 members, who have made MariaDB 10.0 possible: ● Booking.com ● SkySQL (now MariaDB Corporation) (2 years!) ● Parallels (2 years!) ● Automattic ● Zenimax Additional sponsors can be found on mariadb.org Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  28. 28. MariaDB Foundation More members and sponsors are welcome! If you care about the future of the MySQL ecosystem, please contact us and and ask how you can get involved! Michael Widenius, CTO, monty@mariadb.org Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  29. 29. MariaDB server is a branch of MySQL ● User level (data, API, replication..) compatible with MySQL ● Drop in replacement ● More plugins, more features, faster, better code quality. ● GPL-only server license. ● LGPL C and Java connectors. ● More open development ●Source in public repository on launchpad ●Active external contributors ● All development plans public on mariadb.com Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  30. 30. MariaDB server releases ● MariaDB 5.1 was released in February 2010 ● MariaDB 5.2 was released in November 2010 ● MariaDB 5.3 was released in April 2012 ● MariaDB 5.5 was released in April 2013 ● MariaDB 10.0 was released in March 2014 ● MariaDB 10.1 planned to be gamma/stable in December 2014 ● MariaDB-Galera (multi-master, mesh network) was released as stable (GA) in February 2013 after a lot of testing. ●Galera is an official part of MariaDB 10.1 Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  31. 31. The MariaDB releases ● MariaDB 5.1 (based on MySQL 5.1) ● Better build & test system, code cleanups, community patches, new storage engines, table elimination. ● MariaDB 5.2 (based on MariaDB 5.1) ● Community features that did not go into 5.1: ● Virtual columns ● Extended User Statistics ● Segmented MyISAM key cache (faster multi user!) ● MariaDB 5.3 (based on MariaDB 5.2) ● Optimizer features (faster subquerier, joins etc) ● Microsecond, dynamic columns, faster HANDLER etc. ● Better replication (group commit, more options) ● MariaDB 5.5 (based on MariaDB 5.3 and MySQL 5.5) Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  32. 32. Feedback plugin ● All recent MariaDB versions has the feedback plugin ● Enable by adding “plugin-load=feedback.so” and "enable-feedback” to the [mysqld] section in my.cnf. ● Feedback plugin will automatically send a report (basicly SHOW STATUS)a few minutes after a startup and once a week ● This information is used to decide what features should be developed/expanded upon ● For more information see https://mariadb.com/kb/en/feedback-plugin/ ● For statistics see http://mariadb.org/feedback_plugin/ ● In October 2014 some 5000 people have it enabled and more than 50% is using MariaDB 10.0 Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  33. 33. Feedback plugin Some statistics 5.2 5.3 5.5 10.0 8000 7000 6000 5000 4000 3000 2000 1000 0 Major version of MariaDB in use. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  34. 34. Major new features in MariaDB 5.2 ● SphinxSE: Text search within MariaDB ● Built-in Sphinx client which allows MariaDB to talk to searchd, run search queries, and obtain search results. ● Virtual columns ● Columns that are an expression and are calculated on retrieval. ● Extended User Statistics ● Client, User, Index and Table statistics. ● Segmented MyISAM key cache (see separate slide) ● Pluggable Authentication ● Storage-engine-specific CREATE TABLE ● Fast 'copying to temp table' phase (speeds up GROUP BY and complex queries). ● Group commit & better recovery for the Aria engine. ● Speeds up multi-user inserts. Blue means developed by the community Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  35. 35. MyISAM Segmented key cache ● Blue line is without segmented key cache. ● Solves one of the major read bottlenecks for MyISAM ● We see up to 250% performance gain depending on the amount of concurrent users. ● Fix applies to all MyISAM usage with many readers! Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  36. 36. What's new in MariaDB 5.3 This is the biggest redesign of the MariaDB optimizer in 10 years and it will finally makes subqueries usable in MariaDB. ● Faster subqueries ●Back porting and extending subquery optimization from MySQL 6.0 ●No materialization for many kinds of subqueries or VIEW's in the FROM clause. SELECT * from (SELECT ....) ●Caching of subquery results In applicable cases, you can get 10x – 100x speedups. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  37. 37. What's new in MariaDB 5.3 ● Faster joins (of big tables) thanks to ●Multi-Read-Range (MRR) access (better than in MySQL 5.6) ●Batch key access (BKA) ● Index condition pushdown ●Classic Hash joins Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  38. 38. What's new in MariaDB 5.3 Some common sub queries that are now significantly faster: ● No materialization or materialization with keys: ● SELECT anything FROM (SELECT ....) AS a WHERE a=... ● Caching of common values (Good if outer_ref has a few values) ● SELECT (SELECT ... WHERE outer_ref=xxx) FROM ... ● Transformations ● SELECT * FROM big_table WHERE big_table.col IN (SELECT anything FROM small_table) -> Reorders SELECT:s to use sub query as driving table ● Materialization with keys in temporary table also for WHERE ● SELECT ... WHERE a [NOT] IN (SELECT not-a-key ...) Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  39. 39. What's new in MariaDB 5.3 ● Full microsecond support. This includes TIMESTAMP, TIME DATETIME types, NOW() and all CAST and TIME related functions, replication etc (also in MySQL 5.6) ● Group commit between binary log and storage engines ● FASTER and safer replication (also in MySQL 5.6) ● Progress report (with PUSH method) for ALTER TABLE, LOAD DATA INFILE, REPAIR, OPTIMIZE & ANALYZE. ● Precise GIS operations. ● Windows installer that includes Windows GUI-tool (HeidiSQL) ● For full list, see http://kb.askmonty.org/en/what-is-mariadb- 53 Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  40. 40. Group commit, verified Source: Marc Callaghan's facebook blog for a server with 400 microsecond fsync latency Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  41. 41. Benchmark of new group commit Comparison with MySQL 5.6 ● MySQL 5.6 also removes checkpoint-per-commit ● More complex thread scheduling, less grouping of commits ● Does not remove stall on LOCK_log, less grouping of commits Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  42. 42. MariaDB 5.3 and NoSQL (NaaaSQL) The main reasons for using NoSQL are: ● Handling of unstructured data (not everything is table and fixed number of columns) ● Faster replication (usually with 'unconventional' shortcuts) ● The same way MySQL with it's storage engine interface can handle both transactional and datawarehousing , we are extending MariaDB to be a bridge between SQL and NoSQL. ● MariaDB 5.3 has now even better “NoSQL” support: ● 50 % Faster HANDLER commands; HANDLER READ now also work with prepared statements. ● HandlerSocket compiled in (Direct access to InnoDB) ● Dynamic columns (each row can have different set of columns) Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  43. 43. SQL doesn't solve all common problems The (web) store problem: All items needs: ID, Type, Price, Country, Manufacturer) A T-Shirt has the following additional properties: Size, color... A computer has the following additional properties: CPU, MHz, memory, Watt... There is no easy way to store many different types into a relational database! (It will not work by having one table/types as joins becomes impossible to manage). Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  44. 44. Dynamic columns in MariaDB 5.3 ● With dynamic columns all extra columns are stored in one or many packed blobs, maintained by the database. ● You can instantly add more columns, remove or query them for a row. ● You can access columns in the server or retrieve the full blob to the client and manipulate it there. ● You can use virtual columns to create indexes on some values. ● True indexes for dynamic columns is planned for later. ● Implemented trough functions to enable use by ODBC etc. ● First implementation uses an integer to access columns. ● In MariaDB 10.0 columns can be accessed by name. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  45. 45. Dynamic columns in MariaDB 5.3 ● Simple set of functions (available in server and client): ●COLUMN_CREATE(column_nr, value,[column_nr,....]) ●COLUMN_ADD(blob,column_nr, value, [column_nr,...]) ●COLUMN_DELETE(blob, column_nr, column_nr...); ●COLUMN_EXISTS(blob, column_nr); ●COLUMN_LIST(blob, column_nr); ●COLUMN_GET(blob, column_nr, type); As a proof of concept we have in MariaDB 10.0 created storage engines for Cassandra and LevelDB where we use dynamic columns as a bridge. We are trying to find partners to do same with MongoDB. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  46. 46. New thread pool for 5.5 Thread pool exists in MariaDB 5.5 and the MySQL 5.5 Enterprise edition. It's not in the open source version of MySQL. Thread pools solves a couple of problems: ● Allows you to limit the number of worker threads at your machines peek performance. ● More fair scheduler; Less query time distribution ● If too many queries, machine can run at 1% of peek performance Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  47. 47. New thread pool for 5.5 8 16 32 64 128 256 512 1024 2048 4096 8000 7000 6000 5000 4000 3000 2000 1000 0 Notice: MySQL is a registered trademark of Sun Microsystems, Inc. pool-of-threads thread-per-connection Concurrent Clients OLTP (ro) Throughput, tps
  48. 48. Why MariaDB 10.0 ● MariaDB 5.5 already have more optimizer features than MySQL 5.6 ● MariaDB 5.5 is already a superset of MySQL 5.5. MySQL 5.6 has only a fraction of the MariaDB 5.5 new features. ● A full merge of MySQL 5.6 into MariaDB 5.6 is a one year project as a lot of the code has to be completely rewritten. ● Features and usable code are removed, either intentionally or by mistake ● New code is way to complex (you can do same thing simpler) ● Lots of new introduced bugs we have to get rid of. ● It's clear that some of the new MySQL programmers doesn't understand the current code (see Kristian Nielsen's blog) ● A lot of the new code is re-factoring we don't want to have. → Better to do the merge in several steps into 10.0, 10.1 and 10.2 ● MariaDB 10.1 and 10.2 will have all important features of MySQL 5.6 and some from MySQL 5.7 Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  49. 49. Moving to MariaDB 10.0 MariaDB 10.0 beta should be binary compatible with MySQL 5.6 on: ● Data on disk (Except for some views, which will be fixed shortly) ● Communication on the wire (ie, all MySQL connectors and applications following the MySQL specifications should work with MariaDB) ● Configure options (needs to be verified before gamma) ● SQL Syntax ● Some configure options or optimizations may not be in MariaDB 10.0, but these should only affect performance. Some things will be a lot faster, a few things may be a bit slower in MariaDB than in MySQL. ● We aim to have full compatibility for all important things that MySQL 5.6 supports in MariaDB 10.1 and 10.2. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  50. 50. MariaDB 10.0 MariaDB 10.0 is MariaDB 5.5 + some features from MySQL 5.6 + some new features Features back ported from MySQL 5.6: ● All InnoDB changes ● Performance schema changes ● Read only transaction (significant InnoDB optimization) ● Online ALTER TABLE Features from MySQL 5.6 that are reimplemented: ● Better error message (with system error string) ● NOW() as default value for datetime ● Global transaction ID for replication ● Parallel replication Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  51. 51. New features in MariaDB 10.0 ● SHOW EXPLAIN (see what other thread is doing) (Also in MySQL 5.7) ● Multi source (one slave can have many masters) (Limited in MySQL 5.7) ● Faster ALTER TABLE with UNIQUE index ● DELETE … RETURNING (See what you delete) ● Storage engine for Cassandra ● Storage engine Connect ● Full featured storage engine TokuDB ● Storage engine Spider (automatic sharding) ● Roles (group grant's) ● Much better GIS support (We can run Open Street Map queries) ● Engine independent statistics For full list see https://mariadb.com/kb/en/what-is-mariadb-100/ Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  52. 52. Benefits of MariaDB 10 GTID (Global transaction id) Global transaction ID allows you to easily promote a slave as a new master. Much simpler and more robust design than in MySQL 5.6 or 5.7 ● GTID can be enabled or disabled independently and online for masters or slaves ● In MySQL 5.6 one has to shut down all servers at once and enable GTID mode globally on both masters and slaves ● Slaves using GTID do not have to have binary logging enabled. ● Supports multiple replication domains (independent streams) ● Queries in different domains can be run in parallel ● Guarantees that slave will never have a state that the master didn't have. ● This is optional in MySQL 5.7; Enabling makes things slower ● GTID designs supports multi-source replication Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  53. 53. Benefits of MariaDB 10 Parallel replication ● Multi-source replication from different masters executed in parallel ● Queries from different domains are executed in parallel ● Queries that are run in parallel on the master are run in parallel on the slave (based on group commit). ●Transactions modifying the same table can be updated in parallel on the slave! ● Supports both statement based and row based replication. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  54. 54. Parallel slave benchmark 10x speedup with 12 threads From: http://kristiannielsen.livejournal.com/18435.html Crash safe: --log-slave-updates --sync-binlog=1 --innodb-flush-log-at-trx-commit= 1 Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  55. 55. Parallel slave, no wait Slave performance relative to master slave performance relative to master 1000.0% 900.0% 800.0% 700.0% 600.0% 500.0% 400.0% 300.0% 200.0% 100.0% 0.0% Notice: MySQL is a registered trademark of Sun Microsystems, Inc. slave @ 1 slave @ 2 slave @ 4 slave @ 8 slave @ 16 slave @ 32 slave @ 64 clients Benchmark: sysbench OLTP rw, 64 tables, data fits in memory Master config: trx_commit=1, sync_binlog=1, SBR Slave config: trx_commit=1
  56. 56. Features in MariaDB 10.1 This list of proposed features is still work in progress, and depends on the community and sponsors. You can follow the state at https://mariadb.com/kb/en/what-is-mariadb- 101/ Features already implemented: ● MariaDB 10.1 has moved to github from launchpad ● Galera (multi-master, Mesh network) ● True parallel replication (in testing); Makes slave in some cases faster than the master! ● ANALYZE statement (better EXPLAIN) ● Don't create .frm files for temporary tables (speeds up temporary table creations) ● Improvements from WebScaleSQL Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  57. 57. Features in MariaDB 10.1 ● Disable performance schema by default (gives 1% → 20% speedup) ● Improvements for FusionIO ● Atomic writes ● Real time compression (about 2x space saving) ● Statement timeout (MySQL 5.7 has a more limited version of this) ● Per query values: SET MAX_STATEMENT_TIMEOUT=5 SELECT … ● Compound statement / anonymous blocks ● IF (…) THEN CREATE TABLE … ; END IF ● Added variable default-tmp-storage-engine (From MySQL 5.6) ● SELECT … UNION ALL doesn't require temporary tables (From MySQL 5.7) ● SET DEFAULT ROLE Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  58. 58. Features in MariaDB 10.1 ● Allowing storage engine to shortcut group by queries (In review, for scaledb) ● Speed up connection speed by moving creation of THD to new thread (In testing) ● Automatic discovery of performance schema tables (simpler mysql_install_db code) ● Allow up to 64K pages in InnoDB (old limit was 16K). ● Encrypted columns (any storage engine) and InnoDB data pages (In review). ● mysqld --help --verbose now shows valid values for ENUM variables. ● information_schema.system_variables gives information, like description and value origin, for system variables. ● Optimizations for IBM Power8 architecture. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  59. 59. Features planned for MariaDB 10.x MDEV-6039 Review and apply WebScaleSQL patches (some parts are implemented) MDEV-6089 MySQL WL#7305 "Improve MDL scalability by using lock-free hash" MDEV-4118 Merge Unicode command line client from 5.6 MDEV-4912 Add a plugin to field types (column types) MDEV-5359 CREATE OR REPLACE and CREATE IF NOT EXISTS MDEV-5528 Command line variable to choose MariaDB-5.3 vs MySQL-5.6 temporal formats MDEV-12 OpenGIS: create required tables: GeometryColumns, related views MDEV-13 OpenGIS: stored procedure AddGeometryColumn MDEV-60 Support for Spatial Reference systems for the GIS data Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  60. 60. Features planned for MariaDB 10.x MDEV-4018 Feature Request: microseconds in GET_LOCK() MDEV-4045 Missing OGC Spatial functions MDEV-4412 SLOW QUERY LOG - add affected rows (UPDATE / DELETE) in slow query log MDEV-6069 Remove old logic for 3.23-to-higher upgrades from upgrade SQL scripts MDEV-4691 Kerberize MariaDB -- add Kerberos authentication support to MariaDB MDEV-520 consider parallel replication patch from taobao patches MDEV-5671 Add Table_metadata event MDEV-19 Memory tables: VARCHAR and BLOB support (have sponsor) MDEV-4259 transactional DDL MDEV-6152 Remove calls to current_thd while creating Item (Monty working on this) Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  61. 61. Features open for MariaDB 10.x MDEV-3944 Subquery in FROM clause of a VIEW MDEV-4236 EXIST2IN in any place of the query MDEV-4517 Make possible transformation of queries with aggregate functions during optimization. MDEV-350 self-tuning cost coefficients MDEV-3994 Use CLOCK_MONOTONIC for all pthread_cond_timedwait() MDEV-4263 allow automatic table re-discover MDEV-6113 merge 5.7 innodb and xtradb MDEV-401 Better nested semi-join processing MDEV-4119 Remove duplicate ORDER BY/GROUP BY column references MDEV-4170 Dynamic pushdown of subquery predicates Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  62. 62. Features open for MariaDB 10.x MDEV-5524 Fix "Subqueries: n" in EXPLAIN for condition pushdown MDEV-292 add new log_slow_verbosity values - like in Percona Server MDEV-4904 Add query cache hit information to Percona Response time distribution plugin MDEV-6090 progress report for mysqldump MDEV-5215 Granted to PUBLIC MDEV-83 Cost-based choice for the pushdown of subqueries to joined tables MDEV-307 Add functionality for database comments MDEV-309 reimplement FLUSH ... CHECKPOINT MDEV-371 INDEX - BLOBS - allow index (at least hash index) on blobs MDEV-383 Evaluate subquery predicates earlier or later depending Notice: MySQL is a registered on their trademark SELECTIVITY of Sun Microsystems, Inc.
  63. 63. Features open for MariaDB 10.x MDEV-515 innodb bulk insert MDEV-524 Request: Variable number of arguments in Stored Routines MDEV-525 Request: Local Prepared Statements, prepared from Local Variables MDEV-596 LP:1052950 - Progress report for REPAIR TABLE with MyISAM MDEV-3936 Storage-engine private data area per physical table MDEV-4026 Order by speed optimization MDEV-4034 Enhancement: ALTER TABLE ... REBUILD PARTITION ... blocks all writes to the table, including inserts that would go to other partitions MDEV-4160 Add log_warnings_suppress option MDEV-4205 Make join optimization take into account ORDER BY ... LIMIT Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  64. 64. Features open for MariaDB 10.x MDEV-4261 Use tabledef_version in TABLE_SHARE::get_table_ref_version() MDEV-4641 API for running SQL from inside the server MDEV-4729 Combined ref and range access MDEV-4958 Adding datatype UUID MDEV-4989 Support for GTID in mysqlbinlog MDEV-5199 UDF returning arrays / result set (a.k.a. table UDF) MDEV-5271 engine attributes per partition MDEV-5305 Storage engine API improvements MDEV-5332 Per-database options MDEV-5422 default values not supported in prepared statements MDEV-5662 Slow Query / General Log / Error log rotation MDEV-5800 indexes on virtual (not materialized) columns MDEV-5803 Filter replication by GTID domain ID Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  65. 65. Features planned for MariaDB 10.x MDEV-5834 Defragment tool MDEV-6076 Persistent auto increment for InnoDB MDEV-6115 windowing functions as in the SQL standard MDEV-6122 Don't use records_in_range() for large IN-lists MDEV-6123 Optimization of IN (....) for multi-column comparisons CHECK constraint Minimal RBR replication (from MySQL 5.7) Data dictionary (too speed up SHOW commands), but keep .FRM files to keep tables easily movable and to not depend on one storage engine. As you can see, a lot of things that we would like to do, but we can only do it if we get help or sponorships from the community! Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  66. 66. How you can help ● Help develop features in MariaDB 10.x ● There is a lot of easy thing 'any' C/C++ developer could do ● Help with writing, answering questions or translating documentation in the knowledgebase at https://mariadb.com/kb/en/ ● Be active on the MariaDB email lists (maria-developers@ lists.launchpad.org) ● Spread the word about MariaDB ● Talk about MariaDB in your blogs or at conferences. ● Convince your company to support or become a member in the MariaDB foundation. ● Become a support partner to MariaDB Corporation. You can find information of how to be part of the MariaDB development team at: https://mariadb.com/kb/en/community/ Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  67. 67. New LGPL client libraries ● LGPL client libraries for C and Java ●C is based on the LGPL library from MySQL 3.23 ● API compatible with latest MySQL client libraries. ● Java is based on the drizzle driver. ● LGPL ODBC driver is under development. ● Works with MariaDB, Percona server, MySQL and drizzle ● Developed by Monty Program Ab and SkySQL. ● Announced and released 2012-10-29 You can download these from https://downloads.mariadb.org/ Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  68. 68. MariaDB and TokuDB TokudB is now a native plugin for MariaDB. This means that the official MariaDB binary is able to dynamically load the TokuDB storage engine directly (no patches needed for MariaDB) for all platforms that TokuDB support.. Note that the TokuDB version for MariaDB 5.5 does not have all online features that the original TokuDB version from www.tokutek.com as we didn't want to do big changes in 5.5. The online features is in 10.0. About TokuDB - TokuDB uses Fractal Tree® indexing to improve insert and query speed, compression, replication performance, and online schema flexibility. - TokuDB is created by Tokutek Inc. See www.tokutek.com for details. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  69. 69. Connect storage engine MariaDB 10.0.2 includes the Connect storage engine by Olivier Bertrand. With the connect storage engine you can read, write and update files in a lot of different storage formats: ● Various fixed and dynamic text formats ● .DBF (dBASE format) ● .CSV ● .INI ● .XML ● ODBC ; Table extracted from an application accessible with ODBC; You can for example connect MariaDB to an Oracle database with this. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  70. 70. Challenges with forking MySQL (1) ● Creating a team that can continue and take over MySQL ● Creating free documentation & forums (askmonty.org) ● Creating a free build & test environment (buildbot) ● Competing against a well know trademark (MySQL) ● Visiting most open source trade shows ●Working with OS distributions to get MariaDB ● Keeping up with MySQL development ● Lots of bugs found while doing monthly merges ● Merging MariaDB 5.3 and MySQL 5.5 took 6 months ● Adding new “must have” features (in MariaDB 5.3/5.5) ● Creating a developer community ● Relatively easy as Oracle is not working with the community to get in their patches or handle their bugs Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  71. 71. Challenges with forking MySQL (2) ● Finding a business model not based on licensing ●Developer support (for advanced MySQL users) ● Third level support via partners like SkySQL ●Getting paid for adding features to MariaDB/MySQL ● No paying customers for the first 3 years ● All major paying customers bought 3-5 year contracts to protect against price increases from Oracle ● Things changed after the MariaDB foundation was created and Monty Program merged with SkySQL. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  72. 72. MariaDB/MySQL/SQL99 documentation at mariadb.com/kb The knowledgebase allows you to: ● Find answers to your problems ● Ask questions and get answers from others ● Add your own documentation or help with translations Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  73. 73. There are a lot of others involved ● Most features in MariaDB 5.2 were contributed by the community! ● Many of the advanced features in MariaDB 5.3 are sponsored features ● In the mariadb.com knowledge base (free MariaDB and MySQL documentation) we have now 3000 (mostly English) articles Statistics from the March 2014: ● Added/Changed Articles: 262 ● On Freenode #maria, 550 people wrote 10173 lines ● Launchpad Activity (note that 10.1 is in github): ● 25 active branches ● 395 commits ● Hundreds of thousands of downloads of MariaDB. Probably >> 2M users ● Google has employed people to work on MariaDB. Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  74. 74. Predicted MySQL usage 2009 2011 2012 2014 2014 2017 90 80 70 60 50 40 30 20 10 0 Notice: MySQL is a registered trademark of Sun Microsystems, Inc. MySQL forks Survey 2012 Survey 2009 % Based on 451 Research surveys Sample 285/205 users The 451 group predicts that by 2015 MariaDB will have 50% of MySQL userbase
  75. 75. MariaDB popularity is increasing ● In December 2012 ● Wikipedia announced they are moving to MariaDB. ● In January-March 2013 ● DB at Mozilla blogged they have moved to MariaDB ● Fedora voted 7-0 to make MariaDB the default MySQL database ● OpenSuse 12.3 included MariaDB as default. ● Slackware, Chakra Linux and Arch Linux has MariaDB as default. ● In April 2013 ● Google is basing their new SQL offerings on MariaDB ● FusionIO is showing benchmarks with MariaDB. ● June 2013 ● RedHat announced it will include MariaDB in RedHat Enterprise. ● December 2013 ● MariaDB was added to Debian and later included in Ubuntu ● 2014 ● RedHat Enterprise Linux 7, Suse Enterprise and Oracle unbreakable Linux has MariaDB as default Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  76. 76. Reasons to switch to MariaDB today ● MariaDB has 20 man years of more development than MySQL (and the gap will continue growing). ● MariaDB is maintained by the people that originally created MySQL and has the best knowledge of the MySQL code. ● MariaDB is binary compatible (data and API) with MySQL, so its trivial to replace MySQL with MariaDB (minutes). ● Reasons to switch to MariaDB ● Faster queries thanks to XtraDB (InnoDB plugin fork from Percona), TokuDB, a much better optimizer, better replication and better code. ● Open source development: Anyone can be part of the development at all stages. Developer meetings are public! ● More features, including critical ones like true parallel replication, better statistics, dynamic columns and TokuDB & Cassandra storage engines. ● Less risk as MariaDB will not remove features like MySQL is doing (thread pool, storage engines, safemalloc (developer feature), older OS) Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  77. 77. Summary: What made MySQL successful? ● We where using it (for data warehousing and web) ● Internet was new and everyone needed a web-optimized DB ● “Virtual company” made it easy to find good people ● New “free” license scheme (this was before Open Source) ● Free for most, a few have to pay ● Second program (ghostscript was first) to use dual licensing, MySQL first to do it with GPL. ● Very easy to install and use (15 minute rule) ● Released source and tested binaries for most platforms ● Friendly and helpful towards community ● I personally wrote 30,000+ emails during the first 5 years to help people with using MySQL ● Waited with investments until product was “good enough” Needed, stable and easy to use product with right price Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  78. 78. MariaDB 10.0 was made possible thanks to ● Oracle ● Updated InnoDB, Updated Performance schema, online alter table ● SkySQL ● Global Transaction Id, Parallel replication, Engine independent statistics, DELETE RETURNING, Cassandra engine, GIS support, QA ● MariaDB Foundation ● Merge of MySQL 5.6, reviews of community patches, builds, speed optimizations, new character sets ● The MariaDB Community. Some bigger contributors: ● CONNECT ENGINE by Olivier Bertrand ● Spider by Kentoku Shiba ● Multi-source replication, by Lixun Peng @ taobao ● Google, through Google summer of code ● Roles by Vicențiu Ciorbaru ● Move to new regexp library (PRCE) by Sudheera Palihakkara Notice: MySQL is a registered trademark of Sun Microsystems, Inc.
  79. 79. Questions ? For questions later, use the public MariaDB email list at maria-discuss@lists.launchpad.net or #maria on Freenode. For questions regarding the MariaDB foundation: monty@mariadb.org Notice: MySQL is a registered trademark of Sun Microsystems, Inc.

    Be the first to comment

    Login to see the comments

  • jigen79

    Jan. 27, 2015
  • fox91fox

    Apr. 25, 2015
  • yoku0825

    Jun. 10, 2016
  • AdrianGanea

    May. 22, 2018
  • FedericoRazzoli

    Oct. 12, 2019
  • DaveTurchin

    Dec. 5, 2019
  • DanielServant2

    Mar. 5, 2020

The story of how MySQL was created, why it was successful and how it grow until it was sold to Sun, who was then overtaken by Oracle. It will also cover how and why MariaDB was created and what we are doing to ensure that there will always be a free version of MySQL (under the name of MariaDB). The talk will also explains the challenges we have had to do this fork, especially the merge with MySQL 5.5 and MySQL 5.6 and how we are working with the MariaDB/MySQL community.

Views

Total views

7,623

On Slideshare

0

From embeds

0

Number of embeds

2,879

Actions

Downloads

47

Shares

0

Comments

0

Likes

7

×