SlideShare a Scribd company logo
www.fromdual.com
1 / 25
MariaDB 10.4
New Features
DOAG K&A 2019, Nürnberg (Germany)
Oli Sennhauser
Senior MariaDB and MySQL Consultant at FromDual GmbH
https://www.fromdual.com/presentations
www.fromdual.com
2 / 25
About FromDual GmbH
Enterprise Support
remote-DBA
Training
Consulting
www.fromdual.com
3 / 25
Contents
HA Solutions
➢
Read scale-out
➢
Replication set-up for HA
➢
Active/passive fail-over
➢
MySQL Cluster
➢
Replication Cluster
➢
Storage-Engine-Replication
MariaDB 10.4 – New Features
➢
Branches and Forks
➢
MariaDB and Linux Distributions
➢
Authentication
➢
InnoDB
➢
MariaDB Optimizer
➢
Application-Time Period Tables
➢
General Stuff
➢
Backup Stage
➢
Galera 4
➢
Outlook MariaDB 10.5
www.fromdual.com
4 / 25
Branches and Forks
5.1
5.5
2010
Branch (“Drop-in-Replacement”)
MariaDB MySQL
●
MariaDB and MySQL are Open Source (GPL v2)
●
This means everybody is allowed to DiY
●
→ Branches and Forks
●
Who uses a MariaDB/MySQL in here?
●
Chaos will happen! :-(
●
See Sybase ASE vs. MicroSoft SQL Server (1995(v6.0)-2005)
●
Examples: GTID, Protocol X, MariaDB CS, Virtual Columns,
JSON, User Management, Group Replication, PL/SQL, etc.
2008
Fork (“Compatible”)
5.6, 2013
5.7, 2015
8.0, 2018
10.0, 2014
10.1, 2015
10.2, 2017
10.3, 2018
10.4, 2019
10.5, 2020
www.fromdual.com
5 / 25
MariaDB and Linux Distros
●
Redhat/CentOS:
●
6 → MySQL 5.1
●
7 → MariaDB 5.5
●
8 → MariaDB 10.3, MySQL 8.0
●
Ubuntu:
●
16.04 → MySQL 5.7
●
18.04 → MySQL 5.7 (MariaDB 10.1)
●
20.04 → ? (Ubuntu 19.10: MySQL 8.0 (MariaDB 10.3))
●
Debian:
●
8 → MySQL 5.5
●
9 → MariaDB 10.1
●
10 → MariaDB 10.3
●
SuSE SLE / OpenSuSE:
●
12 → MariaDB 10.0
●
15 → MariaDB 10.2
●
Leap 42 → MariaDB 10.0, Leap 15, → MariaDB 10.2
www.fromdual.com
6 / 25
MariaDB IPO
IPO 2020 ???
www.fromdual.com
7 / 25
Retrospect MariaDB 10.3
●
GA May 2018
●
Invisible Columns
●
System-versioned Tables
●
Instant ADD COLUMN
●
Storage Engine independent Column Compression
●
Semi-synchronous Replication Built-in (before Plug-in)
●
PROXY Protocol Support (Galera/HAproxy)
●
Optimizer Improvements (SQL Performance)
●
Aggregate Stored Functions (DWH, MariaDB Column Store)
●
Oracle Compatibility (sql_mode = ORACLE)
●
Oracle PL/SQL Packages, Oracle Style Sequences
●
and many, many more...
www.fromdual.com
8 / 25
MariaDB 10.4 - Overview
●
GA June 2019 (10.4.6)
●
→ wait 6 – 12 months for production (mid 2020)!
●
Still very poor quality (especially Galera 4!)
●
Regression in 10.4.9 (5. 11. 2019)
●
Remember MySQL IPO plan 2005: 5.0 was
“worst release ever”
●
Cloud… (IPO?)
●
Standard compliant (IPO?)
●
More feature complete
www.fromdual.com
9 / 25
Authentication
●
unix_socket authentication is default!
●
Access if O/S user = DB user
●
New DB user: mysql
●
User Password Expiry:
ALTER USER 'oli'@'localhost'
PASSWORD EXPIRE INTERVAL 90 DAY;
●
Account Locking:
ALTER USER 'oli'@'localhost' ACCOUNT LOCK;
●
Table mysql.user is retired!!!
●
→ Can break Admin Applications...
●
New: mysql.global_priv Table
●
More than 1 authentication plugin possible
●
→ slowly migrate users to more secure authentication
● CREATE USER admin@localhost IDENTIFIED VIA unix_socket OR
mysql_native_password USING 'secret';
www.fromdual.com
10 / 25
InnoDB
●
Instant DROP COLUMN operation
●
Changing of column order
●
More Instant operations (VARCHAR, collation and character set)
●
Improvements in Index DDL
● RENAME INDEX
●
Merge InnoDB changes from “upstream”
●
InnoDB row length count fixed (10.4.7)
●
Leads to errors:
[Warning] InnoDB: Cannot add field `thumbnails` in
table `test`.`products` because after adding it,
the row size is 8702 which is greater than maximum
allowed size (8126) for a record on index leaf
page.
www.fromdual.com
11 / 25
InnoDB Instant DDL
ALTER TABLE test
ADD COLUMN d BIGINT
/*!100400 , ALGORITHM=INSTANT */;
Query OK, 0 rows affected (0.247 sec)
ALTER TABLE test MODIFY COLUMN
c BIGINT(20) DEFAULT NULL AFTER d
/*!100400 , ALGORITHM=INSTANT */;
Query OK, 0 rows affected (0.072 sec)
www.fromdual.com
12 / 25
Optimizer
●
Optimizer Trace:
● SET SESSION optimizer_trace=’enabled=on’;
● I_S.optimizer_trace
●
SE Independent Table Statistics
●
Histogram collection by default
●
Improved Condition Pushdown Optimization
● SELECT … WHERE xxx AND ... IN (<subquery>)
●
Automatic optimized use of Join Buffer
●
Exists since 5.3.0 but was disabled :-(
●
Rowid Filtering Optimization
● WHERE a.date BETWEEN '2018-01-01' AND '2018-01-31'
AND b.price between 200000 and 230000;
●
But...
www.fromdual.com
13 / 25
Optimizer – Query Runtime
5.5.41 10.0.28 10.1.29 10.2.14 10.3.18 10.4.8
Query 1 3.03 3.17 3.36 3.29 3.38 3.57
Query 2 0.20 0.20 0.20 0.19 0.19 0.21
Query 3 2.41 2.40 2.51 3.27 3.92 4.44
Query 1 Query 2 Query 3
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
MariaDB Optimizer - Over time
5.5.41
10.0.28
10.1.29
10.2.14
10.3.18
10.4.8
www.fromdual.com
14 / 25
Optimizer Trace
SQL> SET SESSION optimizer_trace=’enabled=on’;
SQL> EXPLAIN SELECT * FROM test WHERE id <10;
SQL> SELECT trace
FROM information_schema.optimizer_trace;
…
"steps": [
{
"condition_processing": {
"condition": "WHERE",
"original_condition": "test.`id` < 10",
"steps": [
{
"transformation": "equality_propagation",
"resulting_condition": "test.`id` < 10"
},
{
"transformation": "constant_propagation",
"resulting_condition": "test.`id` < 10"
},
{
"transformation": "trivial_condition_removal",
"resulting_condition": "test.`id` < 10"
}
]
}
},
…
www.fromdual.com
15 / 25
Application-Time Period Tables
●
ISO/IEC 9075, SQL:2011 Part 2
●
MariaDB 10.3: System Versioned Tables
●
Journal/Tracking of an Item.
●
AUTO_INCREMENT ID is NO good plan!
CREATE TABLE employee (
ID INT UNSIGNED NOT NULL
, Start DATE
, End DATE
, Department VARCHAR(32)
, Position VARCHAR(32)
, PRIMARY KEY (ID, Start, End)
, PERIOD FOR Period (Start, End)
);
www.fromdual.com
16 / 25
Lend Employee
UPDATE employee
FOR PORTION OF Period
FROM '2018-03-15' TO '2018-07-15'
SET Department = 'Development'
, Position = 'DBA'
WHERE ID = 12345
;
Query OK, 1 row affected (0.000 sec)
Rows matched: 1 Changed: 1 Inserted: 2 Warnings: 0
SELECT * FROM employee ORDER BY Start;
+-------+------------+------------+-------------+------------+
| ID | Start | End | Department | Position |
+-------+------------+------------+-------------+------------+
| 12345 | 2017-01-01 | 2018-03-15 | Engineering | Junior DBA |
| 12345 | 2018-03-15 | 2018-07-15 | Development | DBA |
| 12345 | 2018-07-15 | 9999-12-31 | Engineering | Junior DBA |
+-------+------------+------------+-------------+------------+
www.fromdual.com
17 / 25
Upgrade Employee
UPDATE employee
FOR PORTION OF Period
FROM '2018-07-15'
TO '9999-12-31'
SET Position = 'DBA'
WHERE ID = 12345
;
+-------+------------+------------+-------------+------------+
| ID | Start | End | Department | Position |
+-------+------------+------------+-------------+------------+
| 12345 | 2017-01-01 | 2018-03-15 | Engineering | Junior DBA |
| 12345 | 2018-03-15 | 2018-07-15 | Development | DBA |
| 12345 | 2018-07-15 | 9999-12-31 | Engineering | DBA |
+-------+------------+------------+-------------+------------+
www.fromdual.com
18 / 25
1 year vacation (unpaid)
DELETE FROM employee
FOR PORTION OF Period
FROM '2018-09-30' -- !?!
TO '2019-10-01' -- !?!
WHERE ID = 12345
;
+-------+------------+------------+-------------+------------+
| ID | Start | End | Department | Position |
+-------+------------+------------+-------------+------------+
| 12345 | 2017-01-01 | 2018-03-15 | Engineering | Junior DBA |
| 12345 | 2018-03-15 | 2018-07-15 | Development | DBA |
| 12345 | 2018-07-15 | 2018-09-30 | Engineering | DBA |
| 12345 | 2019-10-01 | 9999-12-31 | Engineering | DBA |
+-------+------------+------------+-------------+------------+
www.fromdual.com
19 / 25
Querying
What is valid now?
SELECT *
FROM employee
WHERE Start <= CURRENT_DATE()
AND End > CURRENT_DATE()
;
What was valid during last year?
SELECT *
FROM employee
WHERE End >= '2018-01-01'
AND Start <= '2018-12-31'
;
www.fromdual.com
20 / 25
Syntax – Variables – Replication
●
Bitemporal Tables is also possible
●
Combination of system versioned and application-time
periods
● SQL> FLUSH SSL;
●
Dynamically exchange servers TLS certificates
● SQL> INSTALL/UNINSTALL IF [NOT] EXISTS
PLUGIN ...
●
Variables: Some minor changes...
●
Replication:
●
GTID clean-up (gtid_cleanup_batch_size)
●
Binary Log Rotation speed up
● SQL> SHUTDOWN WAIT FOR ALL SLAVES;
www.fromdual.com
21 / 25
General
●
System Tables (mysql.*) Crash-safe Aria!
●
Commands mysql* → mariadb*
●
Expected but breaks with many applications! :-(
●
Performance improvements for Unicode collations
●
User data type plugin (work in progress)
●
Oracle TYPE … TABLE OF, … AS OBJECT OF
●
Much faster privilege checks (Cloud)
●
Many users accounts or database grants
●
MS SQL Server compatibility: sql_mode = MSSQL
●
“For the moment MSSQL mode only has limited functionality,
but we plan to add more later according to demand.”
●
JSON: JSON_MERGE_PATCH and JSON_MERGE_PRESERVE
www.fromdual.com
22 / 25
BACKUP STAGE
●
Differences between MariaDB Community and
Enterprise Server :-(
●
More efficient Backup Locks for Storage
Snapshots:
●
Now officially supported (thanks to Cloud)!
●
Better than FLUSH TABLES WITH READ LOCK;
SQL> BACKUP STAGE START;
SQL> BACKUP STAGE BLOCK_COMMIT;
SQL> system lvcreate --size 1G --snapshot 
--name snapshot /dev/vg/snapshots
SQL> BACKUP STAGE END;
www.fromdual.com
23 / 25
Galera 4
●
Galera ready by default since MariaDB 10.1
●
New Galera Tables
● mysql.wsrep_{cluster,cluster_members,streaming_log}
●
Streaming Replication
●
Transactions of unlimitted size
●
Replicates gradually in small fragments
●
Dynamically per session: wsrep_trx_fragment_size = <n>
●
Usefull size ~10k rows
●
Degrades transaction throughput!!!
●
Conflicts with LOAD DATA splitting (wsrep_load_data_splitting)
●
Rolling Upgrade from Galera 3 to 4 is supported
●
Completely not mature yet (10.4.10) also w/o Streaming Repl!
www.fromdual.com
24 / 25
Outlook MariaDB 10.5
● INSERT/REPLACE … RETURNING
●
S3 Storage Engine (Archive in the Cloud)
●
Aria SE improvements (for S3 SE?)
●
Thread Pool Statistics (Cloud?)
●
InnoDB clean-up
●
MySQL extended Binlog Metadata from Upstream
●
INFORMATION_SCHEMA improvements
●
Perl Scripts from DBD::mysql → DBD::MariaDB
●
→ a bit too quite IMHO atm
www.fromdual.com
25 / 25
Q & A
Questions ?
Discussion?
We have time for some face-to-face talks...
●
FromDual provides neutral and independent:
●
Consulting
●
Training
●
Remote-DBA
●
Support for MariaDB, Galera Cluster and MySQL

More Related Content

What's hot (20)

PDF
Oracle GoldenGate DB2 to Oracle11gR2 Configuration
grigorianvlad
 
PDF
Yahoo: Experiences with MySQL GTID and Multi Threaded Replication
Yashada Jadhav
 
PDF
Redefining tables online without surprises
Nelson Calero
 
PDF
MySQL Ecosystem in 2018
Laurynas Biveinis
 
PDF
Sprint 56
ManageIQ
 
PDF
How to Avoid Pitfalls in Schema Upgrade with Galera
Sveta Smirnova
 
PPTX
SQL Tuning made easier with SQLTXPLAIN (SQLT)
Carlos Sierra
 
PPTX
Adapting and adopting spm v04
Carlos Sierra
 
PDF
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Nelson Calero
 
PPSX
How a Developer can Troubleshoot a SQL performing poorly on a Production DB
Carlos Sierra
 
PDF
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
Dave Stokes
 
PDF
Percona Server for MySQL 8.0 @ Percona Live 2019
Laurynas Biveinis
 
PDF
MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...
Boško Devetak
 
PPTX
Making Oracle Services work
Bjoern Rost
 
PPTX
Running gtid replication in production
Balazs Pocze
 
PDF
How to migrate from MySQL to MariaDB without tears
Sveta Smirnova
 
PPSX
Introducing the eDB360 Tool
Carlos Sierra
 
PPTX
Oracle Database 12.1.0.2 New Features
Deiby Gómez
 
PDF
Demystifying MySQL Replication Crash Safety
Jean-François Gagné
 
PPTX
Using SQL Plan Management (SPM) to balance Plan Flexibility and Plan Stability
Carlos Sierra
 
Oracle GoldenGate DB2 to Oracle11gR2 Configuration
grigorianvlad
 
Yahoo: Experiences with MySQL GTID and Multi Threaded Replication
Yashada Jadhav
 
Redefining tables online without surprises
Nelson Calero
 
MySQL Ecosystem in 2018
Laurynas Biveinis
 
Sprint 56
ManageIQ
 
How to Avoid Pitfalls in Schema Upgrade with Galera
Sveta Smirnova
 
SQL Tuning made easier with SQLTXPLAIN (SQLT)
Carlos Sierra
 
Adapting and adopting spm v04
Carlos Sierra
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Nelson Calero
 
How a Developer can Troubleshoot a SQL performing poorly on a Production DB
Carlos Sierra
 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
Dave Stokes
 
Percona Server for MySQL 8.0 @ Percona Live 2019
Laurynas Biveinis
 
MySQL Time Machine by replicating into HBase - Slides from Percona Live Amste...
Boško Devetak
 
Making Oracle Services work
Bjoern Rost
 
Running gtid replication in production
Balazs Pocze
 
How to migrate from MySQL to MariaDB without tears
Sveta Smirnova
 
Introducing the eDB360 Tool
Carlos Sierra
 
Oracle Database 12.1.0.2 New Features
Deiby Gómez
 
Demystifying MySQL Replication Crash Safety
Jean-François Gagné
 
Using SQL Plan Management (SPM) to balance Plan Flexibility and Plan Stability
Carlos Sierra
 

Similar to MariaDB 10.4 New Features (20)

PDF
MariaDB 10.2 New Features
FromDual GmbH
 
PDF
How to migrate from Oracle Database with ease
MariaDB plc
 
PDF
Migrations from PLSQL and Transact-SQL - m18
Wagner Bianchi
 
PDF
M|18 Migrating from Oracle and Handling PL/SQL Stored Procedures
MariaDB plc
 
PDF
MariaDB Amsterdam Roadshow: 19 September, 2024
MariaDB plc
 
PDF
Upcoming changes in MySQL 5.7
Morgan Tocker
 
PDF
Advanced Query Optimizer Tuning and Analysis
MYXPLAIN
 
PPTX
LVOUG meetup #4 - Case Study 10g to 11g
Maris Elsins
 
PDF
My sql 56_roadmap_april2012
sqlhjalp
 
PDF
Replication skeptic
Giuseppe Maxia
 
PDF
Die Neuheiten in MariaDB Enterprise Server
MariaDB plc
 
PDF
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
Valeriy Kravchuk
 
PDF
PostgreSQL 9.5 - Major Features
InMobi Technology
 
PDF
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB plc
 
PDF
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
PDF
Sprint 58
ManageIQ
 
PDF
More Than Just The Tip Of The Iceberg.pdf
Michal Gancarski
 
PPTX
M|18 Battle of the Online Schema Change Methods
MariaDB plc
 
PDF
Upgrade to MySQL 5.6 without downtime
Olivier DASINI
 
PDF
Percona Live '18 Tutorial: The Accidental DBA
Jenni Snyder
 
MariaDB 10.2 New Features
FromDual GmbH
 
How to migrate from Oracle Database with ease
MariaDB plc
 
Migrations from PLSQL and Transact-SQL - m18
Wagner Bianchi
 
M|18 Migrating from Oracle and Handling PL/SQL Stored Procedures
MariaDB plc
 
MariaDB Amsterdam Roadshow: 19 September, 2024
MariaDB plc
 
Upcoming changes in MySQL 5.7
Morgan Tocker
 
Advanced Query Optimizer Tuning and Analysis
MYXPLAIN
 
LVOUG meetup #4 - Case Study 10g to 11g
Maris Elsins
 
My sql 56_roadmap_april2012
sqlhjalp
 
Replication skeptic
Giuseppe Maxia
 
Die Neuheiten in MariaDB Enterprise Server
MariaDB plc
 
MariaDB 10.5 new features for troubleshooting (mariadb server fest 2020)
Valeriy Kravchuk
 
PostgreSQL 9.5 - Major Features
InMobi Technology
 
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB plc
 
MySQL Parallel Replication: inventory, use-case and limitations
Jean-François Gagné
 
Sprint 58
ManageIQ
 
More Than Just The Tip Of The Iceberg.pdf
Michal Gancarski
 
M|18 Battle of the Online Schema Change Methods
MariaDB plc
 
Upgrade to MySQL 5.6 without downtime
Olivier DASINI
 
Percona Live '18 Tutorial: The Accidental DBA
Jenni Snyder
 
Ad

More from FromDual GmbH (20)

PDF
MariaDB/MySQL pitfalls - And how to come out again...
FromDual GmbH
 
PDF
MariaDB / MySQL tripping hazard and how to get out again?
FromDual GmbH
 
PDF
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
FromDual GmbH
 
PDF
PERFORMANCE_SCHEMA and sys schema
FromDual GmbH
 
PDF
MySQL für Oracle DBA's
FromDual GmbH
 
PDF
MySQL Backup/Recovery
FromDual GmbH
 
PDF
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
FromDual GmbH
 
PDF
MySQL-Server im Teamwork - Replikation und Cluster
FromDual GmbH
 
PDF
Der Datenbank-Backup ist gemacht - was nun?
FromDual GmbH
 
PDF
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
FromDual GmbH
 
PDF
MySQL Performance Tuning für Oracle-DBA's
FromDual GmbH
 
PDF
MySQL Security SLAC 2015
FromDual GmbH
 
PDF
MySQL Performance Tuning für Entwickler
FromDual GmbH
 
PDF
MySQL Replikation - Die Eier legende Wollmilchsau?
FromDual GmbH
 
PDF
Reading MySQL fingerprints
FromDual GmbH
 
PDF
High-availability with Galera Cluster for MySQL
FromDual GmbH
 
PDF
MySQL always-up with Galera Cluster
FromDual GmbH
 
PDF
HA with Galera
FromDual GmbH
 
PDF
MySQL Indexierung CeBIT 2014
FromDual GmbH
 
PDF
MySQL Cluster with Galera Cluster for MySQL
FromDual GmbH
 
MariaDB/MySQL pitfalls - And how to come out again...
FromDual GmbH
 
MariaDB / MySQL tripping hazard and how to get out again?
FromDual GmbH
 
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
FromDual GmbH
 
PERFORMANCE_SCHEMA and sys schema
FromDual GmbH
 
MySQL für Oracle DBA's
FromDual GmbH
 
MySQL Backup/Recovery
FromDual GmbH
 
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
FromDual GmbH
 
MySQL-Server im Teamwork - Replikation und Cluster
FromDual GmbH
 
Der Datenbank-Backup ist gemacht - was nun?
FromDual GmbH
 
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
FromDual GmbH
 
MySQL Performance Tuning für Oracle-DBA's
FromDual GmbH
 
MySQL Security SLAC 2015
FromDual GmbH
 
MySQL Performance Tuning für Entwickler
FromDual GmbH
 
MySQL Replikation - Die Eier legende Wollmilchsau?
FromDual GmbH
 
Reading MySQL fingerprints
FromDual GmbH
 
High-availability with Galera Cluster for MySQL
FromDual GmbH
 
MySQL always-up with Galera Cluster
FromDual GmbH
 
HA with Galera
FromDual GmbH
 
MySQL Indexierung CeBIT 2014
FromDual GmbH
 
MySQL Cluster with Galera Cluster for MySQL
FromDual GmbH
 
Ad

Recently uploaded (20)

PPTX
some leadership theories MBA management.pptx
rkseo19
 
PPTX
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
PDF
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
PPT
Wireless Communications Course lecture1.ppt
abdullahyaqot2015
 
PDF
FINAL ZAKROS - UNESCO SITE CANDICACY - PRESENTATION - September 2024
StavrosKefalas1
 
PDF
The Family Secret (essence of loveliness)
Favour Biodun
 
PPTX
g1-oral-comm-1.pptx dkekekwkwoowowwkkrkrrkfkfkfm
hnanie845
 
PPTX
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
PPTX
A brief History of counseling in Social Work.pptx
Josaya Injesi
 
PDF
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
PPTX
presentation on legal and regulatory action
raoharsh4122001
 
PPTX
Bob Stewart Humble Obedience 07-13-2025.pptx
FamilyWorshipCenterD
 
PPTX
AI presentation for everyone in every fields
dodinhkhai1
 
PPTX
STURGEON BAY WI AG PPT JULY 6 2025.pptx
FamilyWorshipCenterD
 
PPTX
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
PPTX
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
PDF
What should be in a Leadership and Motivation Plan?
Writegenic AI
 
PPTX
677697609-States-Research-Questions-Final.pptx
francistiin8
 
PDF
Cloud Computing Service Availability.pdf
chakrirocky1
 
PDF
CHALLENGIES FACING THEOLOGICAL EDUCATION IN NIGERIA: STRATEGIES FOR IMPROVEMENT
PREVAILERS THEOLOGICAL SCHOOL FCT ABUJA
 
some leadership theories MBA management.pptx
rkseo19
 
Inspired by VeinSense: Supercharge Your Hackathon with Agentic AI
ShubhamSharma2528
 
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
Wireless Communications Course lecture1.ppt
abdullahyaqot2015
 
FINAL ZAKROS - UNESCO SITE CANDICACY - PRESENTATION - September 2024
StavrosKefalas1
 
The Family Secret (essence of loveliness)
Favour Biodun
 
g1-oral-comm-1.pptx dkekekwkwoowowwkkrkrrkfkfkfm
hnanie845
 
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
A brief History of counseling in Social Work.pptx
Josaya Injesi
 
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
presentation on legal and regulatory action
raoharsh4122001
 
Bob Stewart Humble Obedience 07-13-2025.pptx
FamilyWorshipCenterD
 
AI presentation for everyone in every fields
dodinhkhai1
 
STURGEON BAY WI AG PPT JULY 6 2025.pptx
FamilyWorshipCenterD
 
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
What should be in a Leadership and Motivation Plan?
Writegenic AI
 
677697609-States-Research-Questions-Final.pptx
francistiin8
 
Cloud Computing Service Availability.pdf
chakrirocky1
 
CHALLENGIES FACING THEOLOGICAL EDUCATION IN NIGERIA: STRATEGIES FOR IMPROVEMENT
PREVAILERS THEOLOGICAL SCHOOL FCT ABUJA
 

MariaDB 10.4 New Features

  • 1. www.fromdual.com 1 / 25 MariaDB 10.4 New Features DOAG K&A 2019, Nürnberg (Germany) Oli Sennhauser Senior MariaDB and MySQL Consultant at FromDual GmbH https://www.fromdual.com/presentations
  • 2. www.fromdual.com 2 / 25 About FromDual GmbH Enterprise Support remote-DBA Training Consulting
  • 3. www.fromdual.com 3 / 25 Contents HA Solutions ➢ Read scale-out ➢ Replication set-up for HA ➢ Active/passive fail-over ➢ MySQL Cluster ➢ Replication Cluster ➢ Storage-Engine-Replication MariaDB 10.4 – New Features ➢ Branches and Forks ➢ MariaDB and Linux Distributions ➢ Authentication ➢ InnoDB ➢ MariaDB Optimizer ➢ Application-Time Period Tables ➢ General Stuff ➢ Backup Stage ➢ Galera 4 ➢ Outlook MariaDB 10.5
  • 4. www.fromdual.com 4 / 25 Branches and Forks 5.1 5.5 2010 Branch (“Drop-in-Replacement”) MariaDB MySQL ● MariaDB and MySQL are Open Source (GPL v2) ● This means everybody is allowed to DiY ● → Branches and Forks ● Who uses a MariaDB/MySQL in here? ● Chaos will happen! :-( ● See Sybase ASE vs. MicroSoft SQL Server (1995(v6.0)-2005) ● Examples: GTID, Protocol X, MariaDB CS, Virtual Columns, JSON, User Management, Group Replication, PL/SQL, etc. 2008 Fork (“Compatible”) 5.6, 2013 5.7, 2015 8.0, 2018 10.0, 2014 10.1, 2015 10.2, 2017 10.3, 2018 10.4, 2019 10.5, 2020
  • 5. www.fromdual.com 5 / 25 MariaDB and Linux Distros ● Redhat/CentOS: ● 6 → MySQL 5.1 ● 7 → MariaDB 5.5 ● 8 → MariaDB 10.3, MySQL 8.0 ● Ubuntu: ● 16.04 → MySQL 5.7 ● 18.04 → MySQL 5.7 (MariaDB 10.1) ● 20.04 → ? (Ubuntu 19.10: MySQL 8.0 (MariaDB 10.3)) ● Debian: ● 8 → MySQL 5.5 ● 9 → MariaDB 10.1 ● 10 → MariaDB 10.3 ● SuSE SLE / OpenSuSE: ● 12 → MariaDB 10.0 ● 15 → MariaDB 10.2 ● Leap 42 → MariaDB 10.0, Leap 15, → MariaDB 10.2
  • 7. www.fromdual.com 7 / 25 Retrospect MariaDB 10.3 ● GA May 2018 ● Invisible Columns ● System-versioned Tables ● Instant ADD COLUMN ● Storage Engine independent Column Compression ● Semi-synchronous Replication Built-in (before Plug-in) ● PROXY Protocol Support (Galera/HAproxy) ● Optimizer Improvements (SQL Performance) ● Aggregate Stored Functions (DWH, MariaDB Column Store) ● Oracle Compatibility (sql_mode = ORACLE) ● Oracle PL/SQL Packages, Oracle Style Sequences ● and many, many more...
  • 8. www.fromdual.com 8 / 25 MariaDB 10.4 - Overview ● GA June 2019 (10.4.6) ● → wait 6 – 12 months for production (mid 2020)! ● Still very poor quality (especially Galera 4!) ● Regression in 10.4.9 (5. 11. 2019) ● Remember MySQL IPO plan 2005: 5.0 was “worst release ever” ● Cloud… (IPO?) ● Standard compliant (IPO?) ● More feature complete
  • 9. www.fromdual.com 9 / 25 Authentication ● unix_socket authentication is default! ● Access if O/S user = DB user ● New DB user: mysql ● User Password Expiry: ALTER USER 'oli'@'localhost' PASSWORD EXPIRE INTERVAL 90 DAY; ● Account Locking: ALTER USER 'oli'@'localhost' ACCOUNT LOCK; ● Table mysql.user is retired!!! ● → Can break Admin Applications... ● New: mysql.global_priv Table ● More than 1 authentication plugin possible ● → slowly migrate users to more secure authentication ● CREATE USER admin@localhost IDENTIFIED VIA unix_socket OR mysql_native_password USING 'secret';
  • 10. www.fromdual.com 10 / 25 InnoDB ● Instant DROP COLUMN operation ● Changing of column order ● More Instant operations (VARCHAR, collation and character set) ● Improvements in Index DDL ● RENAME INDEX ● Merge InnoDB changes from “upstream” ● InnoDB row length count fixed (10.4.7) ● Leads to errors: [Warning] InnoDB: Cannot add field `thumbnails` in table `test`.`products` because after adding it, the row size is 8702 which is greater than maximum allowed size (8126) for a record on index leaf page.
  • 11. www.fromdual.com 11 / 25 InnoDB Instant DDL ALTER TABLE test ADD COLUMN d BIGINT /*!100400 , ALGORITHM=INSTANT */; Query OK, 0 rows affected (0.247 sec) ALTER TABLE test MODIFY COLUMN c BIGINT(20) DEFAULT NULL AFTER d /*!100400 , ALGORITHM=INSTANT */; Query OK, 0 rows affected (0.072 sec)
  • 12. www.fromdual.com 12 / 25 Optimizer ● Optimizer Trace: ● SET SESSION optimizer_trace=’enabled=on’; ● I_S.optimizer_trace ● SE Independent Table Statistics ● Histogram collection by default ● Improved Condition Pushdown Optimization ● SELECT … WHERE xxx AND ... IN (<subquery>) ● Automatic optimized use of Join Buffer ● Exists since 5.3.0 but was disabled :-( ● Rowid Filtering Optimization ● WHERE a.date BETWEEN '2018-01-01' AND '2018-01-31' AND b.price between 200000 and 230000; ● But...
  • 13. www.fromdual.com 13 / 25 Optimizer – Query Runtime 5.5.41 10.0.28 10.1.29 10.2.14 10.3.18 10.4.8 Query 1 3.03 3.17 3.36 3.29 3.38 3.57 Query 2 0.20 0.20 0.20 0.19 0.19 0.21 Query 3 2.41 2.40 2.51 3.27 3.92 4.44 Query 1 Query 2 Query 3 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 MariaDB Optimizer - Over time 5.5.41 10.0.28 10.1.29 10.2.14 10.3.18 10.4.8
  • 14. www.fromdual.com 14 / 25 Optimizer Trace SQL> SET SESSION optimizer_trace=’enabled=on’; SQL> EXPLAIN SELECT * FROM test WHERE id <10; SQL> SELECT trace FROM information_schema.optimizer_trace; … "steps": [ { "condition_processing": { "condition": "WHERE", "original_condition": "test.`id` < 10", "steps": [ { "transformation": "equality_propagation", "resulting_condition": "test.`id` < 10" }, { "transformation": "constant_propagation", "resulting_condition": "test.`id` < 10" }, { "transformation": "trivial_condition_removal", "resulting_condition": "test.`id` < 10" } ] } }, …
  • 15. www.fromdual.com 15 / 25 Application-Time Period Tables ● ISO/IEC 9075, SQL:2011 Part 2 ● MariaDB 10.3: System Versioned Tables ● Journal/Tracking of an Item. ● AUTO_INCREMENT ID is NO good plan! CREATE TABLE employee ( ID INT UNSIGNED NOT NULL , Start DATE , End DATE , Department VARCHAR(32) , Position VARCHAR(32) , PRIMARY KEY (ID, Start, End) , PERIOD FOR Period (Start, End) );
  • 16. www.fromdual.com 16 / 25 Lend Employee UPDATE employee FOR PORTION OF Period FROM '2018-03-15' TO '2018-07-15' SET Department = 'Development' , Position = 'DBA' WHERE ID = 12345 ; Query OK, 1 row affected (0.000 sec) Rows matched: 1 Changed: 1 Inserted: 2 Warnings: 0 SELECT * FROM employee ORDER BY Start; +-------+------------+------------+-------------+------------+ | ID | Start | End | Department | Position | +-------+------------+------------+-------------+------------+ | 12345 | 2017-01-01 | 2018-03-15 | Engineering | Junior DBA | | 12345 | 2018-03-15 | 2018-07-15 | Development | DBA | | 12345 | 2018-07-15 | 9999-12-31 | Engineering | Junior DBA | +-------+------------+------------+-------------+------------+
  • 17. www.fromdual.com 17 / 25 Upgrade Employee UPDATE employee FOR PORTION OF Period FROM '2018-07-15' TO '9999-12-31' SET Position = 'DBA' WHERE ID = 12345 ; +-------+------------+------------+-------------+------------+ | ID | Start | End | Department | Position | +-------+------------+------------+-------------+------------+ | 12345 | 2017-01-01 | 2018-03-15 | Engineering | Junior DBA | | 12345 | 2018-03-15 | 2018-07-15 | Development | DBA | | 12345 | 2018-07-15 | 9999-12-31 | Engineering | DBA | +-------+------------+------------+-------------+------------+
  • 18. www.fromdual.com 18 / 25 1 year vacation (unpaid) DELETE FROM employee FOR PORTION OF Period FROM '2018-09-30' -- !?! TO '2019-10-01' -- !?! WHERE ID = 12345 ; +-------+------------+------------+-------------+------------+ | ID | Start | End | Department | Position | +-------+------------+------------+-------------+------------+ | 12345 | 2017-01-01 | 2018-03-15 | Engineering | Junior DBA | | 12345 | 2018-03-15 | 2018-07-15 | Development | DBA | | 12345 | 2018-07-15 | 2018-09-30 | Engineering | DBA | | 12345 | 2019-10-01 | 9999-12-31 | Engineering | DBA | +-------+------------+------------+-------------+------------+
  • 19. www.fromdual.com 19 / 25 Querying What is valid now? SELECT * FROM employee WHERE Start <= CURRENT_DATE() AND End > CURRENT_DATE() ; What was valid during last year? SELECT * FROM employee WHERE End >= '2018-01-01' AND Start <= '2018-12-31' ;
  • 20. www.fromdual.com 20 / 25 Syntax – Variables – Replication ● Bitemporal Tables is also possible ● Combination of system versioned and application-time periods ● SQL> FLUSH SSL; ● Dynamically exchange servers TLS certificates ● SQL> INSTALL/UNINSTALL IF [NOT] EXISTS PLUGIN ... ● Variables: Some minor changes... ● Replication: ● GTID clean-up (gtid_cleanup_batch_size) ● Binary Log Rotation speed up ● SQL> SHUTDOWN WAIT FOR ALL SLAVES;
  • 21. www.fromdual.com 21 / 25 General ● System Tables (mysql.*) Crash-safe Aria! ● Commands mysql* → mariadb* ● Expected but breaks with many applications! :-( ● Performance improvements for Unicode collations ● User data type plugin (work in progress) ● Oracle TYPE … TABLE OF, … AS OBJECT OF ● Much faster privilege checks (Cloud) ● Many users accounts or database grants ● MS SQL Server compatibility: sql_mode = MSSQL ● “For the moment MSSQL mode only has limited functionality, but we plan to add more later according to demand.” ● JSON: JSON_MERGE_PATCH and JSON_MERGE_PRESERVE
  • 22. www.fromdual.com 22 / 25 BACKUP STAGE ● Differences between MariaDB Community and Enterprise Server :-( ● More efficient Backup Locks for Storage Snapshots: ● Now officially supported (thanks to Cloud)! ● Better than FLUSH TABLES WITH READ LOCK; SQL> BACKUP STAGE START; SQL> BACKUP STAGE BLOCK_COMMIT; SQL> system lvcreate --size 1G --snapshot --name snapshot /dev/vg/snapshots SQL> BACKUP STAGE END;
  • 23. www.fromdual.com 23 / 25 Galera 4 ● Galera ready by default since MariaDB 10.1 ● New Galera Tables ● mysql.wsrep_{cluster,cluster_members,streaming_log} ● Streaming Replication ● Transactions of unlimitted size ● Replicates gradually in small fragments ● Dynamically per session: wsrep_trx_fragment_size = <n> ● Usefull size ~10k rows ● Degrades transaction throughput!!! ● Conflicts with LOAD DATA splitting (wsrep_load_data_splitting) ● Rolling Upgrade from Galera 3 to 4 is supported ● Completely not mature yet (10.4.10) also w/o Streaming Repl!
  • 24. www.fromdual.com 24 / 25 Outlook MariaDB 10.5 ● INSERT/REPLACE … RETURNING ● S3 Storage Engine (Archive in the Cloud) ● Aria SE improvements (for S3 SE?) ● Thread Pool Statistics (Cloud?) ● InnoDB clean-up ● MySQL extended Binlog Metadata from Upstream ● INFORMATION_SCHEMA improvements ● Perl Scripts from DBD::mysql → DBD::MariaDB ● → a bit too quite IMHO atm
  • 25. www.fromdual.com 25 / 25 Q & A Questions ? Discussion? We have time for some face-to-face talks... ● FromDual provides neutral and independent: ● Consulting ● Training ● Remote-DBA ● Support for MariaDB, Galera Cluster and MySQL