SlideShare a Scribd company logo
1 of 26
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 2019ana manso
 
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015
Slidedeck MCS Demo eines Anwendungsfalles - DOAG2015Nadine 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 Gop6academy
 
Kochi Mulesoft Meetup #6
Kochi Mulesoft Meetup #6Kochi Mulesoft Meetup #6
Kochi Mulesoft Meetup #6sumitahuja94
 
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 HelidonDmitry 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 webp6academy
 
Oracle OpenWorld 2015
Oracle OpenWorld 2015Oracle OpenWorld 2015
Oracle OpenWorld 2015p6academy
 
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 laterp6academy
 
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.1p6academy
 
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 ApplicationsAbhishek 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 2019Oracle Developers
 
GraphQL Advanced
GraphQL AdvancedGraphQL Advanced
GraphQL AdvancedLeanIX 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 MeetingIMTC
 
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 patternsJesse 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 2018Olivier 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 APEXDavidPeake15
 
Diagnose Your Microservices
Diagnose Your MicroservicesDiagnose Your Microservices
Diagnose Your MicroservicesMarcus Hirt
 
Microservices at Scale with Istio
Microservices at Scale with IstioMicroservices at Scale with Istio
Microservices at Scale with IstioJesse Butler
 
Functions and DevOps
Functions and DevOpsFunctions and DevOps
Functions and DevOpsShaun Smith
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Edward 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 MicroservicesBobby Curtis
 
Oracle goldegate microservice
Oracle goldegate microserviceOracle goldegate microservice
Oracle goldegate microserviceMojtaba 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 2015Edward Burns
 
2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portionmnriem
 
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 2018Oracle 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 developersONE BCG
 
Replication Whats New in Mysql 8
Replication Whats New in Mysql 8Replication Whats New in Mysql 8
Replication Whats New in Mysql 8Luí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 AppPaulo 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 reportingp6academy
 
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 DefinitionPhil 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

2023 TurnovoConf MySQL Authentication.pptx
2023 TurnovoConf MySQL Authentication.pptx2023 TurnovoConf MySQL Authentication.pptx
2023 TurnovoConf MySQL Authentication.pptxGeorgi Kodinov
 
2022 TurnovoConf MySQL за начинаещи.pptx
2022 TurnovoConf MySQL за начинаещи.pptx2022 TurnovoConf MySQL за начинаещи.pptx
2022 TurnovoConf MySQL за начинаещи.pptxGeorgi Kodinov
 
OpenSUSE Conf 2020 MySQL Clone
OpenSUSE Conf 2020 MySQL CloneOpenSUSE Conf 2020 MySQL Clone
OpenSUSE Conf 2020 MySQL CloneGeorgi Kodinov
 
2020 pre fosdem mysql clone
2020 pre fosdem   mysql clone2020 pre fosdem   mysql clone
2020 pre fosdem mysql cloneGeorgi Kodinov
 
2019 BGOUG Autumn MySQL Clone
2019  BGOUG Autumn MySQL Clone2019  BGOUG Autumn MySQL Clone
2019 BGOUG Autumn MySQL CloneGeorgi 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 serverGeorgi 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_schemaGeorgi 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 SecurityGeorgi 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 TalkGeorgi Kodinov
 
FOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component InfrastructureFOSDEM19 MySQL Component Infrastructure
FOSDEM19 MySQL Component InfrastructureGeorgi Kodinov
 
MySQL Enterprise Data Masking
MySQL Enterprise Data MaskingMySQL Enterprise Data Masking
MySQL Enterprise Data MaskingGeorgi 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 SecurityGeorgi 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 MySQLGeorgi Kodinov
 
Pl17: MySQL 8.0: security
Pl17: MySQL 8.0: securityPl17: MySQL 8.0: security
Pl17: MySQL 8.0: securityGeorgi Kodinov
 
Fosdem17 honeypot your database server
Fosdem17 honeypot your database serverFosdem17 honeypot your database server
Fosdem17 honeypot your database serverGeorgi Kodinov
 
2016 oSC MySQL Firewall
2016 oSC MySQL Firewall2016 oSC MySQL Firewall
2016 oSC MySQL FirewallGeorgi 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 CodeGeorgi 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 MySQLGeorgi Kodinov
 
Openfest15 MySQL Plugin Development
Openfest15 MySQL Plugin DevelopmentOpenfest15 MySQL Plugin Development
Openfest15 MySQL Plugin DevelopmentGeorgi Kodinov
 

More from Georgi Kodinov (20)

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
 
Openfest15 MySQL Plugin Development
Openfest15 MySQL Plugin DevelopmentOpenfest15 MySQL Plugin Development
Openfest15 MySQL Plugin Development
 

Recently uploaded

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

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