MySQL Plugins
Erkan Yanar [email protected]Blog: linsenraum.de/erkules
Xing:www.xing.com/profile/Erkan Yanar
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.
Break it
Plugins k¨onnen zur Laufzeit geladen werden Kein Neukompelieren Kein Neustart
INSTALL PLUGIN pluginname SONAME ’plugin.so’ UNINSTALL PLUGIN pluginname
SHOW PLUGINS
SHOW VARIABLES LIKE ’plugin dir’ - -disable-plugin-plugin name
- -plugin-plugin name=OFF
PluginTypen
PluginTypen (5.1)
Daemon
Information Schema Full Text Parser StorageEngine
Daemon
Status Variables Global Variables
Beispiele
Außerhalb von OracleInformation schema
INFORMATION SCHEMA gibt Zugriff auf Datenbank-Metadaten Auch als Data Dictionary oder Systemkatalog bekannt.
daemon + Tabellen im I S
Beispiele
sigar vmstat SE
Fulltext
Text extrahieren Zeichens¨atze parsen Index erstellen HA CAN FULLTEXT
CREATE TABLE ta (a text,FULLTEXT(a) WITH PARSER plugin); SELECT ...MATCH (a) AGAINST(...);
Beispiele
exif pdf
http://www.mnogosearch.org/doc/msearch-udmstemmer.html
Storage Engines
sql/handler.h Daten Indizes Binlog FULLTEXT partition usw.CREATE TABLE name (. . . ) ENGINE=engine; ALTER TABLE name ENGINE=engine;
MyISAM
Klassiker/Default Geringer Footprint FULLTEXT TableLocking
Kein lockfreies Backup Lesestark Ab 5.5. Default RI MVCC ACID Transaktionen lockfreies Backup Clustered Index
ARCHIVE revisionssichere Archivierung INSERT/SELECT Platzsparend Schnell CSV Daten Officekompatibel speichern
Auf ODBC verzichten :-) keine Indizes
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
NDB-Cluster
Shared Nothing HA Hoher Durchsatz Skaliert Schreibstark Synchrone ReplikationAria 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.
PBXT
Paul McCullaghWrite Once/Sweeper Kein R-Cache Polution RI
ACID logbased MVCC
Row Level Locking Kein Undo
Q4M
Oku KazuhoQ4M - Die Message Queue Engine
Queue 4 MySQL Messages mit SQL verwalten
asynchron
log based fileformat forward
priorit¨at Howto im Blog
OQGraph
Antony Curtis and Arjen LentzGraphentheorie
”noch“ memory only
Howto im Blog Netzwerk Abh¨angigkeiten NestedSets byebye
FEDERATED
X
Patrick GalbraithZugriff auf Tabellen via Netzwerk Verbindungsdaten im CONNECTION
CREATE TABLE name (. . . ) ENGINE=FEDERATED CONNECTION=’mysql://user:pass@host/db/table’;
Spider
Kentoku ShibaSpider
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
Sphinx
SPHINX Full-text Indiziert Gewichte Attribute Cluster SPHINXSECREATE TABLE table (. . . ) ENGINE=SPHINX CONNECTION=’sphinx://localhost/indexname’
AWSS3
Tabellen auf Amazon
Tabellen werden bei Amazon abgelegt
http://mark.atwood.name/code/mysql-awss3/
auth-plugin
replication-plugin
Es wurden ignoriert: Tokutek ScaleDB infobright/infinidb IBMDB2I VP drizzle
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
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
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/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
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