• No results found

lift off Daemon Information schema Full Text SE Storage Whats up next? MySQL Plugins

N/A
N/A
Protected

Academic year: 2021

Share "lift off Daemon Information schema Full Text SE Storage Whats up next? MySQL Plugins"

Copied!
42
0
0

Loading.... (view fulltext now)

Full text

(1)

MySQL Plugins

Erkan Yanar [email protected]

Blog: linsenraum.de/erkules

Xing:www.xing.com/profile/Erkan Yanar

(2)
(3)

Ein Plug-in (h¨aufig auch Plugin; von engl. to plug in, “einst¨opseln, anschließen”, deutsch etwa

“Erweiterungsmodul”) ist ein Computerprogramm, das in ein anderes Softwareprodukt “eingeklinkt” wird und damit dessen Funktionalit¨at erweitert.

(4)
(5)

Break it

Plugins k¨onnen zur Laufzeit geladen werden Kein Neukompelieren Kein Neustart

(6)

mysql> INSTALL PLUGIN pluginname SONAME ’plug.so’ mysql> UNINSTALL PLUGIN pluginname

mysql> SHOW PLUGINS

mysql> SHOW VARIABLES LIKE ’plugin dir’ - -disable-plugin-plugin name

- -plugin-plugin name=OFF

(7)

PluginTypen

PluginTypen (MySQL 5.5/Maria 5.2)

Daemon

Information Schema Full Text Parser StorageEngine Authentication Replication Audit Services

(8)

Quelle: Plugin

mysql declare plugin Makro Plugintyp

(9)

mysql_declare_plugin(semi_sync_slave) {

MYSQL_REPLICATION_PLUGIN, /* PluginTyp plugin.h */ &semi_sync_slave_plugin, /* Info */

"rpl_semi_sync_slave", /* Pluginname */ "He Zhenxing", /* autor */

"Semi-synchronous replication slave", /* description */ PLUGIN_LICENSE_GPL, /* Licenz */

semi_sync_slave_plugin_init, /* Plugin Init */ semi_sync_slave_plugin_deinit, /* Plugin Deinit */

0x0100 /* Version (1.0) */,

semi_sync_slave_status_vars, /* status variables */ semi_sync_slave_system_ vars, /* system variables */

NULL /* config options aka END */

}

(10)

Daemon

MYSQL DAEMON PLUGIN

Status Variables Global Variables

(11)

Beispiele

Außerhalb von Oracle

(12)

Information schema

MYSQL INFORMATION SCHEMA PLUGIN

INFORMATION SCHEMA gibt Zugriff auf Datenbank-Metadaten Auch als Data Dictionary oder Systemkatalog bekannt.

daemon + Tabellen im I S (read only)

(13)

Beispiele

sigar vmstat

StorageEngines QueryCache

(14)

Fulltext: MYSQL FTPARSER PLUGIN

Hooks DML und MATCH() .. AGAINST Text tokenizen Index erstellen mysql parse() mysql add word() HA CAN FULLTEXT

CREATE TABLE ta (a text,FULLTEXT(a) WITH PARSER plugin); SELECT ...MATCH (a) AGAINST(...);

(15)

Storage Engines

sql/handler.h Daten Indizes Binlog FULLTEXT partition usw.

(16)
(17)

CREATE TABLE name (. . . ) ENGINE=engine;

(18)

MYSQL STORAGE ENGINE PLUGIN

HA CAN FULLTEXT HA CAN GEOMETRI HA CAN SQL HANDLER HA BINLOG ROW CAPABLE HA CAN INSERT DELAYED HA NO TRANSACTIONS methods create() open() write row() index read() table flags() commit() show status() savepoint rollback()

(19)

BuiltInStorageEngines

MyISAM Bis 5.1 Default Geringer Footprint FULLTEXT TableLocking

Kein lockfreies Backup Lesestark Seit 5.5. Default RI MVCC ACID Transaktionen lockfreies Backup Clustered Index

(20)

ARCHIVE revisionssichere Archivierung INSERT/SELECT Platzsparend Schnell CSV Daten Officekompatibel speichern

Auf ODBC verzichten :-) keine Indizes

(21)

MERGE

Wrapper f¨ur MyISAM

Vereinigung von Tabellen keine Tabelle

nur eine beschreibbar

CREATE TABLE . . . ENGINE=MERGE UNION=(. . . ) INSERT METHOD=LAST

MEMORY Speicher

kein TEXT/BLOB feste Zeilenl¨ange

(22)

NDB-Cluster

Shared Nothing HA Hoher Durchsatz Skaliert Schreibstark Synchrone Replikation

(23)
(24)

Aria 1.5 ISAM → MyISAM→ Maria crashsafe MVCC,ACID FULLTEXT Transaktionen (ab 2.0) Row Locking (ab 2.0)

XTRADB

Fork vom InnoDB-Plugin (Oracle)

percona.com schnelles recovery etc.

(25)

PBXT

Paul McCullagh

Write Once/Sweeper Kein R-Cache Polution RI

ACID logbased MVCC

Row Level Locking Kein Undo

(26)

Q4M

Oku Kazuho

Q4M - Die Message Queue Engine Queue 4 MySQL RabbitMQ? Messages mit SQL verwalten asynchron

log based fileformat forward

priorit¨at Howto im Blog

(27)

OQGraph

Antony Curtis and Arjen Lentz

Graphentheorie neo4j?

”noch“ memory only

Howto im Blog Netzwerk Abh¨angigkeiten NestedSets byebye

(28)

FEDERATED

X

Patrick Galbraith

Zugriff auf Tabellen via Netzwerk Verbindungsdaten im CONNECTION

CREATE TABLE name (. . . ) ENGINE=FEDERATED CONNECTION=’mysql://user:pass@host/db/table’;

(29)

Spider

Kentoku Shiba

Spider

Partitionierung ¨ubers Netz Federated + XA

wow

i.e. joins auf shards part,sub + part,sub

CREATE TABLE spidi ( .. ) ENGINE=SPIDER Connection ’table spidi, user

”i“, password”p“ ’ PARTITION BY RANGE (col)(

partition p1 . . . comment ’host

(30)

Sphinx

SPHINX Full-text Indiziert Gewichte Attribute Cluster SPHINXSE

CREATE TABLE table (. . . ) ENGINE=SPHINX CONNECTION=’sphinx://localhost/indexname’

(31)

auth-plugin

MYSQL AUTHENTICATION PLUGIN

Authentifizierung only

(32)

INSTALL PLUGIN socket_peercred SONAME ’auth_socket.so’;

CREATE USER erkan IDENTIFIED VIA socket_peercred;

select user,host,password,plugin from mysql.user where user=’erkan’; +---+---+---+---+

| user | host | password | plugin | +---+---+---+---+ | erkan | % | | socket_peercred | +---+---+---+---+

(33)

static struct st_mysql_auth socket_auth_handler= { MYSQL_AUTHENTICATION_INTERFACE_VERSION, 0, /* client plugin */ socket_auth /* function */ }; mysql_declare_plugin(socket_auth) { MYSQL_AUTHENTICATION_PLUGIN, &socket_auth_handler, "socket_peercred", "Sergei Golubchik",

"Unix Socket based authentication", PLUGIN_LICENSE_GPL, NULL, NULL, 0x0100, NULL, NULL, NULL } mysql_declare_plugin_end;

(34)

Replication-plugin

MYSQL REPLICATION PLUGIN

INSTALL PLUGIN ’rpl semi sync master’ SONAME ’semisync master.so’; SET rpl semi sync master enabled=1;

(35)

audit-plugin

MYSQL AUDIT PLUGIN

GeneralLogHook ErrorLogHook ResultSetHook SQLStat

(36)

Server Services

sql/sql plugin services.h Zugriff auf Serverfunktionen my malloc my sync thd alloc

(37)

Es wurden ignoriert: Tokutek ScaleDB AWSS3 infobright/infinidb IBMDB2I VP drizzle MariaDB-CREATE-Extensions

(38)

MySQL 5.1 Plugin Developement

Andrew Hutchings, Sergei Golubchik Roland Bouman

forge.mysql.com/.../FOSDEM 2009-Roland Bouman-MySQL Plugins.pdf

Sergei Golubchik Erkan Yanar http://linsenraum.de/erkules/2010/11/the-more-you-ignore-me-the-closer-i-get.html http://linsenraum.de/erkules/2010/10/q4m-schlange-stehen-mit-mysql.html http://linsenraum.de/erkules/2010/11/klopf-klopf—authentication-framework-fur-mysql.html http://linsenraum.de/erkules

(39)

Bildernachweis

http://commons.wikimedia.org/wiki/File:Lego Chicago City View 2001.jpg

http://commons.wikimedia.org/wiki/File:2005-08-30-heating-pipe-weld.jpg

http://commons.wikimedia.org/wiki/File:Belling-Lee-Stecker.jpg

http://commons.wikimedia.org/wiki/File:Der Daemon Baphomet.PNG

http://commons.wikimedia.org/wiki/File:Hungary with Turky in Europe.jpg

(40)

Bildernachweis

http://commons.wikimedia.org/wiki/File:Cigar box.jpg http://yoshinorimatsunobu.blogspot.com/2010/10/using-mysql-as-nosql-story-for.html http://forge.mysql.com/w/images/f/fd/Custom-engine-overview.png http://www.innodb.com/ http://commons.wikimedia.org/wiki/File:Historisches-Archiv-des-Erzbistums-K%C3%B6ln-Lagerung-des-Archivgutes.JPG http://www.flickr.com/photos/janten/1119099545/sizes/o/

(41)

Bildernachweis

http://commons.wikimedia.org/wiki/File:Fotothek df ps 0000970 Landschaften %5E H%C3%BCgellandschaften -Gebirgslandschaften %5E .jpg

http://dev.mysql.com/tech-resources/articles/pbxt-storage-engine.html

http://3.bp.blogspot.com/ 3l-X4JQ1EX4/S6f4IHWlpdI/AAAAAAAAATk/ e4oLASegOE/s1600-h/Screen+shot+2010-03-23+at+7.50.38+AM.png

(42)

Bildernachweis

http://upload.wikimedia.org/wikipedia/commons/8/80/Bahnsteig Wittlich.jpg

http://commons.wikimedia.org/wiki/File:Bundesarchiv B 145 Bild-F000250-0053, Deutsch-deutsche Grenze bei Heldra, BGS-Beamter.jpg

http://commons.wikimedia.org/wiki/File:Dna-split.png

http://commons.wikimedia.org/wiki/File:Bundesarchiv Bild 183-R0117-0003, VEB Robotron Elektronik Dresden, Qualit%C3%A4tskontrolle.jpg

References

Related documents

The greatest efficiency can be gained when both the metadata and full-text index plugins are using the same storage—for example, the PostgreSQL (metadata) and TSearch2

You can specify a specific source for four sources (PLOS, BMC, Crossref, and Entrez), but any other publishers we guess the publisher form the input DOI(s), then attempt to

• Deliver an exceptional recruitment experience in all dealings with clients • Know the client market intimately and tangibly deliver the Prime proposition • Manage

Information stored in an ARCHIVE storage engine table is compressed and cannot be modified and so ARCHIVE tables are perfect for storing log data (which you don't want to be able

In rows inserted into statement on tables returns a different schemas you specify for example if needed by from sql select schema table a table with you create a procedural api...

Top three findings (by prevalence) were: fostering relationships with people both inside and outside of prison is important to prisoners with palliative and end of life care

To do this, click Select data storage in the Data storage settings section, then select the type of database you wish to use (Oracle, Microfost SQL Server, PostgreSQL, MySQL

with Chitra Banerjee-Divakaruni Fulltext PDF 04 VIshwanath Bite Vishwanath Bite in Conversation Fulltext PDF.. with