SlideShare a Scribd company logo
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
How to Add Stuff to MySQL
Georgi “Joro” Kodinov
Team Lead, SrvGen Team
A Guided Tour
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
2
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Agenda
3
• The basic way: user defined functions
• The old way: plugins
• The new way: components
• The advanced way: pull requests
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
User Defined Functions
The Basic Way
4
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Architecture of UDFs
5
SQL
UDF call
Result
Client Server UDF Library
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Pros and Cons
Pros Cons
Easy A single return value
Well documented No way to generate SQL errors
SQL callable Limited data type support
Dynamically loadable Need to be defined one by one
Can also make aggregate functions
6
User Defined Functions
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
A User Defined Function: sql/udf_example.com
7
A loop over
the
arguments
Check for
NULL
values
Argument
type
Returning a
result
To return a
NULL result
set to 1
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Compiling and Running
[gkodinov@loki01]~/work/mysql-8.0/sql: gcc -I ../include/ -I ../libbinlogevents/export/ -I
../bld/include/ -shared -std=c++11 -fPIC -o udf_example.so udf_example.cc
8
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Plugins
The Old Way
9
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Architecture of Plugins
10
SQL
Plugin API call
Result
Client Server Plugin Library
Plugin Service
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Pros and Cons
Pros Cons
Better known Two plugins cannot co-operate directly
Documented Plugins are linked with the server symbols
Can respond to events in server Plugin APIs not easily extensible
Multiple active plugins Complex loading/unloading sequence
Can call back into the server code No explicit dependencies
Dynamically loadable Hard to add new plugin APIs
Lots of examples
Good amount of useful plugin APIs
11
Plugins
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 12
Sample plugin: plugin/auth/auth_socket.cc
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Compiling the plugin
• Need a source distro
• Put in plugin/
• Add CMakeLists.txt
13
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Using the plugin
14
Install the
plugin
Create a
user using
the plugin
Authenticate
Verify the
result
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Components
The New Way
15
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Architecture of Components
16
SQL
Client
Server
Services
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Pros and Cons
Pros Cons
Explicit Dependencies Not all plugin APIs are migrated to components
All components are equal and can communicate Not available in versions older than MySQL 8.0
Can dynamically add new service implementations Relatively new: lacks some refinements
Can override existing service implementations Currently supports mostly C APIs
Can provide soft transition by keeping the old and the
new
Dynamically loadable
Can be adaptive to the services present
Does not require the server binary to be built
17
Components
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Sample Service Definition And Implementation
18
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Sample Component
19
What service
implementations
a component
provides
What service
implementations
a component
requires
Component
metadata
Component
Definition
Shared Library
Definition
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
How to Find And Use a Service: The Low Level Way
20
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
How to Find And Use a Service: The Easier Way
21
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Pull Requests
The Advanced Way
22
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 23
Pull Requests
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
The New And Improved Doxygen Manual
24
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Summary
• Always consider a component first
• Go to plugin If you:
– need to implement an existing, not-yet-migrated plugin API
– need to call into an existing, not-yet-migrated plugin service
• Go to UDFs if you need an SQL callable function
• Go to pull requests if none of the above fits
25
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 26

More Related Content

What's hot

Calendário 2019
Calendário 2019Calendário 2019
Calendário 2019
ana manso
 
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015
Nadine Schoene
 
Primavera P6 Team Member - For Primavera Users on the Go
Primavera P6 Team Member - For Primavera Users on the GoPrimavera P6 Team Member - For Primavera Users on the Go
Primavera P6 Team Member - For Primavera Users on the Go
p6academy
 
Kochi Mulesoft Meetup #6
Kochi Mulesoft Meetup #6Kochi Mulesoft Meetup #6
Kochi Mulesoft Meetup #6
sumitahuja94
 
Developing cloud-native microservices using project Helidon
Developing cloud-native microservices using project HelidonDeveloping cloud-native microservices using project Helidon
Developing cloud-native microservices using project Helidon
Dmitry Kornilov
 
JavaScript: Why Should I Care?
JavaScript: Why Should I Care?JavaScript: Why Should I Care?
JavaScript: Why Should I Care?
Daniel McGhan
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Data (5 november 2018)
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Data (5 november 2018)AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Data (5 november 2018)
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Data (5 november 2018)
Lucas Jellema
 
P6 Resource Management in the web
P6 Resource Management in the webP6 Resource Management in the web
P6 Resource Management in the web
p6academy
 
B4 making dev_ops_really_work
B4 making dev_ops_really_workB4 making dev_ops_really_work
B4 making dev_ops_really_work
Dr. Wilfred Lin (Ph.D.)
 
Oracle OpenWorld 2015
Oracle OpenWorld 2015Oracle OpenWorld 2015
Oracle OpenWorld 2015
p6academy
 
Administering Users, Access and Views in P6 EPPM (Web) Release 8 and later
Administering Users, Access and Views in P6 EPPM  (Web) Release 8 and laterAdministering Users, Access and Views in P6 EPPM  (Web) Release 8 and later
Administering Users, Access and Views in P6 EPPM (Web) Release 8 and later
p6academy
 
Building a solid Project Management System with Primavera and other tools at ...
Building a solid Project Management System with Primavera and other tools at ...Building a solid Project Management System with Primavera and other tools at ...
Building a solid Project Management System with Primavera and other tools at ...
p6academy
 
What's New in Unifier 16.1
What's New in Unifier 16.1What's New in Unifier 16.1
What's New in Unifier 16.1
p6academy
 
Log Management and Analysis for Cloud Applications
Log Management and Analysis for Cloud ApplicationsLog Management and Analysis for Cloud Applications
Log Management and Analysis for Cloud Applications
Abhishek Kant
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Cloud Infrastructure (5 n...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Cloud Infrastructure (5 n...AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Cloud Infrastructure (5 n...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Cloud Infrastructure (5 n...
Lucas Jellema
 
Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019
Oracle Developers
 
GraphQL Advanced
GraphQL AdvancedGraphQL Advanced
GraphQL Advanced
LeanIX GmbH
 
Test & Certification WG Review, 2014 Member Meeting
Test & Certification WG Review, 2014 Member MeetingTest & Certification WG Review, 2014 Member Meeting
Test & Certification WG Review, 2014 Member Meeting
IMTC
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaSAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
Getting value from IoT, Integration and Data Analytics
 
OOW16 - Migrating and Managing Customizations for Oracle E-Business Suite 12....
OOW16 - Migrating and Managing Customizations for Oracle E-Business Suite 12....OOW16 - Migrating and Managing Customizations for Oracle E-Business Suite 12....
OOW16 - Migrating and Managing Customizations for Oracle E-Business Suite 12....
vasuballa
 

What's hot (20)

Calendário 2019
Calendário 2019Calendário 2019
Calendário 2019
 
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015
 
Primavera P6 Team Member - For Primavera Users on the Go
Primavera P6 Team Member - For Primavera Users on the GoPrimavera P6 Team Member - For Primavera Users on the Go
Primavera P6 Team Member - For Primavera Users on the Go
 
Kochi Mulesoft Meetup #6
Kochi Mulesoft Meetup #6Kochi Mulesoft Meetup #6
Kochi Mulesoft Meetup #6
 
Developing cloud-native microservices using project Helidon
Developing cloud-native microservices using project HelidonDeveloping cloud-native microservices using project Helidon
Developing cloud-native microservices using project Helidon
 
JavaScript: Why Should I Care?
JavaScript: Why Should I Care?JavaScript: Why Should I Care?
JavaScript: Why Should I Care?
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Data (5 november 2018)
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Data (5 november 2018)AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Data (5 november 2018)
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Data (5 november 2018)
 
P6 Resource Management in the web
P6 Resource Management in the webP6 Resource Management in the web
P6 Resource Management in the web
 
B4 making dev_ops_really_work
B4 making dev_ops_really_workB4 making dev_ops_really_work
B4 making dev_ops_really_work
 
Oracle OpenWorld 2015
Oracle OpenWorld 2015Oracle OpenWorld 2015
Oracle OpenWorld 2015
 
Administering Users, Access and Views in P6 EPPM (Web) Release 8 and later
Administering Users, Access and Views in P6 EPPM  (Web) Release 8 and laterAdministering Users, Access and Views in P6 EPPM  (Web) Release 8 and later
Administering Users, Access and Views in P6 EPPM (Web) Release 8 and later
 
Building a solid Project Management System with Primavera and other tools at ...
Building a solid Project Management System with Primavera and other tools at ...Building a solid Project Management System with Primavera and other tools at ...
Building a solid Project Management System with Primavera and other tools at ...
 
What's New in Unifier 16.1
What's New in Unifier 16.1What's New in Unifier 16.1
What's New in Unifier 16.1
 
Log Management and Analysis for Cloud Applications
Log Management and Analysis for Cloud ApplicationsLog Management and Analysis for Cloud Applications
Log Management and Analysis for Cloud Applications
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Cloud Infrastructure (5 n...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Cloud Infrastructure (5 n...AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Cloud Infrastructure (5 n...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 1 - Cloud Infrastructure (5 n...
 
Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019Apex atp customer_presentation_wwc march 2019
Apex atp customer_presentation_wwc march 2019
 
GraphQL Advanced
GraphQL AdvancedGraphQL Advanced
GraphQL Advanced
 
Test & Certification WG Review, 2014 Member Meeting
Test & Certification WG Review, 2014 Member MeetingTest & Certification WG Review, 2014 Member Meeting
Test & Certification WG Review, 2014 Member Meeting
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaSAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
 
OOW16 - Migrating and Managing Customizations for Oracle E-Business Suite 12....
OOW16 - Migrating and Managing Customizations for Oracle E-Business Suite 12....OOW16 - Migrating and Managing Customizations for Oracle E-Business Suite 12....
OOW16 - Migrating and Managing Customizations for Oracle E-Business Suite 12....
 

Similar to How to add stuff to MySQL

Serverless patterns
Serverless patternsServerless patterns
Serverless patterns
Jesse Butler
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
Olivier DASINI
 
Why citizen developers should be your new best friend - Oracle APEX
Why citizen developers should be your new best friend - Oracle APEXWhy citizen developers should be your new best friend - Oracle APEX
Why citizen developers should be your new best friend - Oracle APEX
DavidPeake15
 
Diagnose Your Microservices
Diagnose Your MicroservicesDiagnose Your Microservices
Diagnose Your Microservices
Marcus Hirt
 
Microservices at Scale with Istio
Microservices at Scale with IstioMicroservices at Scale with Istio
Microservices at Scale with Istio
Jesse Butler
 
Functions and DevOps
Functions and DevOpsFunctions and DevOps
Functions and DevOps
Shaun Smith
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015
Edward Burns
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
Olivier DASINI
 
Hit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate MicroservicesHit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate Microservices
Bobby Curtis
 
Oracle goldegate microservice
Oracle goldegate microserviceOracle goldegate microservice
Oracle goldegate microservice
Mojtaba Khandan
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
Edward Burns
 
2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion
mnriem
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
Lucas Jellema
 
Public hyperledger meetup sf may 2018
Public hyperledger meetup sf may 2018Public hyperledger meetup sf may 2018
Public hyperledger meetup sf may 2018
Oracle Developers
 
Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)
Michael Hichwa
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developers
ONE BCG
 
Replication Whats New in Mysql 8
Replication Whats New in Mysql 8Replication Whats New in Mysql 8
Replication Whats New in Mysql 8
Luís Soares
 
Oracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native AppOracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native App
Paulo Alberto Simoes ∴
 
206530 getting started with p6 analytics and reporting
206530 getting started with p6 analytics and reporting206530 getting started with p6 analytics and reporting
206530 getting started with p6 analytics and reporting
p6academy
 
API Design – More than just a Payload Definition
API Design – More than just a Payload DefinitionAPI Design – More than just a Payload Definition
API Design – More than just a Payload Definition
Phil Wilkins
 

Similar to How to add stuff to MySQL (20)

Serverless patterns
Serverless patternsServerless patterns
Serverless patterns
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
 
Why citizen developers should be your new best friend - Oracle APEX
Why citizen developers should be your new best friend - Oracle APEXWhy citizen developers should be your new best friend - Oracle APEX
Why citizen developers should be your new best friend - Oracle APEX
 
Diagnose Your Microservices
Diagnose Your MicroservicesDiagnose Your Microservices
Diagnose Your Microservices
 
Microservices at Scale with Istio
Microservices at Scale with IstioMicroservices at Scale with Istio
Microservices at Scale with Istio
 
Functions and DevOps
Functions and DevOpsFunctions and DevOps
Functions and DevOps
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
 
Hit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate MicroservicesHit Refresh with Oracle GoldenGate Microservices
Hit Refresh with Oracle GoldenGate Microservices
 
Oracle goldegate microservice
Oracle goldegate microserviceOracle goldegate microservice
Oracle goldegate microservice
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
 
2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion
 
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - SaaS and Standard Applica...
 
Public hyperledger meetup sf may 2018
Public hyperledger meetup sf may 2018Public hyperledger meetup sf may 2018
Public hyperledger meetup sf may 2018
 
Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)Oracle APEX Introduction (release 18.1)
Oracle APEX Introduction (release 18.1)
 
Brushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developersBrushing skills on SignalR for ASP.NET developers
Brushing skills on SignalR for ASP.NET developers
 
Replication Whats New in Mysql 8
Replication Whats New in Mysql 8Replication Whats New in Mysql 8
Replication Whats New in Mysql 8
 
Oracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native AppOracle Modern AppDev Approach to Cloud & Container Native App
Oracle Modern AppDev Approach to Cloud & Container Native App
 
206530 getting started with p6 analytics and reporting
206530 getting started with p6 analytics and reporting206530 getting started with p6 analytics and reporting
206530 getting started with p6 analytics and reporting
 
API Design – More than just a Payload Definition
API Design – More than just a Payload DefinitionAPI Design – More than just a Payload Definition
API Design – More than just a Payload Definition
 

More from Georgi Kodinov

2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
2023 TurnovoConf MySQL Authentication.pptx
2023 TurnovoConf MySQL Authentication.pptx2023 TurnovoConf MySQL Authentication.pptx
2023 TurnovoConf MySQL Authentication.pptx
Georgi Kodinov
 
2022 TurnovoConf MySQL за начинаещи.pptx
2022 TurnovoConf MySQL за начинаещи.pptx2022 TurnovoConf MySQL за начинаещи.pptx
2022 TurnovoConf MySQL за начинаещи.pptx
Georgi Kodinov
 
OpenSUSE Conf 2020 MySQL Clone
OpenSUSE Conf 2020 MySQL CloneOpenSUSE Conf 2020 MySQL Clone
OpenSUSE Conf 2020 MySQL Clone
Georgi Kodinov
 
2020 pre fosdem mysql clone
2020 pre fosdem   mysql clone2020 pre fosdem   mysql clone
2020 pre fosdem mysql clone
Georgi Kodinov
 
2019 BGOUG Autumn MySQL Clone
2019  BGOUG Autumn MySQL Clone2019  BGOUG Autumn MySQL Clone
2019 BGOUG Autumn MySQL Clone
Georgi Kodinov
 
2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server
Georgi Kodinov
 
PLe19 How To Instrument Your Code in performance_schema
PLe19 How To Instrument Your Code in performance_schemaPLe19 How To Instrument Your Code in performance_schema
PLe19 How To Instrument Your Code in performance_schema
Georgi Kodinov
 
DevTalks.ro 2019 What's New in MySQL 8.0 Security
DevTalks.ro 2019 What's New in MySQL 8.0 SecurityDevTalks.ro 2019 What's New in MySQL 8.0 Security
DevTalks.ro 2019 What's New in MySQL 8.0 Security
Georgi Kodinov
 
DevTalks.ro 2019 MySQL Data Masking Talk
DevTalks.ro 2019 MySQL Data Masking TalkDevTalks.ro 2019 MySQL Data Masking Talk
DevTalks.ro 2019 MySQL Data Masking Talk
Georgi Kodinov
 
FOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component InfrastructureFOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component Infrastructure
Georgi Kodinov
 
MySQL Enterprise Data Masking
MySQL Enterprise Data MaskingMySQL Enterprise Data Masking
MySQL Enterprise Data Masking
Georgi Kodinov
 
Percona Live Europe 2018: What's New in MySQL 8.0 Security
Percona Live Europe 2018: What's New in MySQL 8.0 SecurityPercona Live Europe 2018: What's New in MySQL 8.0 Security
Percona Live Europe 2018: What's New in MySQL 8.0 Security
Georgi Kodinov
 
Pl18 saving bandwidth
Pl18 saving bandwidthPl18 saving bandwidth
Pl18 saving bandwidth
Georgi Kodinov
 
BGOUG17: Cloudy with a chance of MySQL
BGOUG17: Cloudy with a chance of MySQLBGOUG17: Cloudy with a chance of MySQL
BGOUG17: Cloudy with a chance of MySQL
Georgi Kodinov
 
Pl17: MySQL 8.0: security
Pl17: MySQL 8.0: securityPl17: MySQL 8.0: security
Pl17: MySQL 8.0: security
Georgi Kodinov
 
Fosdem17 honeypot your database server
Fosdem17 honeypot your database serverFosdem17 honeypot your database server
Fosdem17 honeypot your database server
Georgi Kodinov
 
2016 oSC MySQL Firewall
2016 oSC MySQL Firewall2016 oSC MySQL Firewall
2016 oSC MySQL Firewall
Georgi Kodinov
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
Georgi Kodinov
 
OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQLOUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQL
Georgi Kodinov
 

More from Georgi Kodinov (20)

2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
2023 TurnovoConf MySQL Authentication.pptx
2023 TurnovoConf MySQL Authentication.pptx2023 TurnovoConf MySQL Authentication.pptx
2023 TurnovoConf MySQL Authentication.pptx
 
2022 TurnovoConf MySQL за начинаещи.pptx
2022 TurnovoConf MySQL за начинаещи.pptx2022 TurnovoConf MySQL за начинаещи.pptx
2022 TurnovoConf MySQL за начинаещи.pptx
 
OpenSUSE Conf 2020 MySQL Clone
OpenSUSE Conf 2020 MySQL CloneOpenSUSE Conf 2020 MySQL Clone
OpenSUSE Conf 2020 MySQL Clone
 
2020 pre fosdem mysql clone
2020 pre fosdem   mysql clone2020 pre fosdem   mysql clone
2020 pre fosdem mysql clone
 
2019 BGOUG Autumn MySQL Clone
2019  BGOUG Autumn MySQL Clone2019  BGOUG Autumn MySQL Clone
2019 BGOUG Autumn MySQL Clone
 
2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server2019 indit blackhat_honeypot your database server
2019 indit blackhat_honeypot your database server
 
PLe19 How To Instrument Your Code in performance_schema
PLe19 How To Instrument Your Code in performance_schemaPLe19 How To Instrument Your Code in performance_schema
PLe19 How To Instrument Your Code in performance_schema
 
DevTalks.ro 2019 What's New in MySQL 8.0 Security
DevTalks.ro 2019 What's New in MySQL 8.0 SecurityDevTalks.ro 2019 What's New in MySQL 8.0 Security
DevTalks.ro 2019 What's New in MySQL 8.0 Security
 
DevTalks.ro 2019 MySQL Data Masking Talk
DevTalks.ro 2019 MySQL Data Masking TalkDevTalks.ro 2019 MySQL Data Masking Talk
DevTalks.ro 2019 MySQL Data Masking Talk
 
FOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component InfrastructureFOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component Infrastructure
 
MySQL Enterprise Data Masking
MySQL Enterprise Data MaskingMySQL Enterprise Data Masking
MySQL Enterprise Data Masking
 
Percona Live Europe 2018: What's New in MySQL 8.0 Security
Percona Live Europe 2018: What's New in MySQL 8.0 SecurityPercona Live Europe 2018: What's New in MySQL 8.0 Security
Percona Live Europe 2018: What's New in MySQL 8.0 Security
 
Pl18 saving bandwidth
Pl18 saving bandwidthPl18 saving bandwidth
Pl18 saving bandwidth
 
BGOUG17: Cloudy with a chance of MySQL
BGOUG17: Cloudy with a chance of MySQLBGOUG17: Cloudy with a chance of MySQL
BGOUG17: Cloudy with a chance of MySQL
 
Pl17: MySQL 8.0: security
Pl17: MySQL 8.0: securityPl17: MySQL 8.0: security
Pl17: MySQL 8.0: security
 
Fosdem17 honeypot your database server
Fosdem17 honeypot your database serverFosdem17 honeypot your database server
Fosdem17 honeypot your database server
 
2016 oSC MySQL Firewall
2016 oSC MySQL Firewall2016 oSC MySQL Firewall
2016 oSC MySQL Firewall
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
 
OUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQLOUGLS 2016: How profiling works in MySQL
OUGLS 2016: How profiling works in MySQL
 

Recently uploaded

Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 

Recently uploaded (20)

Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 

How to add stuff to MySQL

  • 1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Add Stuff to MySQL Georgi “Joro” Kodinov Team Lead, SrvGen Team A Guided Tour
  • 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2
  • 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Agenda 3 • The basic way: user defined functions • The old way: plugins • The new way: components • The advanced way: pull requests
  • 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | User Defined Functions The Basic Way 4
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Architecture of UDFs 5 SQL UDF call Result Client Server UDF Library
  • 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Pros and Cons Pros Cons Easy A single return value Well documented No way to generate SQL errors SQL callable Limited data type support Dynamically loadable Need to be defined one by one Can also make aggregate functions 6 User Defined Functions
  • 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | A User Defined Function: sql/udf_example.com 7 A loop over the arguments Check for NULL values Argument type Returning a result To return a NULL result set to 1
  • 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Compiling and Running [gkodinov@loki01]~/work/mysql-8.0/sql: gcc -I ../include/ -I ../libbinlogevents/export/ -I ../bld/include/ -shared -std=c++11 -fPIC -o udf_example.so udf_example.cc 8
  • 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Plugins The Old Way 9
  • 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Architecture of Plugins 10 SQL Plugin API call Result Client Server Plugin Library Plugin Service
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Pros and Cons Pros Cons Better known Two plugins cannot co-operate directly Documented Plugins are linked with the server symbols Can respond to events in server Plugin APIs not easily extensible Multiple active plugins Complex loading/unloading sequence Can call back into the server code No explicit dependencies Dynamically loadable Hard to add new plugin APIs Lots of examples Good amount of useful plugin APIs 11 Plugins
  • 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 12 Sample plugin: plugin/auth/auth_socket.cc
  • 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Compiling the plugin • Need a source distro • Put in plugin/ • Add CMakeLists.txt 13
  • 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Using the plugin 14 Install the plugin Create a user using the plugin Authenticate Verify the result
  • 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Components The New Way 15
  • 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Architecture of Components 16 SQL Client Server Services
  • 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Pros and Cons Pros Cons Explicit Dependencies Not all plugin APIs are migrated to components All components are equal and can communicate Not available in versions older than MySQL 8.0 Can dynamically add new service implementations Relatively new: lacks some refinements Can override existing service implementations Currently supports mostly C APIs Can provide soft transition by keeping the old and the new Dynamically loadable Can be adaptive to the services present Does not require the server binary to be built 17 Components
  • 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Sample Service Definition And Implementation 18
  • 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Sample Component 19 What service implementations a component provides What service implementations a component requires Component metadata Component Definition Shared Library Definition
  • 20. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Find And Use a Service: The Low Level Way 20
  • 21. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | How to Find And Use a Service: The Easier Way 21
  • 22. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Pull Requests The Advanced Way 22
  • 23. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 23 Pull Requests
  • 24. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | The New And Improved Doxygen Manual 24
  • 25. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Summary • Always consider a component first • Go to plugin If you: – need to implement an existing, not-yet-migrated plugin API – need to call into an existing, not-yet-migrated plugin service • Go to UDFs if you need an SQL callable function • Go to pull requests if none of the above fits 25
  • 26. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 26

Editor's Notes

  1. O in st_mysql_socket_auth: we take any client plugin