<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
  <title>Planet MySQL</title>
  <link>http://www.planetmysql.org/</link>
  <pubDate>Sat, 25 May 2013 03:30:02 +0000</pubDate>
  <language>en</language>
  <description>Planet MySQL - http://www.planetmysql.org/</description>

  <item>
    <title>Holland Backup Manager</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-7953513766786004980.post-1372455355610603681</guid>
    <link>http://blog.mysqlboy.com/2013/05/holland-backup-manager.html</link>
    <description>Part 1 - Installing Holland Backup ManagerI spoke at Percona Live Conference and Expo 2013 about backups. Part of the talk focussed on the backup products in the ecosystem that will help you make a backup of your MySQL data. This follow-up article touches on one of the frameworks from my talk, the Holland Backup Manager. I was able to have a chat with some of the guys on the Rackspace booth about Holland and had some questions regarding features answered. Holland is a backup framework focussing mostly on MySQL backups but it is pluggable so you can write add backup providers to extend it to your own needs. Using the framework you're able to configure and deploy backup jobs of varying scope to multiple machines. The framework which was originally developed at Rackspace, currently supports mysqldump, lvm, xtrabackup and pgdump (Postgres) also sqllite. The latest version is number 1.0.8 which brings a few nice new features with it. I'll talk about the most significant of these in the third of the series.  I want to show some installation, configuration and then use of the framework. I'm a fan of this project and if you've got the need to standardise whilst being flexible then Holland could be the solution you've been looking for. Firstly, head over to github to grab the files. https://github.com/holland-backup/holland I've been using vagrant to provide a quick VM environment. This OS I'm using here is a CentOS 6.4 64bit host running in Virtualbox. All dependencies for Holland should be available on the popular package managers but if you're using something other then debian (apt-get) or redhat based (yum) then you might require some research elsewhere to meet the requirements of Holland. Download the zip archive from github (the extension was lost in wget but it is a .zip file) [vagrant@node1 ~]$ wget https://github.com/holland-backup/holland/archive/master.zip ... Saving to: `master'  100%[==================================================&amp;gt;] 602,186      572K/s   in 1.0s (572 KB/s) - `master' saved [602186/602186] So then proceed to unzip your archive [vagrant@node1 ~]$ unzip ./master Archive:  ./master 832eaa6a0fff56a3009cdde22eda4746203c97f6    creating: holland-master/  inflating: holland-master/CHANGES.txt  inflating: holland-master/INSTALL  inflating: holland-master/LICENSE  inflating: holland-master/README   creating: holland-master/config/  inflating: holland-master/config/README... ProTip: Take some time to go through the various Holland directories. Throughout the directories there README and INSTALL files that will explain more about the accompanying files.  [vagrant@node1 holland-master]$ ls -ltotal 56-rw-rw-r--  1 vagrant vagrant 7064 May 13 17:45 CHANGES.txtdrwxrwxr-x  4 vagrant vagrant 4096 May 13 17:45 configdrwxrwxr-x  3 vagrant vagrant 4096 May 13 17:45 contribdrwxrwxr-x  4 vagrant vagrant 4096 May 13 17:45 docsdrwxrwxr-x  7 vagrant vagrant 4096 May 13 17:45 holland-rw-rw-r--  1 vagrant vagrant 1782 May 13 17:45 INSTALL-rw-rw-r--  1 vagrant vagrant 3290 May 13 17:45 LICENSEdrwxrwxr-x 13 vagrant vagrant 4096 May 13 17:45 plugins-rw-rw-r--  1 vagrant vagrant  514 May 13 17:45 README-rw-rw-r--  1 vagrant vagrant   62 May 13 17:45 setup.cfg-rw-rw-r--  1 vagrant vagrant 1441 May 13 17:45 setup.pydrwxrwxr-x  2 vagrant vagrant 4096 May 13 17:45 tests-rwxr-xr-x  1 vagrant vagrant 1782 May 13 17:45 tomsay.pyBefore going any further lets take care of the dependencies. They're easily met using yum/apt or if you want to compile them yourself then go right ahead;&amp;nbsp   - python-setuptools&amp;nbsp   - mysqldb (python's mysql connector)Now, lets take care of some directories that need to exists. These are configurable later, but for simplicity sake we'll roll forward with the Holland defaults. Your environment is likely to be different especially if you're mounting remote storage to store the backup files you make. [vagrant@node1 config]$ sudo mkdir -p /etc/holland [vagrant@node1 plugins]$ sudo mkdir -p /var/log/holland [vagrant@node1 plugins]$ sudo mkdir -p /var/spool/holland  Now the directories we've created will only be writable to root since we needed elevated privileges to make them. You might choose to chmod the directories if you're going to use a specific backup user to run your backup jobs.  Now we're ready to run the python setup file from the root of the unarchived directory [vagrant@node1 holland-master]$ sudo python ./setup.py installrunning installrunning bdist_eggrunning egg_infocreating holland.egg-infowriting holland.egg-info/PKG-INFO...Installing holland script to /usr/binInstalled /usr/lib/python2.6/site-packages/holland-1.0.8-py2.6.eggProcessing dependencies for holland==1.0.8Finished processing dependencies for holland==1.0.8Without any errors in the previous output it's safe to assume we're installed. [vagrant@node1 config]$ holland --versionHolland Backup v1.0.8Copyright (c) 2008-2010 Rackspace US, Inc.More info available at http://hollandbackup.orgLets review what is in the plugin directory. These are the providers. Some are core libraries for the use of particular providers. There's also an example and random directory which we will reference in the next article on config. [vagrant@node1 plugins]$ ls -w1ACTIVEholland.backup.exampleholland.backup.mysqldumpholland.backup.mysqlhotcopyholland.backup.mysql_lvmholland.backup.pgdumpholland.backup.randomholland.backup.sqliteholland.backup.xtrabackupholland.lib.commonholland.lib.lvmholland.lib.mysqlREADME There are a couple of essential installs we need to take care of before we're ready to tackle the plugins for the backup tools. These are the holland.lib.common &amp;amp; holland.lib.mysql. For each you need to run the setup.py file from within the directories. The output should look something like the following. [vagrant@node1]$ cd holland.lib.common/[vagrant@node1 holland.lib.common]$ sudo python setup.py installrunning install...Adding holland.lib.common 1.0.8dev to easy-install.pth fileInstalled /usr/lib/python2.6/site-packages/holland.lib.common-1.0.8dev-py2.6.eggProcessing dependencies for holland.lib.common==1.0.8devFinished processing dependencies for holland.lib.common==1.0.8dev[vagrant@node1 holland.lib.common]$ cd ../holland.lib.mysql/[vagrant@node1 holland.lib.mysql]$ sudo python setup.py installrunning install...Adding holland.lib.mysql 1.0.8dev to easy-install.pth fileInstalled /usr/lib/python2.6/site-packages/holland.lib.mysql-1.0.8dev-py2.6.eggProcessing dependencies for holland.lib.mysql==1.0.8devFinished processing dependencies for holland.lib.mysql==1.0.8devNow, I'm mainly interested in mysqldump and xtrabackup but you might want to use the mysql_lvm. I don't think there are many takers for mysqlhotcopy these days. The same steps apply for each provider you want to install on each machine. [vagrant@node1 holland.backup.mysqldump]$ sudo python setup.py install running install ... Adding holland.backup.mysqldump 1.0.8dev to easy-install.pth file  Installed /usr/lib/python2.6/site-packages/holland.backup.mysqldump-1.0.8dev-py2.6.egg Processing dependencies for holland.backup.mysqldump==1.0.8dev Finished processing dependencies for holland.backup.mysqldump==1.0.8dev and then finally from the xtrabackup directory; [vagrant@node1 plugins]$ cd holland.backup.xtrabackup/ [vagrant@node1 holland.backup.xtrabackup]$ sudo python setup.py install running install ... Adding holland.backup.xtrabackup 1.0.8dev to easy-install.pth file  Installed /usr/lib/python2.6/site-packages/holland.backup.xtrabackup-1.0.8dev-py2.6.egg Processing dependencies for holland.backup.xtrabackup==1.0.8dev Finished processing dependencies for holland.backup.xtrabackup==1.0.8dev So in summary it's the library files for the plugins;&amp;nbsp; - holland.lib.common&amp;nbsp; - holland.lib.mysql&amp;nbsp; - holland.lib.lvm (depending if you're going to use it)In part two I'll be giving an overview of the config files and then part three will be some cookbook-like config for the various providers.</description>
    <content:encoded><![CDATA[<br /><article><div><a href="http://hollandbackup.org/"><img border="0" src="http://2.bp.blogspot.com/-h70AmgilHyg/UZ-RPWNYEpI/AAAAAAAAI_o/IRSA1vzphIg/s320/holland_mysql_xtrabackup.png" /></a></div><h1>Part 1 - Installing Holland Backup Manager</h1>I spoke at Percona Live Conference and Expo 2013 about backups. Part of the talk focussed on the backup products in the ecosystem that will help you make a backup of your MySQL data. This follow-up article touches on one of the frameworks from my talk, the Holland Backup Manager. I was able to have a chat with some of the guys on the Rackspace booth about Holland and had some questions regarding features answered. <br /><br />Holland is a backup framework focussing mostly on MySQL backups but it is pluggable so you can write add backup providers to extend it to your own needs. Using the framework you're able to configure and deploy backup jobs of varying scope to multiple machines. The framework which was originally developed at Rackspace, currently supports mysqldump, lvm, xtrabackup and pgdump (Postgres) also sqllite. The latest version is number 1.0.8 which brings a few nice new features with it. I'll talk about the most significant of these in the third of the series.  <br />I want to show some installation, configuration and then use of the framework. I'm a fan of this project and if you've got the need to standardise whilst being flexible then Holland could be the solution you've been looking for. <br /><br />Firstly, head over to github to grab the files. https://github.com/holland-backup/holland <br />I've been using vagrant to provide a quick VM environment. This OS I'm using here is a CentOS 6.4 64bit host running in Virtualbox. All dependencies for Holland should be available on the popular package managers but if you're using something other then debian (apt-get) or redhat based (yum) then you might require some research elsewhere to meet the requirements of Holland. <br /><br /><a href="https://github.com/holland-backup/holland" title="Holland Backup Manager">Download the zip archive from github</a> (the extension was lost in wget but it is a .zip file) <br /><div><code>[vagrant@node1 ~]$ wget https://github.com/holland-backup/holland/archive/master.zip ... Saving to: `master'  100%[==================================================&gt;] 602,186      572K/s   in 1.0s (572 KB/s) - `master' saved [602186/602186] </code></div><br />So then proceed to unzip your archive <br /><div><code>[vagrant@node1 ~]$ unzip ./master <br />Archive:  ./master <br />832eaa6a0fff56a3009cdde22eda4746203c97f6 <br />   creating: holland-master/<br />  inflating: holland-master/CHANGES.txt<br />  inflating: holland-master/INSTALL<br />  inflating: holland-master/LICENSE<br />  inflating: holland-master/README<br />   creating: holland-master/config/<br />  inflating: holland-master/config/README<br />... </code></div><br /><div><span>ProTip:</span> Take some time to go through the various Holland directories. Throughout the directories there README and INSTALL files that will explain more about the accompanying files.  </div><br /><div><code>[vagrant@node1 holland-master]$ ls -l<br />total 56<br />-rw-rw-r--  1 vagrant vagrant 7064 May 13 17:45 CHANGES.txt<br />drwxrwxr-x  4 vagrant vagrant 4096 May 13 17:45 config<br />drwxrwxr-x  3 vagrant vagrant 4096 May 13 17:45 contrib<br />drwxrwxr-x  4 vagrant vagrant 4096 May 13 17:45 docs<br />drwxrwxr-x  7 vagrant vagrant 4096 May 13 17:45 holland<br />-rw-rw-r--  1 vagrant vagrant 1782 May 13 17:45 INSTALL<br />-rw-rw-r--  1 vagrant vagrant 3290 May 13 17:45 LICENSE<br />drwxrwxr-x 13 vagrant vagrant 4096 May 13 17:45 plugins<br />-rw-rw-r--  1 vagrant vagrant  514 May 13 17:45 README<br />-rw-rw-r--  1 vagrant vagrant   62 May 13 17:45 setup.cfg<br />-rw-rw-r--  1 vagrant vagrant 1441 May 13 17:45 setup.py<br />drwxrwxr-x  2 vagrant vagrant 4096 May 13 17:45 tests<br />-rwxr-xr-x  1 vagrant vagrant 1782 May 13 17:45 tomsay.py<br /></code></div><br />Before going any further lets take care of the dependencies. They're easily met using yum/apt or if you want to compile them yourself then go right ahead;<br />&nbsp   - python-setuptools<br />&nbsp   - mysqldb (python's mysql connector)<br /><br />Now, lets take care of some directories that need to exists. These are configurable later, but for simplicity sake we'll roll forward with the Holland defaults. Your environment is likely to be different especially if you're mounting remote storage to store the backup files you make. <br /><br /><div><code>[vagrant@node1 config]$ sudo mkdir -p /etc/holland [vagrant@node1 plugins]$ sudo mkdir -p /var/log/holland [vagrant@node1 plugins]$ sudo mkdir -p /var/spool/holland </code> </div><br />Now the directories we've created will only be writable to root since we needed elevated privileges to make them. You might choose to chmod the directories if you're going to use a specific backup user to run your backup jobs.  Now we're ready to run the python setup file from the root of the unarchived directory <div><pre><code>[vagrant@node1 holland-master]$ sudo python ./setup.py install<br />running install<br />running bdist_egg<br />running egg_info<br />creating holland.egg-info<br />writing holland.egg-info/PKG-INFO<br />...<br />Installing holland script to /usr/bin<br /><br />Installed /usr/lib/python2.6/site-packages/holland-1.0.8-py2.6.egg<br />Processing dependencies for holland==1.0.8<br />Finished processing dependencies for holland==1.0.8<br /></code></pre></div><br />Without any errors in the previous output it's safe to assume we're installed. <div><code><pre>[vagrant@node1 config]$ holland --version<br />Holland Backup v1.0.8<br />Copyright (c) 2008-2010 Rackspace US, Inc.<br />More info available at http://hollandbackup.org<br /></code><br /></pre></div><br />Lets review what is in the plugin directory. These are the providers. Some are core libraries for the use of particular providers. There's also an example and random directory which we will reference in the next article on config. <br /><div><pre><code><br />[vagrant@node1 plugins]$ ls -w1<br />ACTIVE<br />holland.backup.example<br />holland.backup.mysqldump<br />holland.backup.mysqlhotcopy<br />holland.backup.mysql_lvm<br />holland.backup.pgdump<br />holland.backup.random<br />holland.backup.sqlite<br />holland.backup.xtrabackup<br />holland.lib.common<br />holland.lib.lvm<br />holland.lib.mysql<br />README<br /></pre></code></div></article> <br />There are a couple of essential installs we need to take care of before we're ready to tackle the plugins for the backup tools. These are the holland.lib.common &amp; holland.lib.mysql. For each you need to run the setup.py file from within the directories. The output should look something like the following. <br /><br /><div><pre><code><br />[vagrant@node1]$ cd holland.lib.common/<br />[vagrant@node1 holland.lib.common]$ sudo python setup.py install<br />running install<br />...<br />Adding holland.lib.common 1.0.8dev to easy-install.pth file<br /><br />Installed /usr/lib/python2.6/site-packages/holland.lib.common-1.0.8dev-py2.6.egg<br />Processing dependencies for holland.lib.common==1.0.8dev<br />Finished processing dependencies for holland.lib.common==1.0.8dev<br /><br />[vagrant@node1 holland.lib.common]$ cd ../holland.lib.mysql/<br />[vagrant@node1 holland.lib.mysql]$ sudo python setup.py install<br />running install<br />...<br />Adding holland.lib.mysql 1.0.8dev to easy-install.pth file<br /><br />Installed /usr/lib/python2.6/site-packages/holland.lib.mysql-1.0.8dev-py2.6.egg<br />Processing dependencies for holland.lib.mysql==1.0.8dev<br />Finished processing dependencies for holland.lib.mysql==1.0.8dev<br /></code><br /></pre></div><br />Now, I'm mainly interested in mysqldump and xtrabackup but you might want to use the mysql_lvm. I don't think there are many takers for mysqlhotcopy these days. The same steps apply for each provider you want to install on each machine. <br /><div><code>[vagrant@node1 holland.backup.mysqldump]$ sudo python setup.py install running install ... Adding holland.backup.mysqldump 1.0.8dev to easy-install.pth file  Installed /usr/lib/python2.6/site-packages/holland.backup.mysqldump-1.0.8dev-py2.6.egg Processing dependencies for holland.backup.mysqldump==1.0.8dev Finished processing dependencies for holland.backup.mysqldump==1.0.8dev </code></div><br />and then finally from the xtrabackup directory; <br /><div><code>[vagrant@node1 plugins]$ cd holland.backup.xtrabackup/ [vagrant@node1 holland.backup.xtrabackup]$ sudo python setup.py install running install ... Adding holland.backup.xtrabackup 1.0.8dev to easy-install.pth file  Installed /usr/lib/python2.6/site-packages/holland.backup.xtrabackup-1.0.8dev-py2.6.egg Processing dependencies for holland.backup.xtrabackup==1.0.8dev Finished processing dependencies for holland.backup.xtrabackup==1.0.8dev </code></div><br />So in summary it's the library files for the plugins;<br />&nbsp; - holland.lib.common<br />&nbsp; - holland.lib.mysql<br />&nbsp; - holland.lib.lvm (depending if you're going to use it)<br /><br />In part two I'll be giving an overview of the config files and then part three will be some cookbook-like config for the various providers.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79569&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79569&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 23:07:00 +0000</pubDate>
    <dc:creator>MySQLBoy</dc:creator>
    <category>mysql</category>
    <category>backups</category>
  </item>

  <item>
    <title>Percona Server for MySQL 5.5.31-30.3 now available</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15668</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/24/percona-server-for-mysql-5-5-31-30-3-now-available/</link>
    <description>Percona Server for MySQL version 5.5.31-30.3Percona is glad to announce the release of Percona Server for MySQL 5.5.31-30.3 on May 24, 2013 (Downloads are available here and from the Percona Software Repositories). Based on MySQL 5.5.31, including all the bug fixes in it, Percona Server 5.5.31-30.3 is now the current stable release in the 5.5 series. All of Percona&amp;#8216;s software is open-source and free, all the details of the release can be found in the 5.5.31-30.3 milestone at Launchpad.New Features:Percona Server has ported the Atomic write support for Fusion-io devices patch from MariaDB. This feature adds atomic write support for directFS filesystem on Fusion-io devices. This feature implementation is considered BETA quality.Percona Server has introduced innodb_read_views_memory and innodb_descriptors_memory status variables in the Extended Show Engine InnoDB Status to improve InnoDB memory usage diagnostics.Bugs Fixed:Fix for bug #1131187 introduced a regression that could cause a memory leak if query cache was used together with InnoDB. Bug fixed #1170103.Fixed the RPM packaging regression that was introduced with the fix for bug #710799. This regression caused mysql schema to be missing after the clean RPM installation. Bug fixed #1174426.Fixed the Percona-Server-shared-55 and Percona-XtraDB-Cluster-shared RPM package dependences. Bug fixed #1050654.Fixed the upstream bug #68999 which caused compiling Percona Server to fail on CentOS 5 and Debian squeeze due to older OpenSSL version. Bug fixed #1183610.If a slave was running with its binary log enabled and then restarted with the binary log disabled, Crash-Resistant Replication could overwrite the relay log info log with an incorrect position. Bug fixed #1092593.Fixed the CVE-2012-5615 vulnerability. This vulnerability would allow remote attacker to detect what user accounts exist on the server. This bug fix comes originally from MariaDB (see MDEV-3909). Bug fixed #1171941.Fixed the CVE-2012-5627 vulnerability, where an unprivileged MySQL account owner could perform brute-force password guessing attack on other accounts efficiently. This bug fix comes originally from MariaDB (see MDEV-3915). Bug fixed #1172090.mysql_set_permission was failing on Debian due to missing libdbd-mysql-perl package. Fixed by adding the package dependency. Bug fixed #1003776.Rebuilding Debian source package would fail because dpatch and automake were missing from build-dep. Bug fixed #1023575 (Stephan Adig).Backported the fix for the upstream bug #65077 from the MySQL 5.6 version, which removed MyISAM internal temporary table mutex contention. Bug fixed #1179978.Release notes for Percona Server for MySQL 5.5.31-30.3 are available in our online documentation. Bugs can be reported on the launchpad bug tracker.The post Percona Server for MySQL 5.5.31-30.3 now available appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<div><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/03/Percona-Server.jpg"><img class="size-full wp-image-13396" alt="Percona Server for MySQL version 5.5.31-30.3" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/03/Percona-Server.jpg" width="247" height="97" /></a><p>Percona Server for MySQL version 5.5.31-30.3</p></div><p>Percona is glad to announce the release of <em><a href="http://www.percona.com/software/percona-server">Percona Server</a> for MySQL</em> 5.5.31-30.3 on May 24, 2013 <em>(Downloads are available <a href="http://www.percona.com/downloads/Percona-Server-5.5/Percona-Server-5.5.31-30.3/">here</a> and from the <a href="http://www.percona.com/doc/percona-server/5.5/installation.html">Percona Software Repositories</a>)</em>. Based on <a href="http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-31.html">MySQL 5.5.31</a>, including all the bug fixes in it, <em>Percona Server</em> 5.5.31-30.3 is now the current stable release in the 5.5 series. All of <em>Percona</em>&#8216;s software is open-source and free, all the details of the release can be found in the <a href="https://launchpad.net/percona-server/+milestone/5.5.31-30.3">5.5.31-30.3 milestone at Launchpad</a>.</p><p><strong>New Features:</strong></p><ul><li><em>Percona Server</em> has ported the <a href="http://www.percona.com/doc/percona-server/5.5/performance/atomic_fio.html#atomic-fio">Atomic write support for Fusion-io devices</a> patch from <em>MariaDB</em>. This feature adds atomic write support for <code>directFS</code> filesystem on <em>Fusion-io</em> devices. This feature implementation is considered BETA quality.</li><li><em>Percona Server</em> has introduced <a href="http://www.percona.com/doc/percona-server/5.5/diagnostics/innodb_show_status.html#innodb_read_views_memory">innodb_read_views_memory</a> and <a href="http://www.percona.com/doc/percona-server/5.5/diagnostics/innodb_show_status.html#innodb_descriptors_memory">innodb_descriptors_memory</a> status variables in the <a href="http://www.percona.com/doc/percona-server/5.5/diagnostics/innodb_show_status.html#innodb-show-status">Extended Show Engine InnoDB Status</a> to improve <em>InnoDB</em> memory usage diagnostics.</li></ul><p><strong>Bugs Fixed:</strong></p><ul><li>Fix for bug <a href="https://bugs.launchpad.net/percona-server/+bug/1131187">#1131187</a> introduced a regression that could cause a memory leak if query cache was used together with <em>InnoDB</em>. Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1170103">#1170103</a>.</li><li>Fixed the RPM packaging regression that was introduced with the fix for bug <a href="https://bugs.launchpad.net/percona-server/+bug/710799">#710799</a>. This regression caused <code>mysql</code> schema to be missing after the clean RPM installation. Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1174426">#1174426</a>.</li><li>Fixed the <code>Percona-Server-shared-55</code> and <code>Percona-XtraDB-Cluster-shared</code> RPM package dependences. Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1050654">#1050654</a>.</li><li>Fixed the upstream bug <a href="http://bugs.mysql.com/bug.php?id=68999">#68999</a> which caused compiling <em>Percona Server</em> to fail on <em>CentOS</em> 5 and <em>Debian</em> squeeze due to older <code>OpenSSL</code> version. Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1183610">#1183610</a>.</li><li>If a slave was running with its binary log enabled and then restarted with the binary log disabled, Crash-Resistant Replication could overwrite the relay log info log with an incorrect position. Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1092593">#1092593</a>.</li><li>Fixed the <a href="http://www.securiteam.com/cves/2012/CVE-2012-5615.html">CVE-2012-5615</a> vulnerability. This vulnerability would allow remote attacker to detect what user accounts exist on the server. This bug fix comes originally from <em>MariaDB</em> (see <a href="https://mariadb.atlassian.net/browse/MDEV-3909">MDEV-3909</a>). Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1171941">#1171941</a>.</li><li>Fixed the <a href="http://www.securiteam.com/cves/2012/CVE-2012-5627.html">CVE-2012-5627</a> vulnerability, where an unprivileged <em>MySQL</em> account owner could perform brute-force password guessing attack on other accounts efficiently. This bug fix comes originally from <em>MariaDB</em> (see <a href="https://mariadb.atlassian.net/browse/MDEV-3915">MDEV-3915</a>). Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1172090">#1172090</a>.</li><li><code>mysql_set_permission</code> was failing on <em>Debian</em> due to missing <code>libdbd-mysql-perl</code> package. Fixed by adding the package dependency. Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1003776">#1003776</a>.</li><li>Rebuilding <em>Debian</em> source package would fail because <code>dpatch</code> and <code>automake</code> were missing from <code>build-dep</code>. Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1023575">#1023575</a> (<em>Stephan Adig</em>).</li><li>Backported the fix for the upstream bug <a href="http://bugs.mysql.com/bug.php?id=65077">#65077</a> from the <em>MySQL</em> 5.6 version, which removed <em>MyISAM</em> internal temporary table mutex contention. Bug fixed <a href="https://bugs.launchpad.net/percona-server/+bug/1179978">#1179978</a>.</li></ul><p>Release notes for <em>Percona Server <em>for MySQL</em></em> 5.5.31-30.3 are available in our <a href="http://www.percona.com/doc/percona-server/5.5/release-notes/Percona-Server-5.5.31-30.3.html">online documentation</a>. Bugs can be reported on the <a href="https://bugs.launchpad.net/percona-server/+filebug">launchpad bug tracker</a>.</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/24/percona-server-for-mysql-5-5-31-30-3-now-available/">Percona Server for MySQL 5.5.31-30.3 now available</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79568&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79568&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 20:24:59 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>MySQL</category>
    <category>Percona Server</category>
    <category>Percona Software</category>
  </item>

  <item>
    <title>Tungsten University: Load a Vertica data warehouse with MySQL data</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-5088740386330348582.post-6279015137858186778</guid>
    <link>http://continuent-tungsten.blogspot.com/2013/05/tungsten-university-load-vertica-data.html</link>
    <description>Continuent Tungsten offers real-time replication from MySQL to a variety of DBMS types including Vertica. In this Tungsten University webcast we will show you the details of setting up MySQL-to-Vertica replication, including the following topics:

Introduction to Continuent Tungsten features for data warehouse loading
Installation for MySQL to Vertica replication
Best practices for applications:</description>
    <content:encoded><![CDATA[Continuent Tungsten offers real-time replication from MySQL to a variety of DBMS types including Vertica. In this Tungsten University webcast we will show you the details of setting up MySQL-to-Vertica replication, including the following topics:

Introduction to Continuent Tungsten features for data warehouse loading
Installation for MySQL to Vertica replication
Best practices for applications:<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79567&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79567&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 19:32:00 +0000</pubDate>
    <dc:creator>Petri Virsunen</dc:creator>
    <category>MySQL</category>
    <category>Vertica</category>
    <category>database replication</category>
    <category>replication</category>
    <category>data warehouse</category>
    <category>Continuent Tungsten</category>
  </item>

  <item>
    <title>Log Buffer #321, A Carnival of the Vanities for DBAs</title>
    <guid isPermaLink="false">http://www.pythian.com/blog/?p=55255</guid>
    <link>http://www.pythian.com/blog/log-buffer-321-a-carnival-of-the-vanities-for-dbas/</link>
    <description>Can&amp;#8217;t find what you want or need? Do you have a tip or trick to share? Do you want to lament over a technical woe? If yes then blog and send it to us for the Log Buffer :), just like this Log Buffer contains tips, tricks and woes.
Oracle:
Fahd Mirza and Tanel Poder throw spotlight on the v$cell_thread_history view with respect to the Exadata.
Mark W. Farnham&amp;#8216;s rightsizing goes on with a roar, as he declares that he is pretty much a green sneaker, tree hugging conservationist.
I would like to use the Microsoft Query tool in Microsoft Excel to extract records from the ERP database. Charles Hooper answers.
Kevin continues with yet another post about Exadata. The time he discusses: Oracle Exadata Database Machine: Proving 160 Xeon E7 Cores Are As “Slow” As 128 Xeon E5 Cores?
Alberto does a post which is a brief discussion about the advantages of activating parallelism by altering the session environment instead of using the alternative ways (hints, DDL).
SQL Server:
Security Questions: Differences between “Grant” and “With Grant?”
Using Scoped Assignments To Show Calendar and Financial Year-To-Date Values In The Same Calculated Measure.
A cool post about Business Objects on Linux and SQL Server.
Is Your Code an English Garden or Ikebana?
The Journey is the Reward: Speaking for SQLPass, where do you start?
Resolving Error Connecting Report Builder to a PowerPivot Data Source.
MySQL:
Stewart Smith is sharing an old note on the Storage Engine API.
A good look at the Non-Deterministic Query in Replication Stream.
The MariaDB project is pleased to announce the immediate availability of the MariaDB 5.5.31.
Fernando had recently had to do some customer work involving the McAfee MySQL Audit Plugin.
There’s a big difference in how plugins are treated in MySQL and how they are treated in Drizzle.
</description>
    <content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>Can&#8217;t find what you want or need? Do you have a tip or trick to share? Do you want to lament over a technical woe? If yes then blog and send it to us for the Log Buffer :), just like this Log Buffer contains tips, tricks and woes.<br />
<span></span><strong>Oracle:</strong></p>
<p><a href="http://fahdmirza.blogspot.com.au/2013/05/gvcellthreadhistory-nice-view.html">Fahd Mirza</a> and <a href="http://blog.tanelpoder.com/2013/05/23/vcell_thread_history-ash-for-exadata-storage-cells/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=vcell_thread_history-ash-for-exadata-storage-cells">Tanel Poder</a> throw spotlight on the v$cell_thread_history view with respect to the Exadata.</p>
<p><a href="http://rsiz.wordpress.com/2013/05/23/vague-andor-misleading-claims-can-undermine-otherwise-useful-themes/">Mark W. Farnham</a>&#8216;s rightsizing goes on with a roar, as he declares that he is pretty much a green sneaker, tree hugging conservationist.</p>
<p>I would like to use the Microsoft Query tool in Microsoft Excel to extract records from the ERP database. <a href="http://hoopercharles.wordpress.com/2013/05/23/everything-or-nothing-in-sql/">Charles Hooper</a> answers.</p>
<p><a href="http://kevinclosson.wordpress.com/2013/05/22/oracle-exadata-database-machine-proving-160-xeon-e7-cores-are-as-slow-as-128-xeon-e5-cores/">Kevin</a> continues with yet another post about Exadata. The time he discusses: Oracle Exadata Database Machine: Proving 160 Xeon E7 Cores Are As “Slow” As 128 Xeon E5 Cores?</p>
<p>Alberto does a post which is a brief discussion about the advantages of activating parallelism by altering the session environment instead of using the alternative ways (hints, <a href="http://www.adellera.it/blog/2013/05/17/alter-session-force-parallel-query-and-indexes/">DDL</a>).</p>
<p><strong>SQL Server:</strong></p>
<p><a href="http://www.jasonstrate.com/">Security</a> Questions: Differences between “Grant” and “With Grant?”</p>
<p><a href="http://cwebbbi.spaces.live.com/">Using</a> Scoped Assignments To Show Calendar and Financial Year-To-Date Values In The Same Calculated Measure.</p>
<p>A cool post about Business <a href="http://www.quest.com/">Objects</a> on Linux and SQL Server.</p>
<p>Is Your <a href="http://www.brentozar.com/">Code</a> an English Garden or Ikebana?</p>
<p>The Journey is the <a href="http://www.jenstirrup.com/search/label/SQLServerPedia%20Syndication">Reward</a>: Speaking for SQLPass, where do you start?</p>
<p><a href="http://www.sqlchick.com/">Resolving</a> Error Connecting Report Builder to a PowerPivot Data Source.</p>
<p><strong>MySQL:</strong></p>
<p><a href="http://www.flamingspork.com/blog/2013/05/24/an-old-note-on-the-storage-engine-api/">Stewart Smith</a> is sharing an old note on the Storage Engine API.</p>
<p>A <a href="http://openquery.com/blog/nondeterministic-query-replication-stream">good</a> look at the Non-Deterministic Query in Replication Stream.</p>
<p>The <a href="http://blog.mariadb.org/mariadb-5-5-31-now-available/">MariaDB</a> project is pleased to announce the immediate availability of the MariaDB 5.5.31.</p>
<p><a href="http://www.mysqlperformanceblog.com/2013/05/23/experiences-with-the-mcafee-mysql-audit-plugin/">Fernando</a> had recently had to do some customer work involving the McAfee MySQL Audit Plugin.</p>
<p>There’s a big difference in how plugins are treated in MySQL and how they are treated in <a href="http://www.flamingspork.com/blog/2013/05/23/mysql-vs-drizzle-plugin-api/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mysql-vs-drizzle-plugin-api">Drizzle</a>.</p>
</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79566&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79566&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 12:34:54 +0000</pubDate>
    <dc:creator>The Pythian Group</dc:creator>
    <category>Log Buffer</category>
    <category>MySQL</category>
    <category>Oracle</category>
    <category>SQL Server</category>
  </item>

  <item>
    <title>ZFS on Linux and MySQL</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15621</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/24/zfs-on-linux-and-mysql/</link>
    <description>I am currently working with a large customer and I am involved with servers located in two data centers, one with Solaris servers and the other one with Linux servers. The Solaris side is cleverly setup using zones and ZFS and this provides a very low virtualization overhead. I learned quite a lot about these technologies while looking at this, thanks to Corey Mosher.On the Linux side, we recently deployed a pair on servers for backup purpose, boxes with 64 300GB SAS drives, 3 raid controllers and 192GB of RAM. These servers will run a few slave instances each of production database servers and will perform the backups.  The write load is not excessive so a single server can easily handle the write load of all the MySQL instances.  The original idea was to configure them with raid-10 + LVM, making sure to stripe the LV when we need to and align the partition correctly.We got decent tpcc performance, nearly 37k NoTPM using 5.6.11 and xfs.  Then, since ZFS on Linux is available and there is in house ZFS knowledge, we decided to reconfigure one of the server and give ZFS a try.  So I trashed the raid-10 arrays, configure JBODs and gave all those drives to ZFS (30 mirrors + spares + OS partition mirror) and I limited the ARC size to 4GB.  I don&amp;#8217;t want to start a war but ZFS performance level was less than half of xfs for the tpcc test and that&amp;#8217;s maybe just normal.  We didn&amp;#8217;t try too hard to get better performance because we already had more than enough for our purpose and some ZFS features are just too useful for backups (most apply also for btrfs). Let&amp;#8217;s review them.SnapshotsZFS does snapshot, like LVM but&amp;#8230; since it is a copy on write filesystem, the snapshots are free, no performance penalty.  You can easily run a server with hundreds of snapshots.  With LVM, your IO performance drops to 33% after the first snapshot so keeping a large number of snapshots running is simply not an option.  With ZFS you can easily have:one snapshot per day for the last 30 daysone snapshot per hour for the last 2 daysone snapshot per 5min for the last 2 hoursand that will be perfectly fine.  Since starting a snapshot take less than a second, you could even be more zealous.  Pretty interesting to speed up point in time recovery when you dataset is 700GB.  If you google a bit with &amp;#8220;zfs snapshot script&amp;#8221; you&amp;#8217;ll many scripts ready for the task.  Snapshots work best with InnoDB, with MyISAM you&amp;#8217;ll have to start the snapshot while holding a &amp;#8220;flush tables with read lock&amp;#8221; and the flush operation will take some time to complete.CompressionZFS can compress data on the fly and it is surprisingly cheap.  In fact the best tpcc results I got were when using compression.  I still have to explain this, maybe it is related to better raid controller write cache use.  Even the fairly slow gzip-1 mode works well.  The tpcc database, which contains a lot of random data that doesn&amp;#8217;t compress well showed a compression ration of 1.70 with gzip-1.  Real data will compress much more.  That gives us much more disk space than we expected so even more snapshots!IntegrityWith ZFS each record on disk has a checksum.  If a cosmic ray flip a bit on a drive, instead of crashing InnoDB, it will be caught by ZFS and the data will be read from the other drive in the mirror.Better availability and disk usageOn purpose, I allocated mirror pairs using drives from different controllers.  That way, if a controller dies, the storage will still be working.  Also, instead of having 1 or 2 spare drives per controller, I have 2 for the whole setup.  A small but yet interesting saving.All put together, ZFS on Linux is a very interesting solution for MySQL backup servers.  All backup solutions have an impact on performance with ZFS the impact is up front and the backups are almost free.The post ZFS on Linux and MySQL appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/03/Percona-Remote-DBA-for-MySQL.jpg"><img class="alignleft size-medium wp-image-13691" style="margin: 9px;" alt="Data center" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/03/Percona-Remote-DBA-for-MySQL-300x194.jpg" width="300" height="194" /></a>I am currently working with a large customer and I am involved with servers located in two data centers, one with Solaris servers and the other one with Linux servers. The Solaris side is cleverly setup using zones and ZFS and this provides a very low virtualization overhead. I learned quite a lot about these technologies while looking at this, thanks to Corey Mosher.</p><p>On the Linux side, we recently deployed a pair on servers for backup purpose, boxes with 64 300GB SAS drives, 3 raid controllers and 192GB of RAM. These servers will run a few slave instances each of production database servers and will perform the backups.  The write load is not excessive so a single server can easily handle the write load of all the MySQL instances.  The original idea was to configure them with raid-10 + LVM, making sure to stripe the LV when we need to and align the partition correctly.</p><p>We got decent tpcc performance, nearly 37k NoTPM using 5.6.11 and xfs.  Then, since ZFS on Linux is available and there is in house ZFS knowledge, we decided to reconfigure one of the server and give ZFS a try.  So I trashed the raid-10 arrays, configure JBODs and gave all those drives to ZFS (30 mirrors + spares + OS partition mirror) and I limited the ARC size to 4GB.  I don&#8217;t want to start a war but ZFS performance level was less than half of xfs for the tpcc test and that&#8217;s maybe just normal.  We didn&#8217;t try too hard to get better performance because we already had more than enough for our purpose and some ZFS features are just too useful for backups (most apply also for btrfs). Let&#8217;s review them.</p><p><b>Snapshots</b></p><p>ZFS does snapshot, like LVM but&#8230; since it is a copy on write filesystem, the snapshots are free, no performance penalty.  You can easily run a server with hundreds of snapshots.  With LVM, your IO performance drops to 33% after the first snapshot so keeping a large number of snapshots running is simply not an option.  With ZFS you can easily have:</p><ul><li><span>one snapshot per day for the last 30 days</span></li><li>one snapshot per hour for the last 2 days</li><li>one snapshot per 5min for the last 2 hours</li></ul><p>and that will be perfectly fine.  Since starting a snapshot take less than a second, you could even be more zealous.  Pretty interesting to speed up point in time recovery when you dataset is 700GB.  If you google a bit with &#8220;zfs snapshot script&#8221; you&#8217;ll many scripts ready for the task.  Snapshots work best with InnoDB, with MyISAM you&#8217;ll have to start the snapshot while holding a &#8220;flush tables with read lock&#8221; and the flush operation will take some time to complete.</p><p><strong>Compression</strong></p><p>ZFS can compress data on the fly and it is surprisingly cheap.  In fact the best tpcc results I got were when using compression.  I still have to explain this, maybe it is related to better raid controller write cache use.  Even the fairly slow gzip-1 mode works well.  The tpcc database, which contains a lot of random data that doesn&#8217;t compress well showed a compression ration of 1.70 with gzip-1.  Real data will compress much more.  That gives us much more disk space than we expected so even more snapshots!</p><p><strong>Integrity</strong></p><p>With ZFS each record on disk has a checksum.  If a cosmic ray flip a bit on a drive, instead of crashing InnoDB, it will be caught by ZFS and the data will be read from the other drive in the mirror.</p><p><strong>Better availability and disk usage</strong></p><p>On purpose, I allocated mirror pairs using drives from different controllers.  That way, if a controller dies, the storage will still be working.  Also, instead of having 1 or 2 spare drives per controller, I have 2 for the whole setup.  A small but yet interesting saving.</p><p>All put together, ZFS on Linux is a very interesting solution for MySQL backup servers.  All backup solutions have an impact on performance with ZFS the impact is up front and the backups are almost free.</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/24/zfs-on-linux-and-mysql/">ZFS on Linux and MySQL</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79565&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79565&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 10:00:12 +0000</pubDate>
    <dc:creator>Yves Trudeau</dc:creator>
    <category>Hardware and Storage</category>
    <category>Insight for DBAs</category>
    <category>MySQL</category>
    <category>Corey Mosher</category>
    <category>Linux</category>
    <category>Solaris</category>
    <category>ZFS</category>
  </item>

  <item>
    <title>MySQL Applier For Hadoop: Implementation</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-7566023192907556204.post-5748760040994352967</guid>
    <link>http://innovating-technology.blogspot.com/2013/04/mysql-hadoop-applier-part-2.html</link>
    <description> This is a follow up post, describing the implementation details of Hadoop Applier, and steps to  configure and install it. Hadoop Applier integrates MySQL with Hadoop providing the real-time replication of INSERTs to HDFS, and hence can be consumed by the data stores working on top of Hadoop. You can know more about the design rationale and per-requisites in the previous post. Design and Implementation:Hadoop Applier replicates rows inserted into a table in MySQL to the Hadoop Distributed File System(HDFS). It uses an API provided by libhdfs, a C library to manipulate files in HDFS.The library comes pre-compiled with Hadoop distributions.It connects to the MySQL master (or read a  binary log generated by MySQL)  and:fetches  the row insert events occurring on the masterdecodes  these events, extracts data inserted into each field of the rowuses content handlers to  get it in the format required and appends  it to a text file in HDFS.Schema equivalence is a simple mapping:Databases are mapped as separate directories, with tables in them as sub-directories. Data inserted into each table is written into text files (named as datafile1.txt) in HDFS. Data can be in comma separated format; or any other delimiter can be used, that is configurable by command line arguments.&amp;nbsp;&amp;nbsp;The diagram explains the mapping between MySQL and HDFS schema.The file in which the data is stored is named datafile1.txt here; you can name is anything you want. The working directory where this datafile goes is base_dir/db_name.db/tb_name. The timestamp at which the event occurs is included as the first field in each row inserted in the text file.The implementation follows these steps:- Connect to the MySQL master using the interfaces to the binary log#include “binlog_api.h”  Binary_log binlog(create_transport(mysql_uri.c_str()));  binlog.connect();- Register content handlers/*Table_index is a sub class of Content_handler class in the                                  Binlog API*/ Table_index table_event_hdlr;     Applier replay_hndlr(&amp;amp;table_event_hdlr, &amp;amp;sqltohdfs_obj);    binlog.content_handler_pipeline()-&amp;gt;push_back(&amp;amp;table_event_hdlr);    binlog.content_handler_pipeline()-&amp;gt;push_back(&amp;amp;replay_hndlr);- Start an event loop and wait for the events to occur on the masterwhile (true)    {      /*        Pull events from the master. This is the heart beat of the event listener.      */      Binary_log_event  *event;      binlog.wait_for_next_event(&amp;amp;event);    }           - Decode the event using the content handler interfaces class Applier : public mysql::Content_handler   {   public:    Applier(Table_index *index, HDFSSchema *mysqltohdfs_obj)   {&amp;nbsp;&amp;nbsp;      m_table_index= index;&amp;nbsp;&amp;nbsp;      m_hdfs_schema= mysqltohdfs_obj;    }     mysql::Binary_log_event *process_event(mysql::Row_event *rev)    { &amp;nbsp;&amp;nbsp;      int table_id= rev-&amp;gt;table_id;&amp;nbsp;&amp;nbsp;      typedef std::map&amp;lt;long int, mysql::Table_map_event *&amp;gt; Int2event_map;&amp;nbsp;&amp;nbsp;      int2event_map::iterator ti_it= m_table_index-&amp;gt;find(table_id);- Each row event contains multiple rows and fields.Iterate one row at a time using Row_iterator.mysql::Row_event_set rows(rev, ti_it-&amp;gt;second);   mysql::Row_event_set::iterator it= rows.begin();    do    {      mysql::Row_of_fields fields= *it;      long int timestamp= rev-&amp;gt;header()-&amp;gt;timestamp;      if (rev-&amp;gt;get_event_type() == mysql::WRITE_ROWS_EVENT)        table_insert(db_name, table_name, fields, timestamp, m_hdfs_schema);    } while (++it != rows.end());- Get the field data separated by field delimiters and row delimiters.&amp;nbsp;          Each row contains a vector of Value objects. The converter allows us to transform the value into another representation.mysql::Row_of_fields::const_iterator field_it= fields.begin();  mysql::Converter converter;  std::ostringstream data;  data &amp;lt;&amp;lt; timestamp;  do {    field_index_counter++;    std::vector&amp;lt;long int&amp;gt;::iterator it;    std::string str;    converter.to(str, *field_it);    data &amp;lt;&amp;lt; sqltohdfs_obj-&amp;gt;hdfs_field_delim;    data &amp;lt;&amp;lt; str; } while (++field_it != fields.end()); data &amp;lt;&amp;lt; sqltohdfs_obj-&amp;gt;hdfs_row_delim;- Connect to the HDFS file system.&amp;nbsp;If not provided, the connection information (user name, password host and port) are read from the XML configuration file, hadoop-site.xml. HdfsFS m_fs= hdfsConnect(host.c_str(), port);- Create the directory structure in HDFS.&amp;nbsp;Set the working directory and open the file in append mode.  hdfsSetWorkingDirectory(m_fs, (stream_dir_path.str()).c_str());  const char* write_path= &quot;datafile1.txt&quot;;  hdfsFile writeFile;  - Append data at the end of the file.    writeFile= hdfsOpenFile(m_fs, write_path, O_WRONLY|O_APPEND, 0, 0, 0);     tSize num_written_bytes = hdfsWrite(m_fs, writeFile, (void*)data, strlen(data));          Install and Configure:Follow these steps to install and run the Applier:          1. Download a Hadoop release (I am using 1.0.4); configure and install (for the purpose of the demo, install it in pseudo distributed mode). Flag 'dfs.support.append'must be set to true while configuring HDFS(hdfs-site.xml). Since append is  not supported in Hadoop 1.x, set the flag 'dfs.support.broken.append' to true. 2. Set the environment variable  $HADOOP_HOME to point to the Hadoop installation directory.3. CMake doesn't come with a 'find' module for libhdfs. Ensure that the 'FindHDFS.cmake' is in the CMAKE_MODULE_PATH. You can download a  copy here.&amp;nbsp;4. Edit the file 'FindHDFS.cmake', if necessary, to have  HDFS_LIB_PATHS set as a path to libhdfs.so, and HDFS_INCLUDE_DIRS have the path pointing to the location of hdfs.h. For 1.x versions, library path is $ENV{HADOOP_HOME}/c++/Linux-i386-32/lib , and header files are contained in $ENV{HADOOP_HOME}/src/c++/libhdfs. For 2.x releases, header files and libraries can be found in $ENV{HADOOP_HOME}/lib/native, and $ENV{HADOOP_HOME}/include respectively.For versions 1.x, this patch will fix the paths:  --- a/cmake_modules/FindHDFS.cmake  +++ b/cmake_modules/FindHDFS.cmake  @@ -11,6 +11,7 @@ exec_program(hadoop ARGS version OUTPUT_VARIABLEHadoop_VERSION   # currently only looking in HADOOP_HOME   find_path(HDFS_INCLUDE_DIR hdfs.h PATHS     $ENV{HADOOP_HOME}/include/  +  $ENV{HADOOP_HOME}/src/c++/libhdfs/     # make sure we don't accidentally pick up a different version     NO_DEFAULT_PATH   )  @@ -26,9 +27,9 @@ endif()   message(STATUS &quot;Architecture: ${arch_hint}&quot;)     if (&quot;${arch_hint}&quot; STREQUAL &quot;x64&quot;)  -  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/lib/native)  +  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/c++/Linux-amd64-64/lib)   else ()  -  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/lib/native)  +  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/c++/Linux-i386-32/lib)   endif ()     message(STATUS &quot;HDFS_LIB_PATHS: ${HDFS_LIB_PATHS}&quot;)5.Since libhdfs is JNI based API, it requires JNI header files and libraries to build. If there exists a module FindJNI.cmake in the CMAKE_MODULE_PATH and JAVA_HOME is set; the headers will be included, and the libraries would be linked to. If not, it will be required to include the headers and load the libraries separately (modify LD_LIBRARY_PATH). 6. Build and install the  library 'libreplication', to be used by Hadoop Applier,using CMake. Download  a copy of Hadoop Applier from http://labs.mysql.com.'mysqlclient'  library is required to be installed in the default library paths.  You can  either download and install it (you can get a copy here),  or set the environment variable $MYSQL_DIR to point to the parent  directory of MySQL source code. Make sure to run  cmake on MySQL  source directory.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $export MYSQL_DIR=/usr/local/mysql-5.6           Run  the 'cmake' command on the parent directory of the Hadoop Applier  source. This will generate the necessary Makefiles. Make sure to set  cmake option ENABLE_DOWNLOADS=1; which will install Google Test  required to run the unit tests.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $cmake  . -DENABLE_DOWNLOADS=1Run  'make' and 'make install' to build and install. This will install  the library 'libreplication' which is to be used by Hadoop Applier.&amp;nbsp; 7. Make sure to set the CLASSPATH to all the hadoop jars needed to run Hadoop itself. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $export PATH=$HADOOP_HOME/bin:$PATH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $export CLASSPATH=$(hadoop classpath)           8. The code for Hadoop Applier can be found in /examples/mysql2hdfs, in the Hadoop Applier repository.  To compile, you can simply load the libraries (modify LD_LIBRARY_PATH if required), and  run the command “make happlier” on your terminal. This will create an  executable file in the mysql2hdfs directory... and then you are done! Now run hadoop dfs (namenode and datanode), start a MySQL server as master with row based replication (you can use mtr rpl suite for testing purposes : $MySQL-5.6/mysql-test$./mtr --start --suite=rpl --mysqld=--binlog_format='ROW' --mysqld=--binlog_checksum=NONE), start hive (optional) and run the executable ./happlier, optionally providing MySQL and HDFS uri's and other available command line options. (./happlier –help for more info).There are useful filters as command line options to the Hadoop applier.         Options  Use   -r,    --field-delimiter=DELIMUse    DELIM instead of ctrl-A for field delimiter. DELIM can be a string    or an ASCII value in the format '\nnn' .Escape sequences are not    allowed.      Provide the string by which    the fields in  a row will be separated. By default, it is set to    ctrl-A   -w,    --row-delimiter=DELIMUse    DELIM instead of LINE FEED for row delimiter . DELIM can be a    string or an ASCII value in the format '\nnn'    Escape sequences are not    allowed.      Provide the string by which    the rows of a table will be separated. By default, it is set to    LINE FEED (\n)   -d,    --databases=DB_LISTDB-LIST    is made up of one database name,  or many names separated by    commas.    Each    database name can be optionally followed by table names.    The    table names must follow the database name,  separated by HYPHENS    Example:    -d=db_name1-table1-table2,dbname2-table1,dbname3  Import entries for some    databases, optionally include only specified tables.       -f,    --fields=LISTSimilar    to cut command, LIST is made up of one range, or many ranges    separated by commas.Each range is one of:     N        N'th byte, character or field, counted from 1 N-       from N'th byte, character or field, to end of line     N-M   from N'th to M'th    (included) byte, character    or field    -M       from first to M'th (included) byte, character or field      Import    entries for some fields only in a table   -h, --help  Display help &amp;nbsp;   Integration with HIVE:Hiveruns on top of Hadoop. It is sufficient to install Hive only on the Hadoop master node.Take note of the default data warehouse directory, set as a property in hive-default.xml.template configuration file. This must be the same as the base directory  into which Hadoop Applier writes.Since the Applier does not import DDL statements; you have to create similar schema's on both MySQL and Hive, i.e. set up a similar database in Hive using Hive QL(Hive Query Language). Since timestamps are inserted as first field in HDFS files,you  must take this into account while creating tables in Hive.                SQL Query  Hive Query   CREATE TABLE t (i INT);   CREATE    TABLE t ( time_stamp INT, i INT) [ROW    FORMAT DELIMITED] STORED AS TEXTFILE; Now, when any row is inserted into table on MySQL databases, a corresponding entry is made in the Hive tables. Watch the demo to get a better understanding.The demo is non audio, and is meant to be followed in conjunction with the blog.You can also create an external table in hive and load data into the tables; its your choice!&amp;nbsp;&amp;nbsp;Watch the Hadoop Applier&amp;nbsp; Demo &amp;gt;&amp;gt;  Limitations of the Applier:In the first version  we support WRITE_ROW_EVENTS, i.e. only insert statements are replicated. We have considered adding support for deletes, updates and DDL's  as well, but they are more complicated to handle and we are not sure how much interest there is in this.We would very much appreciate your feedback on requirements - please use the comments section of this blog to let us know!The Hadoop Applier is compatible with MySQL 5.6, however it does not import events if binlog checksums are enabled. Make sure to set them to NONE on the master, and the server in row based replication mode.This innovation includes dedicated contribution from Neha Kumari, Mats Kindahl and Narayanan Venkateswaran. Without them, this project would not be a success.Give it a try! You can download a copy from http://labs.mysql.com and get started NOW!</description>
    <content:encoded><![CDATA[<div dir="ltr" trbidi="on"> <br /><span><span>This is a follow up post, describing the implementation details of </span><span><b>Hadoop Applier</b></span><span>, and steps to  configure and install it. Hadoop Applier integrates MySQL with Hadoop providing the real-time replication of INSERTs to HDFS, and hence can be consumed by the data stores working on top of Hadoop. You can know more about the design rationale and <span>per-requisites</span> in the </span><span><a href="http://innovating-technology.blogspot.com/2013/04/mysql-hadoop-applier-part-1.html">previous post</a>. </span></span><br /><span><span><br /></span></span><span><span><b>Design and Implementation:</b></span></span><br /><span><span><br /></span></span><span><span><span lang="en-IN">Hadoop Applier replicates rows inserted into a table in MySQL to the Hadoop Distributed File System(<a href="http://hadoop.apache.org/docs/r0.18.3/hdfs_design.html">HDFS</a>). It uses an API provided by <i>libhdfs</i>, a C library to manipulate files in HDFS<span>.</span></span></span></span><br /><div><span><span><br /></span></span></div><div><span><span>The library comes pre<span>-</span>compiled with Hadoop distributions.</span></span></div><div><span><span>It connects to the MySQL master (or read a  </span><span><a href="http://dev.mysql.com/doc/refman/5.6/en/binary-log.html">binary log</a> generated by MySQL)  and:</span></span></div><ul><li><div><span><span>fetches  the row insert events occurring on the master</span></span></div></li><li><div><span><span>decodes  these events, extracts data inserted into each field of the row</span></span></div></li><li><div><span><span>uses content handlers to  get it in the format required and appends  it to a text file in HDFS.</span></span></div></li></ul><span><span><b><br />Schema equivalence is a simple mapping:</b></span></span><br /><span><span><br />Databases are mapped as separate directories, with tables in them as sub-directories. Data inserted into each table is written into text files (named as datafile1.txt) in HDFS. Data can be in comma separated format; or any other delimiter can be used, that is configurable by command line arguments.&nbsp;</span></span><br /><div><span><span>&nbsp;</span><span></span></span></div><div><span><span>The diagram explains the mapping between MySQL and HDFS schema.</span></span></div><div><span><span><br /></span></span></div><div><span><span><a href="http://4.bp.blogspot.com/-SjH8ooxzsSo/UXQhCjkcSNI/AAAAAAAAAGE/WcpVxaq-MB0/s1600/shcema-integration_image2_mat.jpg" imageanchor="1"><img alt="MySQL to HDFS mapping" border="0" height="289" src="http://4.bp.blogspot.com/-SjH8ooxzsSo/UXQhCjkcSNI/AAAAAAAAAGE/WcpVxaq-MB0/s640/shcema-integration_image2_mat.jpg" title="MySQL to HDFS mapping" width="586" /></a></span></span></div><span><span>The file in<span> </span>which the data is stored is named datafile1.txt here; you can name is anything you want. The working directory where this datafile goes is base_dir/db_name.db/tb_name. </span></span><br /><div><span><span>The timestamp at which the event occurs is included as the first field in each row inserted in the text file.</span></span></div><span><span><br /></span></span><span><span>The implementation follows these steps:</span></span><br /><span><span><br /></span></span><span><span>- <b>Connect to the MySQL master using the interfaces to the binary log</b></span></span><br /><span><b><span><span><br /><span>#include “binlog_api.h”</span></span></span></b></span><br /><div><span><b><span><span>  Binary_log binlog(create_transport(mysql_uri.c_str()));</span></span></b></span></div><div><span><b><span><span>  binlog.connect();</span></span></b></span></div><span><span></span><span><br />- <b>Register content handlers</b></span></span><br /><div><span><span><span><br /><span><b>/*</b></span></span></span></span><br /><span><b><span><span>Table_index is a sub class of Content_handler class in the                                  Binlog API</span></span></b></span><br /><span><b><span><span>*/ </span></span></b></span></div><span><b><span><span>Table_index table_event_hdlr; </span></span></b></span><br /><div><span><b><span><span>    Applier replay_hndlr(&amp;table_event_hdlr, &amp;sqltohdfs_obj);</span></span></b></span></div><div><span><b><span><span>    binlog.content_handler_pipeline()-&gt;push_back(&amp;table_event_hdlr);</span></span></b></span></div><div><span><b><span><span>    binlog.content_handler_pipeline()-&gt;push_back(&amp;replay_hndlr);</span></span></b></span></div><span><b></b><span><br />- <b>Start an event loop and wait for the events to occur on the master</b></span></span><br /><div><span></span></div><div><span><span><span><br /><span><b>while (true)</b></span></span></span></span></div><div><span><b><span><span>    {</span></span></b></span></div><div><span><b><span><span>      /*</span></span></b></span></div><div><span><b><span><span>        Pull events from the master. This is the heart beat of the event listener.</span></span></b></span></div><div><span><b><span><span>      */</span></span></b></span></div><div><span><b><span><span>      Binary_log_event  *event;</span></span></b></span></div><div><span><b><span><span>      binlog.wait_for_next_event(&amp;event);</span></span></b></span></div><div><span><b><span><span>    }</span></span></b></span></div><div><span></span></div><div><span><span>          </span></span></div><span></span> <br /><div><span><span>- <b>Decode the event using the content handler interfaces </b></span></span></div><div><span></span></div><span><b><span><span><br /><span>class Applier : public mysql::Content_handler</span></span></span></b></span><br /><div><span><b><span><span>   {</span></span></b></span></div><div><span><b><span><span>   public:</span></span></b></span></div><div><span><b><span><span>    Applier(Table_index *index, HDFSSchema *mysqltohdfs_obj)</span></span></b></span></div><div><span><b><span><span>   {</span></span></b></span></div><div><span><b><span><span>&nbsp;&nbsp;      m_table_index= index;</span></span></b></span></div><div><span><b><span><span>&nbsp;&nbsp;      m_hdfs_schema= mysqltohdfs_obj;</span></span></b></span></div><div><span><b><span><span>    }</span></span></b></span></div><div><span><b><span><span>     mysql::Binary_log_event *process_event(mysql::Row_event *rev)</span></span></b></span></div><div><span><b><span><span>    { </span></span></b></span></div><div><span><b><span><span>&nbsp;&nbsp;      int table_id= rev-&gt;table_id;</span></span></b></span></div><div><span><b><span><span>&nbsp;&nbsp;      typedef std::map&lt;long int, mysql::Table_map_event *&gt; Int2event_map;</span></span></b></span></div><div><span><b><span><span>&nbsp;&nbsp;      int2event_map::iterator ti_it= m_table_index-&gt;find(table_id);</span></span></b></span></div><span><span><br />- <b>Each row event contains multiple rows and fields.</b><span><br />Iterate one row a<span>t a time using Ro<span>w_iterator.</span></span></span></span></span><br /><div><span><b><span><span><span><br />mysql::Row_event_set rows(rev, ti_it-&gt;second);</span></span></span></b></span></div><div><span><b><span><span>   mysql::Row_event_set::iterator it= rows.begin();</span></span></b></span></div><div><span><b><span><span>    do</span></span></b></span></div><div><span><b><span><span>    {</span></span></b></span></div><div><span><b><span><span>      mysql::Row_of_fields fields= *it;</span></span></b></span></div><div><span><b><span><span>      long int timestamp= rev-&gt;header()-&gt;timestamp;</span></span></b></span></div><div><span><b><span><span>      if (rev-&gt;get_event_type() == mysql::WRITE_ROWS_EVENT)</span></span></b></span></div><div><span><b><span><span>        table_insert(db_name, table_name, fields, timestamp, m_hdfs_schema);</span></span></b></span></div><div><span><b><span><span>    } while (++it != rows.end());</span></span></b></span></div><span><span><br />-<b> Get the field data separated by field delimiters and row delimiters.</b></span></span><br /><div><span><span><b>&nbsp;</b></span><span><b>          </b></span></span></div><span><span><span>Each row contains a vector of Value objects. The converter allows us to transform the value into another representation.</span></span></span><br /><span><b><span><span><br />mysql::Row_of_fields::const_iterator field_it= fields.begin();</span></span></b></span><br /><div><span><b><span><span>  mysql::Converter converter;</span></span></b></span></div><div><span><b><span><span>  std::ostringstream data;</span></span></b></span></div><div><span><b><span><span>  data &lt;&lt; timestamp;</span></span></b></span></div><div><span><b><span><span>  do</span></span></b></span></div><div><span><b><span><span> {</span></span></b></span></div><div><span><b><span><span>    field_index_counter++;</span></span></b></span></div><div><span><b><span><span>    std::vector&lt;long int&gt;::iterator it;</span></span></b></span></div><div><span><b><span><span>    std::string str;</span></span></b></span></div><div><span><b><span><span>    converter.to(str, *field_it);</span></span></b></span></div><div><span><b><span><span><br /></span></span></b></span></div><div><span><b><span><span>    data &lt;&lt; sqltohdfs_obj-&gt;hdfs_field_delim;</span></span></b></span></div><div><span><b><span><span>    data &lt;&lt; str;</span></span></b></span></div><div><span><b><span><span> } while (++field_it != fields.end());</span></span></b></span></div><div><span><b><span><span> data &lt;&lt; sqltohdfs_obj-&gt;hdfs_row_delim;</span></span></b></span></div><div><span><span><br />- <b>Connect to the HDFS file system.</b>&nbsp;</span></span></div><div><span><span>If not provided, the connection information (user name, password host and port) are read from the XML configuration file, hadoop-site.xml.</span></span></div><div><span></span></div><div><span><span> <span><span><span><br /><b>HdfsFS m_fs= hdfsConnect(host.c_str(), port);</b></span></span></span></span></span></div><div><span><span><br />- <b>Create the directory structure in HDFS.</b>&nbsp;</span></span></div><div><span><span>Set the working directory and open the file in append mode.</span></span></div><div><span></span></div><div><span><span><span>  <span><br /><span><b>hdfsSetWorkingDirectory(m_fs, (stream_dir_path.str()).c_str());</b></span></span></span></span></span></div><div><span><b><span><span>  const char* write_path= "datafile1.txt";</span></span></b></span></div><div><span><b><span><span>  hdfsFile writeFile;</span></span></b></span></div><span></span> <br /><div><span><span><b> </b></span></span></div><span><span>- <b>Append data at the end of the file.</b></span></span><br /><div><span></span></div><div><span><span>    <b><span><span><br /><span>writeFile= hdfsOpenFile(m_fs, write_path, O_WRONLY|O_APPEND, 0, 0, 0);</span></span></span></b></span></span></div><div><span><b><span><span>     tSize num_written_bytes = hdfsWrite(m_fs, writeFile, (void*)data, strlen(data));</span></span></b></span></div><div><span><span><br /></span></span></div><div><span><span>          </span></span></div><span><span><b>Install and Configure:</b></span></span><br /><span><span>Follow these steps to install and run the Applier:</span></span><br /><div><span></span></div><div><span><span>          </span></span></div><span><span><span lang="en-IN">1. Download a Hadoop release (I am using 1.0.4); configure and install (for the purpose of the demo, install it in pseudo distributed mode). </span><span lang="en-IN"><span>Flag '<i>dfs.support.append</i>'</span></span><span>must be set to true while configuring HDFS(hdfs-site.xml). Since append is  not supported in Hadoop 1.x, set the flag '<i>dfs.support.broken.append</i>' </span><span lang="en-IN"><span>to true. </span></span></span></span><br /><div><span><span><br /></span></span></div><div><span><span>2. Set the environment variable  <b>$HADOOP_HOME</b> to point to the Hadoop installation directory.</span></span></div><div><span><span><br /></span></span></div><div><span><span><span lang="en-IN">3. CMake doesn't come with a 'find' module for libhdfs. Ensure that the '<i>FindHDFS.cmake</i>' is in the CMAKE_MODULE_PATH. You can download a  copy <a href="https://github.com/cloudera/impala/blob/master/cmake_modules/FindHDFS.cmake">here</a>.&nbsp;</span></span></span></div><div><span><span><br /></span></span></div><div><span><span>4. Edit the file 'FindHDFS.cmake', if necessary, to have  HDFS_LIB_PATHS set as a path to libhdfs.so, and HDFS_INCLUDE_DIRS have the path pointing to the location of hdfs.h.</span></span></div><div><span><span> For 1.x versions, library path is $ENV{HADOOP_HOME}/c++/Linux-i386-32/lib , and header files are contained in $ENV{HADOOP_HOME}/src/c++/libhdfs. For 2.x releases, header files and libraries can be found in $ENV{HADOOP_HOME}/lib/native, and $ENV{HADOOP_HOME}/include respectively.<br /><br /><b>For <span>ve<span>rsions 1.x, this patch will fix the <span>paths:</span></span></span></b></span></span><br /><pre wrap=""><span>  --- a/cmake_modules/FindHDFS.cmake<br />  +++ b/cmake_modules/FindHDFS.cmake<br />  @@ -11,6 +11,7 @@ exec_program(hadoop ARGS version OUTPUT_VARIABLE<br />Hadoop_VERSION<br />   # currently only looking in HADOOP_HOME<br />   find_path(HDFS_INCLUDE_DIR hdfs.h PATHS<br />     $ENV{HADOOP_HOME}<i><span>/</span>include<span>/</span></i><br />  +  $ENV{HADOOP_HOME}<i><span>/</span>src/c++/libhdfs<span>/</span></i><br />     # make sure we don't accidentally pick up a different version<br />     NO_DEFAULT_PATH<br />   )<br />  @@ -26,9 +27,9 @@ endif()<br />   message(STATUS "Architecture: ${arch_hint}")<br />  <br />   if ("${arch_hint}" STREQUAL "x64")<br />  -  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/lib/native)<br />  +  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/c++/Linux-amd64-64/lib)<br />   else ()<br />  -  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/lib/native)<br />  +  set(HDFS_LIB_PATHS $ENV{HADOOP_HOME}/c++/Linux-i386-32/lib)<br />   endif ()<br />  <br />   message(STATUS "HDFS_LIB_PATHS: ${HDFS_LIB_PATHS}")</span></pre></div><div><span><span><br /></span></span></div><div><span><span><span lang="en-IN">5.Since libhdfs is JNI based API, it requires JNI header files and libraries to </span>build. If there exists a module FindJNI.cmake in the CMAKE_MODULE_PATH and JAVA_HOME is set; the headers will be included, and the libraries would be linked to. If not, it will be required to include the headers and load the <span lang="en-IN">libraries separately (modify LD_LIBRARY_PATH). </span></span></span></div><div><span><span><br /></span></span></div><div><span><span>6. Build and install the  library 'libreplication', to be used by Hadoop Applier<span>,</span>using CMake. </span></span></div><ul><li><div><span><span>Download  a copy of Hadoop Applier from <a href="http://labs.mysql.com/">http://labs.mysql.com</a>.</span></span></div><div><span></span></div></li><li><div><span><span><span>'mysqlclient'  library is required to be installed in the default library paths.  You can  either download and install it (you can get a copy </span></span><span><a href="http://dev.mysql.com/downloads/connector/c/">here</a><span>),  or set the environment variable $MYSQL_DIR to point to the parent  directory of MySQL source code. Make sure to run  cmake on MySQL  source directory.</span></span></span></div><span><span><span>&nbsp;&nbsp;&nbsp;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b><span> $export MYSQL_DIR=/usr/local/mysql-5.6</span></b></span></span></span></span></li></ul><div><span><span><span>           </span></span></span></div><ul><li><div><span><span>Run  the 'cmake' command on the parent directory of the Hadoop Applier  source. This will generate the necessary Makefiles. Make sure to set  cmake option ENABLE_DOWNLOADS=1; which will install Google Test  required to run the unit tests.</span></span></div><div><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><span><span>$cmake  . <span>-DENABLE</span><u>_</u>DOWNLOADS=1</span></span></b></span></span></div><div><span></span></div></li><li><div><span><span>Run  'make' and 'make install' to build and install. This will install  the library 'libreplication' which is to be used by Hadoop Applier.</span></span></div><span>&nbsp; </span></li></ul><div><span><span>7. Make sure to set the CLASSPATH to all the hadoop jars needed to run Hadoop itself.</span></span></div><span><span><span><span> </span></span><span><span><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><span>$export P</span>ATH=$HADOOP_HOME/bin:$PATH</b></span></span></span></span><br /><div><span><b><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $export CLASSPATH=$(hadoop classpath)</span></span></b></span></div><div><span></span></div><div><span><span>          </span></span></div><span></span> <br /><div><span><span>8. The code for Hadoop Applier can be found in /examples/mysql2hdfs, in the Hadoop Applier repository.  To compile, you can simply load the libraries (modify LD_LIBRARY_PATH if required), and  run the command “<span>make happlier”</span> on your terminal. This will create an  executable file in the mysql2hdfs directory.</span></span></div><div><span><span><br /></span></span></div><div><span><span>.. and then you are done! </span></span></div><div><span><span><br /></span></span></div><div><span><span>Now run hadoop dfs (namenode and datanode), start a MySQL server as master with row based replication (you can use mtr rpl suite for testing purposes<span> : <span><span><span>$MySQL-5.6/mysql-test$./mtr --start --suite=rpl --mysqld=--binlog_<span>format='ROW<span>' --<span>mysqld=--binlog_checksum=NONE</span></span></span></span></span></span></span></span></span>)<span>, s</span>tart hive (optional) and run the executable ./happlier, optionally providing MySQL and HDFS uri's and other available command line options. (./happlier –help for more info).</div><div><span><span><br /></span></span></div><div><span><span>There are useful filters as command line options to the Hadoop applier.</span><span><br /></span></span>  </div><table cellpadding="4" cellspacing="0"> <colgroup><col width="55%px"></col></colgroup><colgroup><col width="45%px"></col> </colgroup><tbody><tr valign="TOP">  <td width="325"><span><span>   <b>Options</b></span></span></td>  <td width="301"><span><span><b>Use</b></span></span></td> </tr><tr valign="TOP">  <td width="325"><div><span><span>-r,    --field-delimiter=DELIM</span></span></div><div><span><span><br /></span></span></div><div><span><span>Use    DELIM instead of ctrl-A for field delimiter. DELIM can be a string    or an ASCII value in the format '\nnn' .</span></span></div><span><span>Escape sequences are not    allowed. </span></span>   </td>  <td width="301"><span><span>Provide the string by which    the fields in  a row will be separated. By default, it is set to    ctrl-A</span></span></td> </tr><tr valign="TOP">  <td width="325"><div><span><span>-w,    --row-delimiter=DELIM</span></span></div><div><span><span><br /></span></span></div><div><span><span>Use    DELIM instead of LINE FEED for row delimiter . DELIM can be a    string or an ASCII value in the format '\nnn' </span></span>   </div><span><span>Escape sequences are not    allowed. </span></span>   </td>  <td width="301"><span><span>Provide the string by which    the rows of a table will be separated. By default, it is set to    LINE FEED (\n)</span></span></td> </tr><tr valign="TOP">  <td width="325"><div><span><span>-d,    --databases=DB_LIST</span></span></div><div><span><span><br /></span></span></div><div><span><span>DB-LIST    is made up of one database name,  or many names separated by    commas. </span></span>   </div><div><span><span>Each    database name can be optionally followed by table names. </span></span>   </div><div><span><span>The    table names must follow the database name,  separated by HYPHENS </span></span>   </div><div><span><span><br /></span></span></div><span><span>Example:    -d=db_name1-table1-table2,dbname2-table1,dbname3</span></span></td>  <td width="301"><span><span>Import entries for some    databases, optionally include only specified tables. </span></span>   </td> </tr><tr valign="TOP">  <td width="325"><div><span><span>-f,    --fields=LIST</span></span></div><div><span><span><br /></span></span></div><div><span><span>Similar    to cut command, LIST is made up of one range, or many ranges    separated by commas.Each range is one of: </span></span>   </div><div><span><span> N        N'th byte, character or field, counted from 1</span></span></div><div><span><span> N-       from N'th byte, character or field, to end of line </span></span>   </div><span><span> N-M   from N'th to M'th    (included) byte,</span></span><br /><div><span><span> character    or field </span></span>   </div><div><span><span>-M       from first to M'th (included) byte, character or field </span></span>   </div></td>  <td width="301"><div><span><span>Import    entries for some fields only in a table</span></span></div><span><br /></span><span><span><br /></span></span><span><span><br /></span></span></td> </tr><tr valign="TOP">  <td width="325"><span><span>-h, --help</span></span></td>  <td width="301"><span><span>Display help</span></span></td> </tr></tbody></table><span><span>&nbsp;   </span></span><br /><div><span><span><b>Integration with HIVE:</b></span></span></div><div><span><span><a href="http://hive.apache.org/">Hive</a><span lang="en-IN">runs on top of Hadoop. </span><i><span lang="en-IN">It is sufficient to install Hive only on the Hadoop master node.</span></i></span></span></div><div><span><span>Take note of the default data warehouse directory, set as a property in hive-default.xml.template configuration file. This must be the same as the base directory  into which Hadoop Applier writes.</span></span></div><div><span><span><br /></span></span></div><div><span><span>Since the Applier does not import DDL statements; you have to create similar schema's on both MySQL and Hive, i.e. set up a similar database in Hive using Hive QL(Hive Query Language). Since timestamps are inserted as first field in HDFS files,you  must take this into account while creating tables in Hive.</span></span></div><div><span><span>          </span></span></div><span><span><br /></span></span>  <br /><table cellpadding="4" cellspacing="0"> <colgroup><col width="50%px"></col></colgroup><colgroup><col width="50%px"></col> </colgroup><tbody><tr valign="TOP">  <td width="50%"><span><span>SQL Query</span></span></td>  <td width="50%"><span><span>Hive Query</span></span></td> </tr><tr valign="TOP">  <td width="50%"><span><span>CREATE TABLE t (i INT);</span></span></td>  <td width="50%"><div><span><span> CREATE    TABLE t ( time_stamp INT, i INT)</span></span></div><div><span><span> [ROW    FORMAT DELIMITED]</span></span></div><span><span> STORED AS TEXTFILE;</span></span></td> </tr></tbody></table><div><span><span><br /></span></span><span><span>Now, when any row is inserted into table on MySQL databases, a corresponding entry is made in the Hive tables. Watch the demo to get a better understanding.<br />The demo <span>is non <span>audio, and is meant to be followed in conjunction with the blog.</span></span>You can also create an external table in hive and load data into the tables; its your choice!</span></span></div><span><span>&nbsp;&nbsp;</span></span><br /><span><span><span><b><a href="http://youtu.be/mZRAtCu3M1g">Watch the Hadoop Applier&nbsp; Demo &gt;&gt;</a> </b></span></span></span><br /><div> </div><div><span><span><br /></span></span></div><div><div><span><span><b>Limitations of the Applier:</b></span></span></div></div><div><span><span>In the first version  we support WRITE_ROW_EVENTS, i.e. only insert statements are replicated. </span></span></div><div><span><span>We have considered adding support for deletes, updates and DDL's  as well, but they are more complicated to handle and we are not sure how much interest there is in this.</span></span></div><div><span><span><span lang="en-IN"><span>W</span></span><span>e would very much appreciate your feedback on requirements - please use the comments section of this blog to let us know!</span></span></span></div><div><span><span><br /></span></span></div><div><span><span>The Hadoop Applier is compatible with MySQL 5.6, however it does not import events if binlog checksums are enabled. Make sure to set them to NONE on the master, and the server in row based replication mode.</span></span></div><div><span><span><br /></span></span></div><div><span><span>This innovation includes dedicated contribution from Neha Kumari, Mats Kindahl and Narayanan Venkateswaran. Without them, this project would not be a success.</span></span></div><div><span><span><br /></span></span></div><div><span><span>Give it a try! You can download a copy from <span><a href="http://labs.mysql.com/">http://labs.mysql.com</a><span> </span></span><span>and get started NOW!</span></span></span></div></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=47141&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=47141&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 06:47:47 +0000</pubDate>
    <dc:creator>Shubhangi Garg</dc:creator>
    <category>sqoop</category>
    <category>replication</category>
    <category>lab release</category>
    <category>Hadoop Applier</category>
    <category>Hadoop</category>
    <category>Big Data</category>
    <category>Applier</category>
    <category>mysql</category>
    <category>MySQL Applier for Hadoop</category>
    <category>big</category>
    <category>Real Time</category>
    <category>CDC</category>
    <category>Hive</category>
  </item>

  <item>
    <title>High Availability for Drupal Part 1 - Investigating the Issues</title>
    <guid isPermaLink="false">1511 at http://www.skysql.com</guid>
    <link>http://www.skysql.com/blogs/adam-donnison/high-availability-drupal-part-1-investigating-issues</link>
    <description>Drupal is one of the most popular Content Management Systems (CMS) and is used increasingly in high-visibility sites, such as www.whitehouse.gov. This has brought a lot of attention on how to get the most performance out of Drupal and how to improve the availability of such sites. In this blog series I&amp;#39;ll take you through the basics and on through to designing your own HA Drupal site.
But first, we need to understand what the challenges are in getting Drupal (or indeed any CMS) working on multiple servers in such a way as to ensure high availability and performance.
read more</description>
    <content:encoded><![CDATA[<p>Drupal is one of the most popular Content Management Systems (CMS) and is used increasingly in high-visibility sites, such as <a href="http://www.whitehouse.gov" title="www.whitehouse.gov">www.whitehouse.gov</a>. This has brought a lot of attention on how to get the most performance out of Drupal and how to improve the availability of such sites. In this blog series I&#39;ll take you through the basics and on through to designing your own HA Drupal site.</p>
<p>But first, we need to understand what the challenges are in getting Drupal (or indeed any CMS) working on multiple servers in such a way as to ensure high availability and performance.</p>
<p><a href="http://www.skysql.com/blogs/adam-donnison/high-availability-drupal-part-1-investigating-issues" target="_blank">read more</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79563&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79563&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 06:11:42 +0000</pubDate>
    <dc:creator>Adam Donnison</dc:creator>
    <category>drupal</category>
    <category>High Availability</category>
    <category>MariaDB</category>
    <category>MySQL</category>
    <category>SkySQL</category>
  </item>

  <item>
    <title>MySQL Book in Chinese</title>
    <guid isPermaLink="false">http://blog.mclaughlinsoftware.com/?p=7724</guid>
    <link>http://blog.mclaughlinsoftware.com/2013/05/23/mysql-book-in-chinese/</link>
    <description>One of my old students and lab assistants stopped by to show his fiancée the BYU-Idaho campus. It was a long trip since he lives in Macao, China.
He kindly brought me a copy of my Oracle Database 11g and MySQL 5.6 Developer Handbook in simplified Chinese. He&amp;#8217;s holding it in the photo.
That makes three books translated into Chinese, which made my day. It&amp;#8217;ll be interesting to see if the new MySQL Workbench: Data Modeling &amp;#038; Development book gets translated into Chinese too. Oddly, I never hear about this from the publisher first.
The cover emphasized only the Dolphin, not the Oracle logo material. It made me wonder, how many MySQL users there might be in China. If anybody from China catches the post, it would be great to hear about the MySQL Community in China.
Likewise, if anybody in China catches the post and reads the book, please let me know if you liked it.   Naturally, let me know if you found any problems with it too. By the way, I keep an errata for the book here.</description>
    <content:encoded><![CDATA[<p><a href="http://blog.mclaughlinsoftware.com/wp-content/uploads/2013/05/MySQL_JohnSin.jpg"><img src="http://blog.mclaughlinsoftware.com/wp-content/uploads/2013/05/MySQL_JohnSin-225x300.jpg" alt="MySQL_JohnSin" width="225" height="300" class="alignleft size-medium wp-image-7725" style="margin-right:10px" /></a>One of my old students and lab assistants stopped by to show his fiancée the BYU-Idaho campus. It was a long trip since he lives in Macao, China.</p>
<p>He kindly brought me a copy of my <a href="http://www.amazon.com/gp/product/0071768858/ref=as_li_tf_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071768858&amp;linkCode=as2&amp;tag=macloc-20">Oracle Database 11g and MySQL 5.6 Developer Handbook</a> in simplified Chinese. He&#8217;s holding it in the photo.</p>
<p>That makes three books translated into Chinese, which made my day. It&#8217;ll be interesting to see if the new <a href="http://www.amazon.com/gp/product/0071791884/ref=as_li_tf_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0071791884&amp;linkCode=as2&amp;tag=macloc-20">MySQL Workbench: Data Modeling &#038; Development</a> book gets translated into Chinese too. Oddly, I never hear about this from the publisher first.</p>
<p>The cover emphasized only the Dolphin, not the Oracle logo material. It made me wonder, how many MySQL users there might be in China. If anybody from China catches the post, it would be great to hear about the MySQL Community in China.</p>
<p>Likewise, if anybody in China catches the post and reads the book, please let me know if you liked it. <img src="http://blog.mclaughlinsoftware.com/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" />  Naturally, let me know if you found any problems with it too. By the way, I keep an errata for the book <a href="http://blog.mclaughlinsoftware.com/oracle-books-errata/oracle-11g-mysql-5-6/">here</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79562&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79562&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 03:58:06 +0000</pubDate>
    <dc:creator>Michael McLaughlin</dc:creator>
    <category>LAMP</category>
    <category>MySQL</category>
    <category>Oracle</category>
    <category>mysql</category>
  </item>

  <item>
    <title>An old note on the Storage Engine API</title>
    <guid isPermaLink="false">http://www.flamingspork.com/blog/?p=3347</guid>
    <link>http://www.flamingspork.com/blog/2013/05/24/an-old-note-on-the-storage-engine-api/?utm_source=rss&amp;amp;utm_medium=rss&amp;amp;utm_campaign=an-old-note-on-the-storage-engine-api</link>
    <description>Whenever I stick my head into the MySQL storage engine API, I&amp;#8217;m reminded of a MySQL User Conference from several years ago now.
Specifically, I&amp;#8217;m reminded of a slide from an early talk at the MySQL User Conference by Paul McCullagh describing developing PBXT. For &amp;#8220;How to write a Storage Engine for MySQL&amp;#8221;, it went something like this:

Develop basic INSERT (write_row) support &amp;#8211; INSERT INTO t1 VALUES (42)
Develop full table scan (rnd_init, rnd_next, rnd_end)  - SELECT * from t1
If you&amp;#8217;re sane, stop here.

A lot of people stop at step 3. It&amp;#8217;s a really good place to stop too. It avoids most of the tricky parts that are unexpected, undocumented and unlogical (yes, I&amp;#8217;m inventing words here).</description>
    <content:encoded><![CDATA[<p>Whenever I stick my head into the MySQL storage engine API, I&#8217;m reminded of a MySQL User Conference from several years ago now.</p>
<p>Specifically, I&#8217;m reminded of a slide from an early talk at the MySQL User Conference by Paul McCullagh describing developing PBXT. For &#8220;How to write a Storage Engine for MySQL&#8221;, it went something like this:</p>
<ol>
<li>Develop basic INSERT (write_row) support &#8211; INSERT INTO t1 VALUES (42)</li>
<li>Develop full table scan (rnd_init, rnd_next, rnd_end)  - SELECT * from t1</li>
<li>If you&#8217;re sane, stop here.</li>
</ol>
<p>A lot of people stop at step 3. It&#8217;s a <strong>really</strong> good place to stop too. It avoids most of the tricky parts that are unexpected, undocumented and unlogical (yes, I&#8217;m inventing words here).</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79561&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79561&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 24 May 2013 00:00:59 +0000</pubDate>
    <dc:creator>Stewart Smith</dc:creator>
    <category>code</category>
    <category>mysql</category>
    <category>storage engine api</category>
  </item>

  <item>
    <title>Non-Deterministic Query in Replication Stream</title>
    <guid isPermaLink="false">http://openquery.com/blog/?p=1923</guid>
    <link>http://openquery.com/blog/nondeterministic-query-replication-stream</link>
    <description>You might find a warning like the below in your error log:
130522 17:54:18 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.
Statement: INSERT INTO tbl2 SELECT * FROM tbl1 WHERE col IN (417,523)
What do MariaDB and MySQL mean with this warning? The server can&amp;#8217;t guarantee that this exact query, with STATEMENT based replication, will always yield identical results on the slave.
Does that mean that you have to use ROW based (or MIXED) replication? Possibly, but not necessarily.
For this type of query, it primarily refers to the fact that without ORDER BY, rows have no order and thus a result set may show up in any order the server decides. Sometimes it&amp;#8217;s predictable (depending on storage engine and index use), but that&amp;#8217;s not something you want to rely on. You don&amp;#8217;t have to ponder that, as an ORDER BY is never harmful.
Would ORDER BY col solve the problem? That depends!
If col is unique, yes. If col is not unique, then multiple rows could result and they&amp;#8217;d still have a non-deterministic order. So in that case you&amp;#8217;d need to ORDER BY col,anothercol to make it absolutely deterministic. The same of course applies if the WHERE clause only referred to a single col value: if multiple rows can match, then it&amp;#8217;s not unique and it will require an additional column for the sort.
There are other query constructs where going to row based or mixed replication is the only way. But, just because the server tells you it can&amp;#8217;t safely replicate a query with statement based replication, that doesn&amp;#8217;t mean you can&amp;#8217;t use statement based replication at all&amp;#8230; there might be another way.</description>
    <content:encoded><![CDATA[<p>You might find a warning like the below in your error log:</p>
<blockquote><p><code>130522 17:54:18 [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.<br />
Statement: INSERT INTO tbl2 SELECT * FROM tbl1 WHERE col IN (417,523)</code></p></blockquote>
<p>What do MariaDB and MySQL mean with this warning? <em>The server can&#8217;t guarantee that this exact query, with STATEMENT based replication, will always yield identical results on the slave.</em></p>
<p>Does that mean that you have to use ROW based (or MIXED) replication? <em>Possibly, but not necessarily.</em></p>
<p>For this type of query, it primarily refers to the fact that without ORDER BY, rows have no order and thus a result set may show up in any order the server decides. Sometimes it&#8217;s predictable (depending on storage engine and index use), but that&#8217;s not something you want to rely on. You don&#8217;t have to ponder that, as an ORDER BY is never harmful.</p>
<p>Would <strong>ORDER BY col</strong> solve the problem? <em>That depends!</em><br />
If col is unique, yes. If col is not unique, then multiple rows could result and they&#8217;d still have a non-deterministic order. So in that case you&#8217;d need to <strong>ORDER BY col,anothercol</strong> to make it absolutely deterministic. The same of course applies if the WHERE clause only referred to a single col value: if multiple rows can match, then it&#8217;s not unique and it will require an additional column for the sort.</p>
<p>There are other query constructs where going to row based or mixed replication is the only way. But, just because the server tells you it can&#8217;t safely replicate a query with statement based replication, that doesn&#8217;t mean you can&#8217;t use statement based replication at all&#8230; there might be another way.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79560&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79560&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 23 May 2013 22:10:58 +0000</pubDate>
    <dc:creator>Open Query</dc:creator>
    <category>Uncategorized</category>
    <category>deterministic</category>
    <category>non-deterministic</category>
    <category>ORDER BY</category>
    <category>replication</category>
    <category>ROW</category>
    <category>STATEMENT</category>
  </item>

  <item>
    <title>Zend 6 &amp;amp; Timezones</title>
    <guid isPermaLink="false">http://blog.mclaughlinsoftware.com/?p=7709</guid>
    <link>http://blog.mclaughlinsoftware.com/2013/05/23/zend-6-timezones/</link>
    <description>Just went through all my PHP testing against a fresh instance of Oracle with Zend Server Community Edition 6, and found these warnings, guess that&amp;#8217;s pretty clean for the Oracle part of the installation. I didn&amp;#8217;t notice it before because generally I do most of my PHP development against a MySQL database. I should have been configuring the php.ini file routinely, as qualified in this PHP forum discussion.

Warning: oci_set_client_info(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\Program Files (x86)\Zend\Apache2\htdocs\Oracle\Db.php on line 47
Warning: oci_set_module_name(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\Program Files (x86)\Zend\Apache2\htdocs\Oracle\Db.php on line 48
Warning: oci_set_action(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in C:\Program Files (x86)\Zend\Apache2\htdocs\Oracle\Db.php on line 69

Turns out Zend 6 doesn&amp;#8217;t automatically set the [Date] elements in the php.ini file, which is required for the oci_set_client_info(), oci_set_module_name(), and oci_set_action() functions of the OCI. You can find the php.ini file in the C:\Program Files (x86)\Zend\ZendServer\etc folder on Windows:

&amp;#91;Date&amp;#93;
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =
&amp;nbsp;
; http://php.net/date.default-latitude
;date.default_latitude = 31.7667
&amp;nbsp;
; http://php.net/date.default-longitude
;date.default_longitude = 35.2333
&amp;nbsp;
; http://php.net/date.sunrise-zenith
;date.sunrise_zenith = 90.583333
&amp;nbsp;
; http://php.net/date.sunset-zenith
;date.sunset_zenith = 90.583333

You can find the values for date.timezone here. Update the date.timezone as follows:

date.timezone = America/Denver

Then, reboot the Zend Server, and it fixes the warning messages.</description>
    <content:encoded><![CDATA[<p>Just went through all my PHP testing against a fresh instance of Oracle with Zend Server Community Edition 6, and found these warnings, guess that&#8217;s pretty clean for the Oracle part of the installation. I didn&#8217;t notice it before because generally I do most of my PHP development against a MySQL database. I should have been configuring the <code>php.ini</code> file routinely, as qualified in this <a href="http://news.php.net/php.internals/67474">PHP forum discussion</a>.</p>

<div><table><tr><td><pre>Warning: oci_set_client_info<span>()</span>: It is <span>not</span> safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set<span>()</span> function. <span>In</span> case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' <span>for</span> now, but please <span>set</span> date.timezone to select your timezone. <span>in</span> C:\Program Files <span>(</span>x86<span>)</span>\Zend\Apache2\htdocs\Oracle\Db.php on line 47
Warning: oci_set_module_name<span>()</span>: It is <span>not</span> safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set<span>()</span> function. <span>In</span> case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' <span>for</span> now, but please <span>set</span> date.timezone to select your timezone. <span>in</span> C:\Program Files <span>(</span>x86<span>)</span>\Zend\Apache2\htdocs\Oracle\Db.php on line 48
Warning: oci_set_action<span>()</span>: It is <span>not</span> safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set<span>()</span> function. <span>In</span> case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' <span>for</span> now, but please <span>set</span> date.timezone to select your timezone. <span>in</span> C:\Program Files <span>(</span>x86<span>)</span>\Zend\Apache2\htdocs\Oracle\Db.php on line 69</pre></td></tr></table></div>

<p>Turns out Zend 6 doesn&#8217;t automatically set the <code>[Date]</code> elements in the <code>php.ini</code> file, which is required for the <code>oci_set_client_info()</code>, <code>oci_set_module_name()</code>, and <code>oci_set_action()</code> functions of the OCI. You can find the <code>php.ini</code> file in the <code>C:\Program Files (x86)\Zend\ZendServer\etc</code> folder on Windows:</p>

<div><table><tr><td><pre><span>&#91;</span><span>Date</span><span>&#93;</span>
<span>;</span> Defines the <span>default</span> timezone used by the <span>date</span> functions
<span>;</span> http<span>:</span><span>//php.net/date.timezone</span>
<span>;</span><span>date</span><span>.</span>timezone <span>=</span>
&nbsp;
<span>;</span> http<span>:</span><span>//php.net/date.default-latitude</span>
<span>;</span><span>date</span><span>.</span>default_latitude <span>=</span> <span>31.7667</span>
&nbsp;
<span>;</span> http<span>:</span><span>//php.net/date.default-longitude</span>
<span>;</span><span>date</span><span>.</span>default_longitude <span>=</span> <span>35.2333</span>
&nbsp;
<span>;</span> http<span>:</span><span>//php.net/date.sunrise-zenith</span>
<span>;</span><span>date</span><span>.</span>sunrise_zenith <span>=</span> <span>90.583333</span>
&nbsp;
<span>;</span> http<span>:</span><span>//php.net/date.sunset-zenith</span>
<span>;</span><span>date</span><span>.</span>sunset_zenith <span>=</span> <span>90.583333</span></pre></td></tr></table></div>

<p>You can find the values for <code>date.timezone</code> <a href="http://us1.php.net/manual/en/timezones.php">here</a>. Update the <code>date.timezone</code> as follows:</p>

<div><table><tr><td><pre><span>date</span><span>.</span>timezone <span>=</span> America<span>/</span>Denver</pre></td></tr></table></div>

<p>Then, reboot the Zend Server, and it fixes the warning messages.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79559&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79559&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 23 May 2013 17:21:53 +0000</pubDate>
    <dc:creator>Michael McLaughlin</dc:creator>
    <category>LAMP</category>
    <category>MySQL</category>
    <category>OPAL</category>
    <category>Oracle</category>
    <category>Oracle 11g</category>
    <category>Oracle 12c</category>
    <category>PHP</category>
  </item>

  <item>
    <title>MariaDB 5.5.31 Now Available</title>
    <guid isPermaLink="false">http://blog.mariadb.org/?p=1650</guid>
    <link>http://blog.mariadb.org/mariadb-5-5-31-now-available/</link>
    <description>The MariaDB project is pleased to announce the immediate availability of the MariaDB 5.5.31. This is a Stable (GA) release. See the Release Notes and Changelog for detailed information on this release and the What is MariaDB 5.5? page in the AskMonty Knowledgebase for general information about the MariaDB 5.5 series.
Download MariaDB 5.5.31
Release Notes  Changelog  What is MariaDB 5.5?
This release is primarily a bug-fix release.
Includes MariaDB 5.3.12 and MySQL 5.5.31
This release includes MariaDB 5.3.12 and MySQL 5.5.31.
Other Notable Updates

Includes XtraDB from Percona Server-5.5.30-rel30.2
Includes an alpha version of the QUERY_CACHE_INFO plugin, that allows to see the content of the query cache via the corresponding INFORMATION_SCHEMA table.
MariaDB MSI packages for Windows include the latest HeidiSQL 8.0.
Support for FusionIO/directFS atomic writes added (MDEV-4338). See the following for more information:

MariaDB Introduces Atomic Writes
FusionIO DirectFS atomic write support
Fusion-io Introduction



Ubuntu 8.04 LTS &amp;#8220;Hardy&amp;#8221; and 11.10 &amp;#8220;Oneiric&amp;#8221; Deprecated
In accordance with the MariaDB Deprecation Policy the following distributions have reached the end of their support periods (EOL):

Ubuntu 8.04 LTS &amp;#8220;Hardy&amp;#8221;
Ubuntu 11.10 &amp;#8220;Oneiric&amp;#8221;
Mint 9 LTS &amp;#8220;Isadora&amp;#8221;
Mint 12 &amp;#8220;Lisa&amp;#8221;

MariaDB 5.5.31) is therefore the last MariaDB release to feature packages for these distros. The repositories for them will remain online until the 5.5.32 release. At that time they will go away.
Thanks, and enjoy MariaDB!</description>
    <content:encoded><![CDATA[<p>The MariaDB project is pleased to announce the immediate availability of the <a title="MariaDB 5.5.31 Release Notes" href="https://kb.askmonty.org/en/mariadb-5531-release-notes/" target="_blank">MariaDB 5.5.31</a>. This is a Stable (GA) release. See the <a title="MariaDB 5.5.31 Release Notes" href="https://kb.askmonty.org/en/mariadb-5531-release-notes/" target="_blank">Release Notes</a> and <a title="MariaDB 5.5.31 Changelog" href="https://kb.askmonty.org/en/mariadb-5531-changelog/">Changelog</a> for detailed information on this release and the <a title="What is MariaDB 5.5?" href="https://kb.askmonty.org/en/what-is-mariadb-55/">What is MariaDB 5.5?</a> page in the AskMonty Knowledgebase for general information about the MariaDB 5.5 series.</p>
<p><a title="MariaDB 5.5.31 Downloads" href="https://downloads.mariadb.org/mariadb/5.5.31/" target="_blank">Download MariaDB 5.5.31</a></p>
<p><a href="https://kb.askmonty.org/en/mariadb-5531-release-notes/">Release Notes</a>  <a href="https://kb.askmonty.org/en/mariadb-5531-changelog/">Changelog</a>  <a href="https://kb.askmonty.org/en/what-is-mariadb-55/">What is MariaDB 5.5?</a></p>
<p>This release is primarily a bug-fix release.</p>
<h2>Includes MariaDB 5.3.12 and MySQL 5.5.31</h2>
<p>This release includes <a title="MariaDB 5.3.12 Release Notes" href="https://kb.askmonty.org/en/mariadb-5312-release-notes/">MariaDB 5.3.12</a> and <a title="Changes in MySQL 5.5.31" href="http://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-31.html">MySQL 5.5.31</a>.</p>
<h2>Other Notable Updates</h2>
<ul>
<li>Includes <a title="XtraDB" href="https://kb.askmonty.org/en/xtradb/">XtraDB</a> from Percona Server-5.5.30-rel30.2</li>
<li>Includes an alpha version of the QUERY_CACHE_INFO plugin, that allows to see the content of the query cache via the corresponding INFORMATION_SCHEMA table.</li>
<li>MariaDB MSI packages for Windows include the latest <a title="HeidiSQL" href="https://kb.askmonty.org/en/heidisql/">HeidiSQL</a> 8.0.</li>
<li>Support for FusionIO/directFS atomic writes added (<a href="https://mariadb.atlassian.net/browse/MDEV-4338">MDEV-4338</a>). See the following for more information:
<ul>
<li><a href="http://blog.mariadb.org/mariadb-introduces-atomic-writes/">MariaDB Introduces Atomic Writes</a></li>
<li><a href="https://kb.askmonty.org/en/fusionio-directfs-atomic-write-support/">FusionIO DirectFS atomic write support</a></li>
<li><a href="https://kb.askmonty.org/en/fusion-io-introduction/">Fusion-io Introduction</a></li>
</ul>
</li>
</ul>
<h2>Ubuntu 8.04 LTS &#8220;Hardy&#8221; and 11.10 &#8220;Oneiric&#8221; Deprecated</h2>
<p>In accordance with the <a title="MariaDB Deprecation Policy" href="https://kb.askmonty.org/en/mariadb-deprecation-policy/">MariaDB Deprecation Policy</a> the following distributions have reached the end of their support periods (EOL):</p>
<ul>
<li>Ubuntu 8.04 LTS &#8220;Hardy&#8221;</li>
<li>Ubuntu 11.10 &#8220;Oneiric&#8221;</li>
<li>Mint 9 LTS &#8220;Isadora&#8221;</li>
<li>Mint 12 &#8220;Lisa&#8221;</li>
</ul>
<p>MariaDB 5.5.31) is therefore the last MariaDB release to feature packages for these distros. The <a title="MariaDB Repository Configuration Generator" href="http://downloads.mariadb.org/mariadb/repositories/">repositories</a> for them will remain online until the 5.5.32 release. At that time they will go away.</p>
<p>Thanks, and enjoy MariaDB!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79552&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79552&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 23 May 2013 13:15:05 +0000</pubDate>
    <dc:creator>Monty Program Group Blog</dc:creator>
    <category>Announcement</category>
    <category>General</category>
    <category>MariaDB Releases</category>
    <category>mysql</category>
    <category>release</category>
  </item>

  <item>
    <title>Experiences with the McAfee MySQL Audit Plugin</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15577</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/23/experiences-with-the-mcafee-mysql-audit-plugin/</link>
    <description>I recently had to do some customer work involving the McAfee MySQL Audit Plugin and would like to share my experience in this post.Auditing user activity in MySQL  has traditionally been challenging. Most data can be obtained from the slow or general log, but this involves a lot of data you don&amp;#8217;t need too, and isn&amp;#8217;t flexible at all. The specific problem of logging failed connection attempts has been discussed on a previous post in our blog.Starting with 5.1, the new plugin API gives us more flexibility by allowing users to extend the server&amp;#8217;s functionality with their own code, and this is what the McAffee plugin does.Installation and configuration are straightforward following the available instructions. The only extra step I had to take was to extract the offsets for the Percona Server version I was using for the test (5.5.28-29.1). This is needed as the plugin needs the offset to some MySQL data structures that, the plugin authors say, aren&amp;#8217;t exposed by a consistent API. If you also need to do this, the details are clearly explained here.The plugin writes its output in json format, and supports writing it directly to a file, or to a unix socket, which means you can write a script to listen on this socket and process the audit records as you wish.Performance-wise, I did basic tests on the VM I was working in and didn&amp;#8217;t get significant differences between either output option, or between using the plugin or enabling the general log. Bear in mind these were basic tests (just a few mysqlslap runs with increasing levels of concurrency), but initially, I would think the advantage of the plugin is its flexibility, and not its performance, which seems to be on par with having the general log enabled.The flexibility comes from the three variables that can be set to control what is logged by the plugin: - audit_record_cmds : This is the list of commands you want written to the log (all the lists in these variables are comma separated). As pointed here, anything that would generate a write to the general log will be sent to the plugin, and you can control if it gets written on not with this list. I tested this with &amp;#8220;connect,Quit&amp;#8221; to log successful and failed connections. Yes, it had to be a capital Q in Quit for that to work, and no, my code-fu was not enough to understand why that is the case. Maybe someone more knowledgeable in MySQL internals can enlighten me here. - audit_record_objs : List of database objects (tables, according to the docs) for which you want events written to the log. - audit_whitelist_users : This one is undocumented on the wiki at the time of writing, and is a list of users for which you do not want events written to the log.Just for reference, these are the lines I had to add to my config file for the plugin to work (plus one commented line for switching between file and socket for output): plugin-load=AUDIT=libaudit_plugin.so audit_offsets=6464, 6512, 4072, 4512, 104, 2584 audit_json_file=1 audit_json_socket_name=/tmp/audit.sock #audit_json_socket=1 audit_json_log_file=/var/lib/mysql/audit.log audit_record_cmds=connect,Quit Notice the audit_offsets that I mentioned had to be extracted due to this Percona Server version not being included in the binary.And here&amp;#8217;s a few sample output lines generated by the plugin with this configuration:{&quot;msg-type&quot;:&quot;activity&quot;,&quot;date&quot;:&quot;1369155747373&quot;,&quot;thread-id&quot;:&quot;6439&quot;,&quot;query-id&quot;:&quot;0&quot;,&quot;user&quot;:&quot;debian-sys-maint&quot;,&quot;priv_user&quot;:&quot;debian-sys-maint&quot;,&quot;host&quot;:&quot;localhost&quot;,&quot;cmd&quot;:&quot;Connect&quot;,&quot;query&quot;:&quot;Connect&quot;} {&quot;msg-type&quot;:&quot;activity&quot;,&quot;date&quot;:&quot;1369155747373&quot;,&quot;thread-id&quot;:&quot;6439&quot;,&quot;query-id&quot;:&quot;219309&quot;,&quot;user&quot;:&quot;debian-sys-maint&quot;,&quot;priv_user&quot;:&quot;debian-sys-maint&quot;,&quot;host&quot;:&quot;localhost&quot;,&quot;cmd&quot;:&quot;Quit&quot;,&quot;query&quot;:&quot;Quit&quot;} {&quot;msg-type&quot;:&quot;activity&quot;,&quot;date&quot;:&quot;1369155747383&quot;,&quot;thread-id&quot;:&quot;6440&quot;,&quot;query-id&quot;:&quot;0&quot;,&quot;user&quot;:&quot;debian-sys-maint&quot;,&quot;priv_user&quot;:&quot;debian-sys-maint&quot;,&quot;host&quot;:&quot;localhost&quot;,&quot;cmd&quot;:&quot;Connect&quot;,&quot;query&quot;:&quot;Connect&quot;} In conclusion, the plugin API seems to be opening new possibilities of extending MySQL&amp;#8217;s behavior in a way that, once set up, is transparent to users, and the McAfee MySQL Audit Plugin is only one of example of what can be achieved with it. It is a very good one for me, since I think proper audit trail support has been an important missing feature on the server, which has made using MySQL in PCI or SOX compliant environments, to name just two, artificially complicated, as one had to rely on too much info (general log) or external help (snort or similar IDS).The post Experiences with the McAfee MySQL Audit Plugin appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p>I recently had to do some customer work involving the McAfee MySQL Audit Plugin and would like to share my experience in this post.</p><p>Auditing user activity in MySQL  has traditionally been challenging. Most data can be obtained from the slow or general log, but this involves a lot of data you don&#8217;t need too, and isn&#8217;t flexible at all. The specific problem of logging failed connection attempts has been discussed on a <a title="auditing login attempts in mysql" href="http://www.mysqlperformanceblog.com/2012/12/28/auditing-login-attempts-in-mysql/">previous post</a> in our blog.</p><p>Starting with 5.1, the new plugin API gives us more flexibility by allowing users to extend the server&#8217;s functionality with their own code, and this is what the <a title="mcaffee mysql audit plugin @ github" href="https://github.com/mcafee/mysql-audit">McAffee plugin</a> does.</p><p><a title="audit plugin - Installation" href="https://github.com/mcafee/mysql-audit/wiki/Installation">Installation</a> and <a title="audit plugin - Configuration" href="https://github.com/mcafee/mysql-audit/wiki/Configuration">configuration</a> are straightforward following the available instructions. The only extra step I had to take was to extract the offsets for the Percona Server version I was using for the test (5.5.28-29.1). This is needed as the plugin needs the offset to some MySQL data structures that, the plugin authors say, aren&#8217;t exposed by a consistent API. If you also need to do this, the details are clearly explained <a title="audit plugin - Troubleshooting" href="https://github.com/mcafee/mysql-audit/wiki/Troubleshooting">here</a>.</p><p>The plugin writes its output in json format, and supports writing it directly to a file, or to a unix socket, which means you can write a script to listen on this socket and process the audit records as you wish.</p><p>Performance-wise, I did basic tests on the VM I was working in and didn&#8217;t get significant differences between either output option, or between using the plugin or enabling the general log. Bear in mind these were basic tests (just a few mysqlslap runs with increasing levels of concurrency), but initially, I would think the advantage of the plugin is its flexibility, and not its performance, which seems to be on par with having the general log enabled.</p><p>The flexibility comes from the three variables that can be set to control what is logged by the plugin:<br
/> - audit_record_cmds : This is the list of commands you want written to the log (all the lists in these variables are comma separated). As pointed <a title="mysql plugin audit API" href="http://karlssonondatabases.blogspot.com/2010/03/mysql-audit-plugin-api.html">here</a>, anything that would generate a write to the general log will be sent to the plugin, and you can control if it gets written on not with this list. I tested this with &#8220;connect,Quit&#8221; to log successful and failed connections. Yes, it had to be a capital Q in Quit for that to work, and no, my code-fu was not enough to understand why that is the case. Maybe someone more knowledgeable in MySQL internals can enlighten me here.<br
/> - audit_record_objs : List of database objects (tables, according to the docs) for which you want events written to the log.<br
/> - audit_whitelist_users : This one is undocumented on the wiki at the time of writing, and is a list of users for which you do not want events written to the log.</p><p>Just for reference, these are the lines I had to add to my config file for the plugin to work (plus one commented line for switching between file and socket for output):</p><p><code><br
/> plugin-load=AUDIT=libaudit_plugin.so<br
/> audit_offsets=6464, 6512, 4072, 4512, 104, 2584<br
/> audit_json_file=1<br
/> audit_json_socket_name=/tmp/audit.sock<br
/> #audit_json_socket=1<br
/> audit_json_log_file=/var/lib/mysql/audit.log<br
/> audit_record_cmds=connect,Quit<br
/> </code></p><p>Notice the audit_offsets that I mentioned had to be extracted due to this Percona Server version not being included in the binary.</p><p>And here&#8217;s a few sample output lines generated by the plugin with this configuration:</p><p><code>{"msg-type":"activity","date":"1369155747373","thread-id":"6439","query-id":"0","user":"debian-sys-maint","priv_user":"debian-sys-maint","host":"localhost","cmd":"Connect","query":"Connect"}<br
/> {"msg-type":"activity","date":"1369155747373","thread-id":"6439","query-id":"219309","user":"debian-sys-maint","priv_user":"debian-sys-maint","host":"localhost","cmd":"Quit","query":"Quit"}<br
/> {"msg-type":"activity","date":"1369155747383","thread-id":"6440","query-id":"0","user":"debian-sys-maint","priv_user":"debian-sys-maint","host":"localhost","cmd":"Connect","query":"Connect"}<br
/> </code></p><p>In conclusion, the plugin API seems to be opening new possibilities of extending MySQL&#8217;s behavior in a way that, once set up, is transparent to users, and the McAfee MySQL Audit Plugin is only one of example of what can be achieved with it. It is a very good one for me, since I think proper audit trail support has been an important missing feature on the server, which has made using MySQL in PCI or SOX compliant environments, to name just two, artificially complicated, as one had to rely on too much info (general log) or external help (snort or similar IDS).</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/23/experiences-with-the-mcafee-mysql-audit-plugin/">Experiences with the McAfee MySQL Audit Plugin</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79551&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79551&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 23 May 2013 13:09:30 +0000</pubDate>
    <dc:creator>Fernando Ipar</dc:creator>
    <category>Insight for DBAs</category>
    <category>MySQL</category>
    <category>API</category>
    <category>McAfee MySQL Audit Plugin</category>
  </item>

  <item>
    <title>mycheckpoint revision 231 released</title>
    <guid isPermaLink="false">http://code.openark.org/blog/?p=6353</guid>
    <link>http://code.openark.org/blog/mysql/mycheckpoint-revision-released</link>
    <description>A new release for mycheckpoint: lightweight, SQL oriented MySQL monitoring solution.
If you're unfamiliar with mycheckpoint, well, the one minute sales pitch is: it's a free and open source monitoring tool for MySQL, which is extremely easy to install and execute, and which includes custom queries, alerts (via emails), and out of the box HTTP server and charting.
This is mostly a maintenance release, with some long-time requested features, and of course solved bugs. Here are a few highlights:

Supports MariaDB and MySQL 5.6 (issues with new variables, space padded variables, text-valued variables)
Supports alerts via function invocation on monitored host (so not only checking alerts via aggregated data like 'Seconds_behind_master' but also by SELECT my_sanity_check_function() on monitored instance). See alerts.
Supports single-running-instance via &quot;--single&quot; command line argument
Supports strict sql_mode, including ONLY_FULL_GROUP_BY, overcoming bug #69310.

Supports sending of pending email HTML report
Better re-deployment process
Better recognizing of SIGNED/UNSIGNED values
Some other improvements in charting, etc.

mycheckpoint is released under the BSD license.
Downloads are available from the project's page.</description>
    <content:encoded><![CDATA[<p>A <a href="http://code.google.com/p/mycheckpoint/">new release</a> for <strong><a href="http://code.openark.org/forge/mycheckpoint">mycheckpoint</a></strong>: lightweight, SQL oriented MySQL monitoring solution.</p>
<p>If you're unfamiliar with <em>mycheckpoint</em>, well, the one minute sales pitch is: it's a free and open source monitoring tool for MySQL, which is extremely easy to install and execute, and which includes <a href="http://code.openark.org/forge/mycheckpoint/documentation/custom-monitoring">custom queries</a>, <a href="http://code.openark.org/forge/mycheckpoint/documentation/alerts">alerts</a> (via <a href="http://code.openark.org/forge/mycheckpoint/documentation/emails">emails</a>), and out of the box <a href="http://code.openark.org/forge/mycheckpoint/documentation/http-web-server">HTTP server</a> and <a href="http://mycheckpoint.googlecode.com/svn/trunk/doc/html/sample/http/mcp_sql00/sv_report_html_brief">charting</a>.</p>
<p>This is mostly a maintenance release, with some long-time requested features, and of course solved bugs. Here are a few highlights:</p>
<ul>
<li>Supports MariaDB and MySQL 5.6 (issues with new variables, space padded variables, text-valued variables)</li>
<li>Supports alerts via function invocation on monitored host (so not only checking alerts via aggregated data like <strong>'Seconds_behind_master'</strong> but also by <strong>SELECT my_sanity_check_function()</strong> on monitored instance). See <a href="http://code.openark.org/forge/mycheckpoint/documentation/alerts">alerts.</a></li>
<li>Supports single-running-instance via <strong>"--single"</strong> command line argument</li>
<li>Supports strict <strong>sql_mode</strong>, including <strong>ONLY_FULL_GROUP_BY</strong>, overcoming <a href="http://bugs.mysql.com/bug.php?id=69310">bug #69310</a>.<strong><br />
</strong></li>
<li>Supports sending of pending email HTML report</li>
<li>Better re-deployment process</li>
<li>Better recognizing of SIGNED/UNSIGNED values</li>
<li>Some other improvements in charting, etc.</li>
</ul>
<p><em>mycheckpoint</em> is released under the BSD license.</p>
<p><a href="http://code.google.com/p/mycheckpoint/">Downloads are available</a> from the project's page.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79550&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79550&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 23 May 2013 12:21:52 +0000</pubDate>
    <dc:creator>Shlomi Noach</dc:creator>
    <category>MySQL</category>
    <category>Development</category>
    <category>Monitoring</category>
    <category>mycheckpoint</category>
    <category>Open Source</category>
  </item>

  <item>
    <title>MySQL at DrupalCamp, Goteborg - Sweden</title>
    <guid isPermaLink="false">https://blogs.oracle.com/MySQL/entry/mysql_at_drupalcamp_goteborg_sweden</guid>
    <link>https://blogs.oracle.com/MySQL/entry/mysql_at_drupalcamp_goteborg_sweden</link>
    <description>DrupalCamp Conference is hold in Göteborg, Sweden on May 25, 2013. 
  MySQL is part of this show and I would like to invite you to our session on &amp;quot;Scalability and Availability with MySQL Replication&amp;quot; given by Sven Sandberg on Saturday-May 25, 2013 @ 13:45-14:25!
  So, if you are close to Göteborg or attending this event, do not forget to come to listen Sven's talk!
   </description>
    <content:encoded><![CDATA[<p><span><a href="http://summer2013.drupalcamp.se/">DrupalCamp</a> Conference is hold in Göteborg, Sweden on <b>May 25, 2013</b>. </span></p>
  <p><span>MySQL is part of this show and I would like to invite you to our session on &quot;</span><a target="_blank" href="http://summer2013.drupalcamp.se/content/skalbarhet-och-tillganglighet-med-mysql-replikering">Scalability and Availability with MySQL Replication&quot;</a> given by Sven Sandberg on Saturday-May 25, 2013 @ 13:45-14:25!</p>
  <p>So, if you are close to Göteborg or attending this event, do not forget to come to listen Sven's talk!<br /></p>
  <p> </p><br /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79549&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79549&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 23 May 2013 10:16:07 +0000</pubDate>
    <dc:creator>Oracle MySQL Group</dc:creator>
    <category>Community</category>
    <category>conference</category>
    <category>events</category>
    <category>mysql</category>
    <category>replication</category>
  </item>

  <item>
    <title>Percona XtraBackup 2.1.3 for MySQL available for download</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15592</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/22/percona-xtrabackup-2-1-3-for-mysql-available-for-download/</link>
    <description> Percona is glad to announce the release of Percona XtraBackup 2.1.3 for MySQL on May 22, 2013. Downloads are available from our download site here and Percona Software Repositories.This release fixes a high priority bug. It’s advised to upgrade your latest 2.1 version to 2.1.3 if you’re using the Percona XtraBackup with Percona XtraDB Cluster. This release is the latest stable release in the 2.1 series.Bug Fixed:Percona XtraBackup 2.1.2 would hang when performing State Snapshot Transfer. Bug fixed #1182698.Release notes with all the bugfixes for Percona XtraBackup 2.1.3 are available in our online documentation. Bugs can be reported on the launchpad bug tracker.* * *Percona XtraBackup is the world&amp;#8217;s only open-source, free MySQL hot backup software that performs non-blocking backups for InnoDB and XtraDB databases. With Percona XtraBackup, you can achieve the following benefits:Backups that complete quickly and reliablyUninterrupted transaction processing during backupsSavings on disk space and network bandwidthAutomatic backup verificationHigher uptime due to faster restore timeXtraBackup makes MySQL hot backups for all versions of Percona Server, MySQL, MariaDB, and Drizzle. It performs streaming, compressed, and incremental MySQL backups.Percona&amp;#8217;s enterprise-grade commercial MySQL Support contracts include support for XtraBackup. We recommend support for critical production deployments.The post Percona XtraBackup 2.1.3 for MySQL available for download appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/Percona_XtraBackup.jpg"><img class="alignleft  wp-image-12668" style="margin-top: 5px; margin-bottom: 5px;" alt="Percona XtraBackup for MySQL" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/Percona_XtraBackup.jpg" width="206" height="78" /></a> <em>Percona</em> is glad to announce the release of <a href="http://www.percona.com/software/percona-xtrabackup">Percona XtraBackup</a> 2.1.3 for MySQL on May 22, 2013. Downloads are available from our download site <a href="http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.3/">here</a> and <a href="http://www.percona.com/doc/percona-xtrabackup/2.1/installation.html">Percona Software Repositories</a>.</p><p>This release fixes a high priority bug. It’s advised to upgrade your latest 2.1 version to 2.1.3 if you’re using the <a href="http://www.percona.com/software/percona-xtrabackup">Percona XtraBackup</a> with <a href="http://www.percona.com/software/percona-xtradb-cluster">Percona XtraDB Cluster</a>. This release is the latest stable release in the 2.1 series.</p><p><strong>Bug Fixed:</strong></p><ul><li><em>Percona XtraBackup</em> 2.1.2 would hang when performing <a href="http://www.percona.com/doc/percona-xtradb-cluster/manual/state_snapshot_transfer.html">State Snapshot Transfer</a>. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1182698">#1182698</a>.</li></ul><p>Release notes with all the bugfixes for <em>Percona XtraBackup</em> 2.1.3 are available in our <a href="http://www.percona.com/doc/percona-xtrabackup/release-notes/2.1/2.1.3.html">online documentation</a>. Bugs can be reported on the <a href="https://bugs.launchpad.net/percona-xtrabackup/+filebug">launchpad bug tracker</a>.</p><p>* * *</p><p><a href="http://www.percona.com/software/percona-xtrabackup" target="_blank">Percona XtraBackup</a> is the world&#8217;s only open-source, free MySQL hot backup software that performs non-blocking backups for InnoDB and XtraDB databases. With Percona XtraBackup, you can achieve the following benefits:</p><ul><li>Backups that complete quickly and reliably</li><li>Uninterrupted transaction processing during backups</li><li>Savings on disk space and network bandwidth</li><li>Automatic backup verification</li><li>Higher uptime due to faster restore time</li></ul><p>XtraBackup makes MySQL hot backups for all versions of Percona Server, MySQL, MariaDB, and Drizzle. It performs streaming, compressed, and incremental MySQL backups.</p><p>Percona&#8217;s enterprise-grade commercial <a href="http://www.percona.com/mysql-support" target="_blank">MySQL Support</a> contracts include support for XtraBackup. We recommend support for critical production deployments.</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/22/percona-xtrabackup-2-1-3-for-mysql-available-for-download/">Percona XtraBackup 2.1.3 for MySQL available for download</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79548&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79548&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 23 May 2013 00:33:16 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>MySQL</category>
    <category>Percona Software</category>
    <category>Percona XtraBackup</category>
  </item>

  <item>
    <title>MySQL vs Drizzle plugin APIs</title>
    <guid isPermaLink="false">http://www.flamingspork.com/blog/?p=3345</guid>
    <link>http://www.flamingspork.com/blog/2013/05/23/mysql-vs-drizzle-plugin-api/?utm_source=rss&amp;amp;utm_medium=rss&amp;amp;utm_campaign=mysql-vs-drizzle-plugin-api</link>
    <description>There&amp;#8217;s a big difference in how plugins are treated in MySQL and how they are treated in Drizzle. The MySQL way has been to create a C API in front of the C++-like (I call it C- as it manages to take the worst of both worlds) internal &amp;#8220;API&amp;#8221;. The Drizzle way is to have plugins be first class citizens and use exactly the same API as if they were inside the server.
This means that MySQL attempts to maintain API stability. This isn&amp;#8217;t something worth trying for. Any plugin that isn&amp;#8217;t trivial quickly surpasses what is exposed via the C API and has to work around it, or, it&amp;#8217;s a storage engine and instead you have this horrible mash of C and C++. The byproduct of this is that no core server features are being re-implemented as plugins. This means the API is being developed in a vacuum devoid of usefulness. At least, this was the case&amp;#8230; The authentication plugin API seems to be an exception, and it&amp;#8217;s interesting to note that semisync replication is in fact a plugin.
So times may be changing&amp;#8230; sort of. Yesterday I noted that some storage engine API features are only available if you&amp;#8217;re InnoDB and I&amp;#8217;ve voiced my general disappointment in the audit API being unsuitable to implement various forms of query logging already in the server (general query log, slow query log).
One thing to note: when the API is the same for both inside the server and a plugin, it makes initial refactoring very easy, and you quickly see the bits that could be improved.</description>
    <content:encoded><![CDATA[<p>There&#8217;s a big difference in how plugins are treated in MySQL and how they are treated in Drizzle. The MySQL way has been to create a C API in front of the C++-like (I call it C- as it manages to take the worst of both worlds) internal &#8220;API&#8221;. The Drizzle way is to have plugins be first class citizens and use exactly the same API as if they were inside the server.</p>
<p>This means that MySQL attempts to maintain API stability. This isn&#8217;t something worth trying for. Any plugin that isn&#8217;t trivial quickly surpasses what is exposed via the C API and has to work around it, or, it&#8217;s a storage engine and instead you have this horrible mash of C and C++. The byproduct of this is that <strong>no core server features are being re-implemented as plugins</strong>. This means the API is being developed in a vacuum devoid of usefulness. At least, this <strong>was</strong> the case&#8230; The authentication plugin API seems to be an exception, and it&#8217;s interesting to note that semisync replication is in fact a plugin.</p>
<p>So times may be changing&#8230; sort of. Yesterday I noted that some storage engine API features are only available if you&#8217;re InnoDB and I&#8217;ve voiced my general disappointment in the audit API being unsuitable to implement various forms of query logging already in the server (general query log, slow query log).</p>
<p>One thing to note: when the API is the same for both inside the server and a plugin, it makes initial refactoring very easy, and you quickly see the bits that could be improved.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79547&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79547&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 23 May 2013 00:11:21 +0000</pubDate>
    <dc:creator>Stewart Smith</dc:creator>
    <category>code</category>
    <category>drizzle</category>
    <category>mysql</category>
    <category>plugin</category>
    <category>storage engine api</category>
  </item>

  <item>
    <title>Hint of the day: Warning level in Error Log to see Aborted Connections</title>
    <guid isPermaLink="false">http://openquery.com/blog/?p=1915</guid>
    <link>http://openquery.com/blog/hint-day-warning-level-error-log-aborted-connections</link>
    <description>log_warnings = 2
Yields useful information in the MariaDB or MySQL error log file (or syslog on Debian/Ubuntu) you don&amp;#8217;t want to miss out on.
You will know about aborted connections, which are otherwise only visible through global status as Aborted_connects (lost connection before they completed authentication) and Aborted_clients (cut fully authenticated connection).
It looks like
130523 2:14:05 [Warning] Aborted connection 173629 to db: 'unconnected' user: 'someapp' host: '10.2.0.50' (Unknown error)
You will know when, where from, and if for instance a wrong password was used you&amp;#8217;ll see the username. Basically you&amp;#8217;ll get as much info as the server has available at that point. Useful.
&amp;nbsp;</description>
    <content:encoded><![CDATA[<pre>log_warnings = 2</pre>
<p>Yields useful information in the MariaDB or MySQL error log file (or syslog on Debian/Ubuntu) you don&#8217;t want to miss out on.</p>
<p>You will know about aborted connections, which are otherwise only visible through global status as <strong>Aborted_connects</strong> (lost connection before they completed authentication) and <strong>Aborted_clients</strong> (cut fully authenticated connection).</p>
<p>It looks like</p>
<pre>130523 2:14:05 [Warning] Aborted connection 173629 to db: 'unconnected' user: 'someapp' host: '10.2.0.50' (Unknown error)</pre>
<p>You will know when, where from, and if for instance a wrong password was used you&#8217;ll see the username. Basically you&#8217;ll get as much info as the server has available at that point. Useful.</p>
<p>&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79546&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79546&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 22 May 2013 23:26:09 +0000</pubDate>
    <dc:creator>Open Query</dc:creator>
    <category>Good practice / Bad practice</category>
  </item>

  <item>
    <title>Why you shouldn't hire a devops</title>
    <guid isPermaLink="false">1081 at http://www.krisbuytaert.be/blog</guid>
    <link>http://www.krisbuytaert.be/blog/why-you-shouldnt-hire-devops</link>
    <description>Lately there have been a lot of organisations trying to hire a devops engineer.
I myselve have been asked to fill in devops roles .. 
There's a number of issues with that.
The biggest problem is that I always have to ask what exactly the organisation is looking for.
So you want a devops engineer with experience in Linux, MongoDB, MySQL and  Java ,  does that mean you want a Java developer who is familiar with MySQL and Linux and breaths a devops Culture.
Or a Linux expert who understands Java developers and knows how to tune Mongo and MySQL ?
It's absolutely unclear what you want when you are hiring &quot;A devops engineer&quot;
The second problem is that you are trying to hire people who are knowledgeable about  devops, 
Yet a lot of those people know that you can't do devops on your own ,  devops is not a jobtitle. devops is not a new devops team you create.   
To some of them you are even making a fool out of yourselve,  as to them you show that you don't understand devops
On top .. the ones that do apply for this fancy new devops role, are the ones that might not get the fact that the problem isn't about tooling but about people working together and helping eachother , so you end up hiring the wrong people.
Even in todays devops culture a system engineer is still a system engineer,  and a developer is still a developer.
You might have developers supporting the build tool chain, or system engineers focussing on infrastructure automation.
But as John said almost 3 years ago they are good at their job.
Devops is not a word you slap onto a tool, a team or a person and expect magic to happen 
Let's face it .. devops is hard, you can't do this on your own .. you need to find the right people ..</description>
    <content:encoded><![CDATA[<p>Lately there have been a lot of organisations trying to hire a devops engineer.<br />
I myselve have been asked to fill in devops roles .. </p>
<p>There's a number of issues with that.</p>
<p>The biggest problem is that I always have to ask what exactly the organisation is looking for.</p>
<p>So you want a devops engineer with experience in Linux, MongoDB, MySQL and  Java ,  does that mean you want a Java developer who is familiar with MySQL and Linux and breaths a devops Culture.<br />
Or a Linux expert who understands Java developers and knows how to tune Mongo and MySQL ?</p>
<p>It's absolutely unclear what you want when you are hiring "A devops engineer"</p>
<p>The second problem is that you are trying to hire people who are knowledgeable about  devops, </p>
<p>Yet a lot of those people know that you can't do devops on your own ,  devops is not a jobtitle. devops is not a new devops team you create.   </p>
<p>To some of them you are even making a fool out of yourselve,  as to them you show that you don't understand devops</p>
<p>On top .. the ones that do apply for this fancy new devops role, are the ones that might not get the fact that the problem isn't about tooling but about people working together and helping eachother , so you end up hiring the wrong people.</p>
<p>Even in todays devops culture a system engineer is still a system engineer,  and a developer is still a developer.<br />
You might have developers supporting the build tool chain, or system engineers focussing on infrastructure automation.</p>
<p>But as John said almost 3 years ago <a href="http://www.krisbuytaert.be/blog/apparently-devops-not-jobtitle#comment-3992">they are good at their job.</a></p>
<p>Devops is not a word you slap onto a tool, a team or a person and expect magic to happen </p>
<p>Let's face it .. devops is hard, you can't do this on your own .. you need to find the right people ..</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79545&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79545&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 22 May 2013 21:11:15 +0000</pubDate>
    <dc:creator>Kris Buytaert</dc:creator>
    <category>devops</category>
    <category>infracoders</category>
    <category>puppet</category>
    <category>puppetize</category>
  </item>

  <item>
    <title>Percona MySQL University @Portland: June 17</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15607</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/22/percona-mysql-university-portland-june-17-2013/</link>
    <description>Peter Zaitsev leads a track at the inaugural Percona MySQL University event in Raleigh, N.C. on Jan. 29, 2013.Portland is a well-recognized hub for Open Source technologies in the Northwest, home to conferences such as OSCON and Open Source Bridge as well as hosts of OpenSQL Camp in 2009. As such it is a very natural place for our next Percona MySQL University event scheduled for June 17.We run this event in partnership with MySQL Meetup at Portland organized by our own Daniel Nichter, who recently moved to the area.Percona MySQL University is a daylong, free, fast-paced and very technical MySQL educational event for wide range of people interested in MySQL &amp;#8211; Developers, System Administrators, DBAs, etc. It will be held at Portland State University&amp;#8217;s Smith Memorial Student Union.We&amp;#8217;ll finalize the schedule next week and still have some speaking opportunities available &amp;#8211; if you would like to share your MySQL story at this event please email Matthew Dowell by Tuesday, May 28.If you&amp;#8217;re not in Portland and would like Percona MySQL University to come to your city, please fill out the form to let us know. We&amp;#8217;ll try to come to the cities showing greatest interest.As usual space is limited, so Register Now! The post Percona MySQL University @Portland: June 17 appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<div><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/PMySQLU.jpg"><img class="size-medium wp-image-12663" alt="Percona CEO Peter Zaitsev leads a track at the inaugural Percona MySQL University event in Raleigh, N.C. on Jan. 29, 2013." src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/PMySQLU-300x224.jpg" width="300" height="224" /></a><p>Peter Zaitsev leads a track at the inaugural Percona MySQL University event in Raleigh, N.C. on Jan. 29, 2013.</p></div><p>Portland is a well-recognized hub for Open Source technologies in the Northwest, home to conferences such as <a href="http://www.oscon.com/oscon2013">OSCON</a> and <a href="http://www.opensourcebridge.org">Open Source Bridge</a> as well as hosts of OpenSQL Camp in 2009. As such it is a very natural place for our next <a href="http://www.percona.com/news-and-events/percona-mysql-university/portland-oregon-2013">Percona MySQL University</a> event scheduled for June 17.</p><p>We run this event in partnership with <a href="http://www.meetup.com/Portland-MySQL-User-Group-PDX-MUG/">MySQL Meetup at Portland</a> organized by our own <a href="http://www.percona.com/about-us/our-team/daniel-nichter" target="_blank">Daniel Nichter</a>, who recently moved to the area.</p><p>Percona MySQL University is a daylong, free, fast-paced and very technical MySQL educational event for wide range of people interested in MySQL &#8211; Developers, System Administrators, DBAs, etc. It will be held at Portland State University&#8217;s <a href="http://www.pdx.edu/conferences/smith-memorial-student-union" target="_blank">Smith Memorial Student Union</a>.</p><p>We&#8217;ll finalize the schedule next week and still have some speaking opportunities available &#8211; if you would like to share your MySQL story at this event please email <a href="mailto:matthew.dowell@percona.com">Matthew Dowell</a> by Tuesday, May 28.</p><p>If you&#8217;re not in Portland and would like Percona MySQL University to come to your city, please <a href="http://form.percona.com/Percona_MySQL_University_Interest.html">fill out the form</a> to let us know. We&#8217;ll try to come to the cities showing greatest interest.</p><p>As usual space is limited, so <a href="http://www.percona.com/news-and-events/percona-mysql-university/portland-oregon-2013">Register Now! </a></p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/22/percona-mysql-university-portland-june-17-2013/">Percona MySQL University @Portland: June 17</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79544&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79544&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 22 May 2013 19:32:23 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>MySQL</category>
    <category>Percona MySQL University</category>
    <category>Peter Zaitsev</category>
    <category>Portland</category>
  </item>

  <item>
    <title>MySQL and the SSB – Part 2 – MyISAM vs InnoDB low concurrency</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15417</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/22/mysql-and-the-ssb-part-2-myisam-vs-innodb-low-concurrency/</link>
    <description>This blog post is part two in what is now a continuing series on the Star Schema Benchmark.In my previous blog post I compared MySQL 5.5.30 to MySQL 5.6.10, both with default settings using only the InnoDB storage engine.  In my testing I discovered that innodb_old_blocks_time had an effect on performance of the benchmark.  There was some discussion in the comments and I promised to follow up with more SSB tests at a later date.I also promised more low concurrency SSB tests when Peter blogged about the importance of performance at low concurrency.The SSB The SSB tests a database&amp;#8217;s ability to optimize queries for a star schema. A star schema presents some unique challenge to the database optimizer. The SSB benchmark consists of four sets of queries. Each set is known as a &amp;#8220;flight&amp;#8221;. I have labeled each query as Q{FLIGHT_NUMBER}.{QUERY_NUMBER}. In general, each flight examines different time periods or different regions. The flights represent the type of investigations and drill-downs that are common in OLAP analysis.Each query in each flight (Q1.1 for example) is tested with a cold buffer pool. Then the query is tested again without restarting the database. The first test is described as the cold test, and the second as the hot test. The database software is restarted after the hot test. All OS caches are dropped at this time as well.These set of queries were tested on the SSB at SCALE FACTOR: 20. This means there is approximately 12GB of data in the largest table.You can find the individual SSB query definitions in my previous blog post.Test environment These tests were done on a relatively fast machine with a Xeon E5-2680 (8 cores, 16 threads) with fast IO (OCZ R4 1.6TB) and 128GB memory. For the hot test, the data fits in the buffer pool and has been loaded by the cold test already. The buffer pool and adaptive hash index are cold for the cold test. All tests were done with no concurrency. The hardware for this test was provided by Adotomi. I will be blogging about raw performance of the OCZ card in another post.Also, while it is labeled on the graphs, it is important to note that in all cases, lower times are better.SSB Flight #1 Here you will see the start of an interesting trend. MyISAM is faster when the data is not cached (the cold run) but is slower in the hot (cached) run. I did some investigation during the testing and found that InnoDB does more IO than MyISAM when the database is cold, but uses less CPU time when the database is hot. I am only speculating (and I can investigate further), but I believe the adaptive hash index is improving performance of InnoDB significantly during the hot run, as hash indexes are faster than a b-tree index. Also accessing pages from the buffer pool should be faster than getting them from the OS cache, which is another advantage of InnoDB.&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;SSB Flight #2 Flight #2 is similar to Flight #1. MyISAM is faster than InnoDB when the database is cold, but the opposite is true when the database is hot.&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SSB Flight #3 Here in some cases MyISAM is substantially faster than InnoDB both cold and hot.&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;SSB Flight #4 There is one query in this flight, Q4.3, which is faster using MyISAM than InnoDB. Like the queries in Flight #3 that are faster using MyISAM, Q4.3 examines very little data. It seems that InnoDB performs better when a larger number of rows must be joined together (Q4.1, Q4.2) but worse when small amounts of data are examined.&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;ConclusionIn some cases MyISAM is faster than InnoDB, but usually only when the buffer pool is cold. Please don&amp;#8217;t take away that you should be using MyISAM for everything!. MyISAM may be good for raw performance, but there are limitations which MyISAM imposes that are difficult to work with.  MyISAM does not maintain checksum consistency during regular operations and is not ACID compliant. MyISAM and InnoDB may perform differently under concurrency, which this benchmark does not cover. I will make a follow-up post about concurrency in another blog post in this series. Regardless, when the working set fits in memory, InnoDB almost always performs better, at least for this workload.NotesMySQL version used: 5.6.11, custom compiled to remove performance_schemaFor the InnoDB tests, a 64GB buffer pool was used. O_DIRECT was used so, there was no caching of data at the filesystem level. The InnoDB indexes were built using ALTER TABLE fast index creation (merge sort).For the MyISAM tests I used a 10GB key buffer. I used ALTER TABLE DISABLE KEYS and built the keys with sort via ALTER TABLE ENABLE KEYS. my.cnf[mysqld]
datadir=/mnt/mysql56/data
basedir=/usr/local/mysql
socket=/var/lib/mysql/mysql.sock
user=justin
innodb_buffer_pool_size=64G
innodb_log_file_size=4G
innodb_file_per_table
innodb_stats_on_metadata=off
innodb_file_format=barracuda
innodb_log_buffer_size=32M
innodb_buffer_pool_instances=16
metadata_locks_hash_instances=32
table_open_cache_instances=8
sort_buffer_size=128k
read_rnd_buffer_size=8M
join_buffer_size=8M
default_tmp_storage_engine=myisam
tmpdir=/dev/shm
innodb_undo_logs=32
innodb_old_blocks_time=0
table_open_cache=2048
table_definition_cache=16384
innodb_flush_method=O_DIRECT
key_buffer_size=10G
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_stats_persistent
innodb_stats_auto_update=off
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pidThe post MySQL and the SSB &amp;#8211; Part 2 &amp;#8211; MyISAM vs InnoDB low concurrency appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p>This blog post is part two in what is now a continuing series on the Star Schema Benchmark.</p><p>In my <a href="http://www.mysqlperformanceblog.com/2013/03/11/mysql-5-6-vs-5-5-on-the-star-schema-benchmark/" target="_blank">previous blog post</a> I compared MySQL 5.5.30 to MySQL 5.6.10, both with default settings using only the InnoDB storage engine.  In my testing I discovered that innodb_old_blocks_time had an effect on performance of the benchmark.  There was some discussion in the comments and I promised to follow up with more SSB tests at a later date.</p><p>I also promised more low concurrency SSB tests when Peter <a href="http://www.mysqlperformanceblog.com/2013/03/27/why-mysql-performance-at-low-concurrency-is-important/">blogged about the importance of performance at low concurrency</a>.</p><p><b>The SSB</b><br
/> The SSB tests a database&#8217;s ability to optimize queries for a star schema. A star schema presents some unique challenge to the database optimizer. The SSB benchmark consists of four sets of queries. Each set is known as a &#8220;flight&#8221;. I have labeled each query as Q{FLIGHT_NUMBER}.{QUERY_NUMBER}. In general, each flight examines different time periods or different regions. The flights represent the type of investigations and drill-downs that are common in OLAP analysis.</p><p>Each query in each flight (Q1.1 for example) is tested with a cold buffer pool. Then the query is tested again without restarting the database. The first test is described as the cold test, and the second as the hot test. The database software is restarted after the hot test. All OS caches are dropped at this time as well.</p><p>These set of queries were tested on the SSB at SCALE FACTOR: 20. This means there is approximately 12GB of data in the largest table.</p><p>You can find the individual SSB query definitions <a href="http://www.mysqlperformanceblog.com/?p=15287">in my previous blog post</a>.</p><p><b>Test environment</b><br
/> These tests were done on a relatively fast machine with a Xeon E5-2680 (8 cores, 16 threads) with fast IO (OCZ R4 1.6TB) and 128GB memory. For the hot test, the data fits in the buffer pool and has been loaded by the cold test already. The buffer pool and adaptive hash index are cold for the cold test. All tests were done with no concurrency. The hardware for this test was provided by <a href="http://www.adotomi.com/">Adotomi</a>. I will be blogging about raw performance of the OCZ card in another post.</p><p>Also, while it is labeled on the graphs, it is important to note that in all cases, <b>lower times are better</b>.</p><p><b>SSB Flight #1</b><br
/> Here you will see the start of an interesting trend. MyISAM is faster when the data is not cached (the cold run) but is slower in the hot (cached) run. I did some investigation during the testing and found that InnoDB does more IO than MyISAM when the database is cold, but uses less CPU time when the database is hot. I am only speculating (and I can investigate further), but I believe the adaptive hash index is improving performance of InnoDB significantly during the hot run, as hash indexes are faster than a b-tree index. Also accessing pages from the buffer pool should be faster than getting them from the OS cache, which is another advantage of InnoDB.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><center><br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image009.png"><img alt="image009" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image009.png" width="482" height="290" /></a></center>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><center><br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image001.png"><img alt="image001" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image001.png" width="482" height="290" /></a></center>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><b>SSB Flight #2</b><br
/> Flight #2 is similar to Flight #1. MyISAM is faster than InnoDB when the database is cold, but the opposite is true when the database is hot.</p><p>&nbsp;</p><p>&nbsp;</p><p><center><br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image012.png"><img alt="image012" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image012.png" width="482" height="290" /></a></center>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><center><br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image003.png"><img alt="image003" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image003.png" width="482" height="290" /></a></center>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><b>SSB Flight #3</b><br
/> Here in some cases MyISAM is substantially faster than InnoDB both cold and hot.</p><p>&nbsp;</p><p>&nbsp;</p><p><center><br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image014.png"><img alt="image014" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image014.png" width="482" height="290" /></a></center>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><center><br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image005.png"><img alt="image005" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image005.png" width="482" height="290" /></a></center>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><b>SSB Flight #4</b><br
/> There is one query in this flight, Q4.3, which is faster using MyISAM than InnoDB. Like the queries in Flight #3 that are faster using MyISAM, Q4.3 examines very little data. It seems that InnoDB performs better when a larger number of rows must be joined together (Q4.1, Q4.2) but worse when small amounts of data are examined.</p><p>&nbsp;</p><p>&nbsp;</p><p><center><br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image016.png"><img alt="image016" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image016.png" width="482" height="290" /></a></center>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><center><br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image007.png"><img alt="image007" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/image007.png" width="482" height="290" /></a></center>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p><strong>Conclusion</strong></p><p>In some cases MyISAM is faster than InnoDB, but usually only when the buffer pool is cold. <strong>Please don&#8217;t take away that you should be using MyISAM for everything!</strong>. MyISAM may be good for raw performance, but there are limitations which MyISAM imposes that are difficult to work with.  MyISAM does not maintain checksum consistency during regular operations and is not ACID compliant. MyISAM and InnoDB may perform differently under concurrency, which this benchmark does not cover. I will make a follow-up post about concurrency in another blog post in this series. Regardless, when the working set fits in memory, InnoDB almost always performs better, at least for this workload.</p><p><strong>Notes</strong></p><p>MySQL version used: 5.6.11, custom compiled to remove performance_schema</p><p>For the InnoDB tests, a 64GB buffer pool was used. O_DIRECT was used so, there was no caching of data at the filesystem level. The InnoDB indexes were built using ALTER TABLE fast index creation (merge sort).</p><p>For the MyISAM tests I used a 10GB key buffer. I used ALTER TABLE DISABLE KEYS and built the keys with sort via ALTER TABLE ENABLE KEYS.<br
/> <b>my.cnf</b></p><pre>[mysqld]
datadir=/mnt/mysql56/data
basedir=/usr/local/mysql
socket=/var/lib/mysql/mysql.sock
user=justin
innodb_buffer_pool_size=64G
innodb_log_file_size=4G
innodb_file_per_table
innodb_stats_on_metadata=off
innodb_file_format=barracuda
innodb_log_buffer_size=32M
innodb_buffer_pool_instances=16
metadata_locks_hash_instances=32
table_open_cache_instances=8
sort_buffer_size=128k
read_rnd_buffer_size=8M
join_buffer_size=8M
default_tmp_storage_engine=myisam
tmpdir=/dev/shm
innodb_undo_logs=32
innodb_old_blocks_time=0
table_open_cache=2048
table_definition_cache=16384
innodb_flush_method=O_DIRECT
key_buffer_size=10G
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
innodb_stats_persistent
innodb_stats_auto_update=off
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid</pre><p></p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/22/mysql-and-the-ssb-part-2-myisam-vs-innodb-low-concurrency/">MySQL and the SSB &#8211; Part 2 &#8211; MyISAM vs InnoDB low concurrency</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79543&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79543&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 22 May 2013 13:50:16 +0000</pubDate>
    <dc:creator>Justin Swanhart</dc:creator>
    <category>Benchmarks</category>
    <category>MySQL</category>
    <category>InnoDB</category>
    <category>Justin Swanhart</category>
    <category>Low Concurrency</category>
    <category>MyISAM</category>
    <category>SSB</category>
    <category>star schema</category>
    <category>Star Schema Benchmark</category>
  </item>

  <item>
    <title>MySQL Workbench 6.0 – A Sneak Preview</title>
    <guid isPermaLink="false">http://mysqlworkbench.org/?p=1635</guid>
    <link>http://mysqlworkbench.org/2013/05/mysql-workbench-6-0-%E2%80%93-a-sneak-preview/</link>
    <description>The MySQL Workbench team has been a little quiet for the past few months, but that&amp;#8217;s because we&amp;#8217;ve been busy working on an exciting new version. Read more about it in Tomas&amp;#8217; blog</description>
    <content:encoded><![CDATA[<p>The MySQL Workbench team has been a little quiet for the past few months, but that&#8217;s because we&#8217;ve been busy working on an exciting new version. Read more about it in <a href="http://insidemysql.com/mysql-workbench-6-0-a-sneak-preview/">Tomas&#8217; blog</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79542&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79542&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 22 May 2013 12:30:57 +0000</pubDate>
    <dc:creator>The Workbench Team</dc:creator>
    <category>News</category>
  </item>

  <item>
    <title>MySQL Workbench 6.0 – A Sneak Preview</title>
    <guid isPermaLink="false">http://insidemysql.com/?p=137</guid>
    <link>http://insidemysql.com/mysql-workbench-6-0-a-sneak-preview/</link>
    <description>The MySQL Developer Tools team is known for their steady release cycle, putting out a new MySQL Workbench release every 4-5 weeks. Now that it has been a bit quiet for a while you may wonder what is going on. Let me share some inside knowledge of what&amp;#8217;s happening behind the scenes.
MySQL Workbench is a key component of our MySQL stack and extremely popular as shown by download numbers and interest in our white papers. It is the face of MySQL on the desktop, and we aim to make it even more popular for developers &amp;amp; DBAs than it is today. We have been looking for strong C++ and Python developers to grow the team further, and I&amp;#8217;m happy to welcome Marcin Szalowicz from Poland and Miguel Tadeu from Portugal who started this Monday. They are going to work on both, the C++ backend and the native UI frontend of the product.
For some time the focus for the team has been on the next major release of MySQL Workbench which will be called 6.0. If you are familiar with the current version (5.2) you are going to see that we have been listening carefully to the feedback we&amp;#8217;ve got. Here are the main areas that have been improved.
Simplified Workflow
The current WB 5.2 UI was designed for three specific workflows, SQL Development, EER Modelling and Administration. This is represented by the 3 main areas of the WB 5.2 Home screen and makes good sense if you have a very specific role in your company and use WB for that specific purpose, e.g. Administration of MySQL servers. What we learned is that e.g. many developers working in the SQL Editor also want to perform administrative tasks on their development machines and therefore also open an Administrator session. The same is true for DBAs using the SQL Editor to run scripts and queries.
For that reason we have unified SQL Development &amp;amp; Administration and made both available in a single session when you connect to your MySQL Server. The connections now take the main area of the new, redesigned WB 6.0 Home screen. We have also adopt a modern looking UI.
Enterprise Feature Support
MySQL Enterprise Backup and the new Audit Log functionality found in MySQL 5.6 Enterprise are very compelling features for our customers. We got many requests to deliver a streamlined GUI for these features that will now be released as part of WB 6.0. MySQL Workbench will perform all tasks that are needed to configure your MySQL installation for the use of the backup feature and setting up an incremental backup is now as easy as clicking a button.

Improved Code Quality
Another area of focus was to improve the quality of the product. WB 6.0 will contain over 100 bug fixes and will be tested by a dedicated QA team. We are soon going to launch the public Beta test phase and with the help of the MySQL community the WB 6.0 will be the best MySQL Workbench release to date.
More Than 50 Improvements
Apart from working on the major UI changes a lot of work has been invested in improving and extending existing features like Server Status overview, Visual Explain, Editors, Schema Inspector, Table Data Search, and much more.
I hope you got interested in the upcoming MySQL Workbench 6.0 release and you will join the Beta test when it is first announced.
&amp;nbsp;</description>
    <content:encoded><![CDATA[<p>The <a title="MySQL Developer Tools team blog" href="http://mysqlworkbench.org/" target="_blank">MySQL Developer Tools</a> team is known for their steady release cycle, putting out a new <a title="MySQL Workbench product page" href="http://www.mysql.com/products/workbench/" target="_blank">MySQL Workbench</a> release every 4-5 weeks. Now that it has been a bit quiet for a while you may wonder what is going on. Let me share some inside knowledge of what&#8217;s happening behind the scenes.</p>
<p>MySQL Workbench is a key component of our MySQL stack and extremely popular as shown by download numbers and interest in our white papers. It is the face of MySQL on the desktop, and we aim to make it even more popular for developers &amp; DBAs than it is today. We have been looking for strong C++ and Python developers to grow the team further, and I&#8217;m happy to welcome Marcin Szalowicz from Poland and Miguel Tadeu from Portugal who started this Monday. They are going to work on both, the C++ backend and the native UI frontend of the product.</p>
<p><img class="size-full alignright" style="border: 0px;" alt="WB6.0SplashSmall" src="http://insidemysql.com/wp-content/uploads/2013/05/WB6.0SplashSmall.jpg" width="290" height="170" />For some time the focus for the team has been on the next major release of MySQL Workbench which will be called 6.0. If you are familiar with the current version (5.2) you are going to see that we have been listening carefully to the feedback we&#8217;ve got. Here are the main areas that have been improved.</p>
<h1>Simplified Workflow</h1>
<p>The current WB 5.2 UI was designed for three specific workflows, SQL Development, EER Modelling and Administration. This is represented by the 3 main areas of the WB 5.2 Home screen and makes good sense if you have a very specific role in your company and use WB for that specific purpose, e.g. Administration of MySQL servers. What we learned is that e.g. many developers working in the SQL Editor also want to perform administrative tasks on their development machines and therefore also open an Administrator session. The same is true for DBAs using the SQL Editor to run scripts and queries.</p>
<p>For that reason we have unified SQL Development &amp; Administration and made both available in a single session when you connect to your MySQL Server. The connections now take the main area of the new, redesigned WB 6.0 Home screen. We have also adopt a modern looking UI.<a href="http://insidemysql.com/wp-content/uploads/2013/05/WB6.0HomeScreen.png"><img class="alignnone " style="border: 0px;" alt="WB6.0HomeScreenExSmall" src="http://insidemysql.com/wp-content/uploads/2013/05/WB6.0HomeScreenExSmall.jpg" width="580" height="384" /></a></p>
<h1>Enterprise Feature Support</h1>
<p>MySQL Enterprise Backup and the new Audit Log functionality found in MySQL 5.6 Enterprise are very compelling features for our customers. We got many requests to deliver a streamlined GUI for these features that will now be released as part of WB 6.0. MySQL Workbench will perform all tasks that are needed to configure your MySQL installation for the use of the backup feature and setting up an incremental backup is now as easy as clicking a button.</p>
<p><a href="http://insidemysql.com/wp-content/uploads/2013/05/Wb6.0EnterpriseBackup.png"><img class="alignnone " style="border: 0px;" alt="Wb6.0EnterpriseBackupSmall" src="http://insidemysql.com/wp-content/uploads/2013/05/Wb6.0EnterpriseBackupSmall.jpg" width="580" height="443" /></a></p>
<h1>Improved Code Quality</h1>
<p>Another area of focus was to improve the quality of the product. WB 6.0 will contain over 100 bug fixes and will be tested by a dedicated QA team. We are soon going to launch the public Beta test phase and with the help of the MySQL community the WB 6.0 will be the best MySQL Workbench release to date.</p>
<h1>More Than 50 Improvements</h1>
<p>Apart from working on the major UI changes a lot of work has been invested in improving and extending existing features like Server Status overview, Visual Explain, Editors, Schema Inspector, Table Data Search, and much more.</p>
<p>I hope you got interested in the upcoming MySQL Workbench 6.0 release and you will join the Beta test when it is first announced.</p>
<p>&nbsp;</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79541&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79541&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 22 May 2013 08:57:54 +0000</pubDate>
    <dc:creator>Tomas Ulin</dc:creator>
    <category>MySQL Development</category>
  </item>

  <item>
    <title>Some storage engine features you only get if you’re InnoDB</title>
    <guid isPermaLink="false">http://www.flamingspork.com/blog/?p=3338</guid>
    <link>http://www.flamingspork.com/blog/2013/05/22/some-storage-engine-features-you-only-get-if-youre-innodb/?utm_source=rss&amp;amp;utm_medium=rss&amp;amp;utm_campaign=some-storage-engine-features-you-only-get-if-youre-innodb</link>
    <description>I had reason to look into the extended secondary index code in MariaDB and MySQL recently, and there was one bit that I really didn&amp;#8217;t like.
MariaDB:
share-&amp;gt;set_use_ext_keys_flag(legacy_db_type == DB_TYPE_INNODB);
MySQL:
use_extended_sk= (legacy_db_type == DB_TYPE_INNODB);
In case you were wondering what &amp;#8220;legacy_db_type&amp;#8221; actually does, let me tell you: it&amp;#8217;s not legacy at all, it&amp;#8217;s kind of key to how the whole &amp;#8220;metadata&amp;#8221; system in MySQL works. For example, to drop a table, this magic number is used to work out what storage engine to call to drop the table.
Now, these code snippets basically kiss goodbye to the idea of a &amp;#8220;pluggable storage engine&amp;#8221; architecture. If you&amp;#8217;re not InnoDB, you don&amp;#8217;t get to have certain features. This isn&amp;#8217;t exactly MySQL or MariaDB encouraging an open storage engine ecosystem (quite the opposite really).
Having the MySQL server have this incredibly basic, busy and incomplete understanding of metadata has always been a bit of a mess. The code for reading a table definition out of the FRM file really does show its age, and has fingers all through the server.
If somebody was serious about refactoring server code, you&amp;#8217;d certainly be looking here, as this code is a major source of arbitrary limitations. However, if you have the server and the engine(s) both having separate views of what is the &amp;#8220;correct&amp;#8221; state of metadata you end up with a mess (anyone who has had InnoDB be out of sync with FRMs knows this one). I worry that the FRM code will be replaced with something even less understandable by humans, again making the mistake that the server knows the state of the engine better than the engine does.
See Also:

Sergey Petrunia’s blog on the topic of extended keys: http://s.petrunia.net/blog/?p=74

Sergey Glukhov blogs on the MySQL implementation: http://glukhsv.blogspot.com.au/2012/12/innodb-extended-secondary-keys.html
</description>
    <content:encoded><![CDATA[<p>I had reason to look into the extended secondary index code in MariaDB and MySQL recently, and there was one bit that I really didn&#8217;t like.</p>
<p>MariaDB:</p>
<blockquote><p><code>share-&gt;set_use_ext_keys_flag(legacy_db_type == DB_TYPE_INNODB);</code></p></blockquote>
<p>MySQL:</p>
<blockquote><p><code>use_extended_sk= (legacy_db_type == DB_TYPE_INNODB);</code></p></blockquote>
<p>In case you were wondering what &#8220;legacy_db_type&#8221; actually does, let me tell you: it&#8217;s not legacy at all, it&#8217;s kind of key to how the whole &#8220;metadata&#8221; system in MySQL works. For example, to drop a table, this magic number is used to work out what storage engine to call to drop the table.</p>
<p>Now, these code snippets basically kiss goodbye to the idea of a &#8220;pluggable storage engine&#8221; architecture. If you&#8217;re not InnoDB, you don&#8217;t get to have certain features. This isn&#8217;t exactly MySQL or MariaDB encouraging an open storage engine ecosystem (quite the opposite really).</p>
<p>Having the MySQL server have this incredibly basic, busy and incomplete understanding of metadata has always been a bit of a mess. The code for reading a table definition out of the FRM file really does show its age, and has fingers all through the server.</p>
<p>If somebody was serious about refactoring server code, you&#8217;d certainly be looking here, as this code is a major source of arbitrary limitations. However, if you have the server and the engine(s) both having separate views of what is the &#8220;correct&#8221; state of metadata you end up with a mess (anyone who has had InnoDB be out of sync with FRMs knows this one). I worry that the FRM code will be replaced with something even less understandable by humans, again making the mistake that the server knows the state of the engine better than the engine does.</p>
<p>See Also:</p>
<ul>
<li><span><a href="http://s.petrunia.net/blog/">Sergey Petrunia’s blog</a> on the topic of extended keys: <a href="http://s.petrunia.net/blog/?p=74">http://s.petrunia.net/blog/?p=74</a><br />
</span></li>
<li><a href="http://www.blogger.com/profile/15144909942117839863" rel="author" data-gapiattached="true" data-onload="true" data-gapiscan="true">Sergey Glukhov </a>blogs on the MySQL implementation: <a href="http://glukhsv.blogspot.com.au/2012/12/innodb-extended-secondary-keys.html">http://glukhsv.blogspot.com.au/2012/12/innodb-extended-secondary-keys.html</a></li>
</ul><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79540&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79540&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 22 May 2013 03:45:49 +0000</pubDate>
    <dc:creator>Stewart Smith</dc:creator>
    <category>code</category>
    <category>mysql</category>
  </item>

  <item>
    <title>Implementing asynchronous cascade delete in MySQL</title>
    <guid isPermaLink="false">http://flite.github.com/mechanics/blog/2013/05/21/implementing-asynchronous-cascade-delete-in-mysql</guid>
    <link>http://flite.github.com/mechanics/blog/2013/05/21/implementing-asynchronous-cascade-delete-in-mysql/</link>
    <description>A while back one of my foreign keys started causing trouble. The problem was that some parent rows had tens of thousand of child rows, and the foreign key was defined with CASCADE DELETE enabled. When we deleted one of those parent rows on a master database, it took several seconds to execute the delete because of the cascade. This led to latency for the end user, and also led to replication delays.

The immediate solution was make the application tolerant of orphaned rows in the child table and to drop the explicit foreign key constraint.

I didn't really want to leave those orphaned rows hanging around in the child table, so I decided to implement an asynchronous process to delete the orphaned rows on a scheduled basis. Read on for a description of that process.




Using the sakila database as an example, imagine I drop the foreign key between file_category and category, like so:


alter table sakila.film_category
  drop foreign key fk_film_category_category;


Without the foreign key in place, deletes on the category table lead to orphaned rows in film_category. For example, I will delete the &quot;New&quot; category:

```
mysql&gt; delete from sakila.category

-&amp;gt; where name = 'New';


Query OK, 1 row affected (0.01 sec)
```

There are several ways to count the orphaned rows. Here are two different naive implementations using OUTER JOIN or NOT EXISTS:

```
mysql&gt; select count(*)

-&amp;gt; from sakila.film_category c 
-&amp;gt; left outer join sakila.category p on p.category_id = c.category_id 
-&amp;gt; where p.category_id is null;


+----------+
| count(*) |
+----------+
|       63 |
+----------+
1 row in set (0.00 sec)

mysql&gt; select count(*)

-&amp;gt; from sakila.film_category c 
-&amp;gt; where not exists 
-&amp;gt; (
-&amp;gt;   select NULL from sakila.category p where p.category_id = c.category_id
-&amp;gt; );


+----------+
| count(*) |
+----------+
|       63 |
+----------+
1 row in set (0.01 sec)
```

I can also delete the orphaned rows using the same query approaches. I'll roll the first delete back so I can demonstrate the second query in the same session:

```
mysql&gt; set autocommit = 0;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; delete c.*

-&amp;gt; from sakila.film_category c 
-&amp;gt; left outer join sakila.category p on p.category_id = c.category_id 
-&amp;gt; where p.category_id is null;


Query OK, 63 rows affected (0.02 sec)

mysql&gt; rollback;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; delete c.*

-&amp;gt; from sakila.film_category c 
-&amp;gt; where not exists (select NULL from sakila.category p where p.category_id = c.category_id);


Query OK, 63 rows affected (0.01 sec)

mysql&gt; commit;
Query OK, 0 rows affected (0.00 sec)
```

This approach will be very slow for tables containing millions of rows, so in my real world case I didn't use this approach. Instead I decided it would be a lot easier and faster to delete the orphaned rows if I knew who their parent was. To this end I created a new table to track the deleted rows, and populated it using a trigger. Continuing the example in the sakila database:

```
CREATE TABLE category_deleted (
  category_id tinyint(3) unsigned NOT NULL,
  name varchar(25) NOT NULL,
  last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  delete_time timestamp NOT NULL,
  PRIMARY KEY (category_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DELIMITER $$

DROP TRIGGER IF EXISTS sakila.TR_A_DEL_CATEGORY $$

CREATE TRIGGER sakila.TR_A_DEL_CATEGORY AFTER DELETE ON sakila.category FOR EACH ROW BEGIN

  INSERT IGNORE INTO sakila.category_deleted (category_id, name, last_update, delete_time)
  VALUES (old.category_id, old.name, old.last_update,now());

END $$

DELIMITER ;
```

Now I can delete another category to test the trigger:

```
mysql&gt; -- delete a single category
mysql&gt; delete from sakila.category

-&amp;gt;     where name = 'Classics';


Query OK, 1 row affected (0.01 sec)

mysql&gt; -- verify the trigger worked
mysql&gt; select * from sakila.category_deleted;
+-------------+----------+---------------------+---------------------+
| category_id | name     | last_update         | delete_time         |
+-------------+----------+---------------------+---------------------+
|           4 | Classics | 2006-02-15 04:46:27 | 2013-05-21 18:21:53 |
+-------------+----------+---------------------+---------------------+
1 row in set (0.00 sec)

mysql&gt; -- count the orphaned rows using the _deleted table
mysql&gt; select count(*)

-&amp;gt; from sakila.film_category c 
-&amp;gt;     inner join sakila.category_deleted p on p.category_id = c.category_id;   


+----------+
| count(*) |
+----------+
|       57 |
+----------+
1 row in set (0.00 sec)
```

I also wanted to execute the deletes on the child table in chunks, so I implemented a stored procedure to delete the orphaned rows by iterating through the rows in the _deleted table, deleting the child rows, and then deleting from the _deleted table. If I had to implement it again, I would probably use common_schema to chunk the deletes so I wouldn't need the stored procedure.

Here's an implementation using common_schema:

```
-- first delete the orphaned rows from the child table
set @script := &quot;
  split(sakila.film_category: delete sakila.film_category.*

from sakila.film_category 
inner join sakila.category_deleted on sakila.category_deleted.category_id = sakila.film_category.category_id 


  )
  SELECT $split_total_rowcount AS 'rows deleted so far';
&quot;;
call common_schema.run(@script);

-- then delete the rows from the _deleted table (assuming they have no children)
delete p.*
from sakila.category_deleted p
left outer join sakila.film_category c on c.category_id = p.category_id
where c.category_id is null;
```</description>
    <content:encoded><![CDATA[<p>A while back one of my foreign keys started causing trouble. The problem was that some parent rows had tens of thousand of child rows, and the foreign key was defined with <code>CASCADE DELETE</code> enabled. When we deleted one of those parent rows on a master database, it took several seconds to execute the delete because of the cascade. This led to latency for the end user, and also led to replication delays.</p>

<p>The immediate solution was make the application tolerant of orphaned rows in the child table and to drop the explicit foreign key constraint.</p>

<p>I didn't really want to leave those orphaned rows hanging around in the child table, so I decided to implement an asynchronous process to delete the orphaned rows on a scheduled basis. Read on for a description of that process.</p>

<!-- more -->


<p>Using the <a href="http://dev.mysql.com/doc/sakila/en/sakila-installation.html">sakila database</a> as an example, imagine I drop the foreign key between <code>file_category</code> and <code>category</code>, like so:</p>

<p><code>
alter table sakila.film_category
  drop foreign key fk_film_category_category;
</code></p>

<p>Without the foreign key in place, deletes on the <code>category</code> table lead to orphaned rows in <code>film_category</code>. For example, I will delete the "New" category:</p>

<p>```
mysql> delete from sakila.category</p>

<pre><code>-&gt; where name = 'New';
</code></pre>

<p>Query OK, 1 row affected (0.01 sec)
```</p>

<p>There are several ways to count the orphaned rows. Here are two different naive implementations using <code>OUTER JOIN</code> or <code>NOT EXISTS</code>:</p>

<p>```
mysql> select count(*)</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt; left outer join sakila.category p on p.category_id = c.category_id 
-&gt; where p.category_id is null;
</code></pre>

<p>+----------+
| count(*) |
+----------+
|       63 |
+----------+
1 row in set (0.00 sec)</p>

<p>mysql> select count(*)</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt; where not exists 
-&gt; (
-&gt;   select NULL from sakila.category p where p.category_id = c.category_id
-&gt; );
</code></pre>

<p>+----------+
| count(*) |
+----------+
|       63 |
+----------+
1 row in set (0.01 sec)
```</p>

<p>I can also delete the orphaned rows using the same query approaches. I'll roll the first delete back so I can demonstrate the second query in the same session:</p>

<p>```
mysql> set autocommit = 0;
Query OK, 0 rows affected (0.00 sec)</p>

<p>mysql> delete c.*</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt; left outer join sakila.category p on p.category_id = c.category_id 
-&gt; where p.category_id is null;
</code></pre>

<p>Query OK, 63 rows affected (0.02 sec)</p>

<p>mysql> rollback;
Query OK, 0 rows affected (0.00 sec)</p>

<p>mysql> delete c.*</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt; where not exists (select NULL from sakila.category p where p.category_id = c.category_id);
</code></pre>

<p>Query OK, 63 rows affected (0.01 sec)</p>

<p>mysql> commit;
Query OK, 0 rows affected (0.00 sec)
```</p>

<p>This approach will be very slow for tables containing millions of rows, so in my real world case I didn't use this approach. Instead I decided it would be a lot easier and faster to delete the orphaned rows if I knew who their parent was. To this end I created a new table to track the deleted rows, and populated it using a trigger. Continuing the example in the sakila database:</p>

<p>```
CREATE TABLE category_deleted (
  category_id tinyint(3) unsigned NOT NULL,
  name varchar(25) NOT NULL,
  last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  delete_time timestamp NOT NULL,
  PRIMARY KEY (category_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;</p>

<p>DELIMITER $$</p>

<p>DROP TRIGGER IF EXISTS sakila.TR_A_DEL_CATEGORY $$</p>

<p>CREATE TRIGGER sakila.TR_A_DEL_CATEGORY AFTER DELETE ON sakila.category FOR EACH ROW BEGIN</p>

<p>  INSERT IGNORE INTO sakila.category_deleted (category_id, name, last_update, delete_time)
  VALUES (old.category_id, old.name, old.last_update,now());</p>

<p>END $$</p>

<p>DELIMITER ;
```</p>

<p>Now I can delete another category to test the trigger:</p>

<p>```
mysql> -- delete a single category
mysql> delete from sakila.category</p>

<pre><code>-&gt;     where name = 'Classics';
</code></pre>

<p>Query OK, 1 row affected (0.01 sec)</p>

<p>mysql> -- verify the trigger worked
mysql> select * from sakila.category_deleted;
+-------------+----------+---------------------+---------------------+
| category_id | name     | last_update         | delete_time         |
+-------------+----------+---------------------+---------------------+
|           4 | Classics | 2006-02-15 04:46:27 | 2013-05-21 18:21:53 |
+-------------+----------+---------------------+---------------------+
1 row in set (0.00 sec)</p>

<p>mysql> -- count the orphaned rows using the _deleted table
mysql> select count(*)</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt;     inner join sakila.category_deleted p on p.category_id = c.category_id;   
</code></pre>

<p>+----------+
| count(*) |
+----------+
|       57 |
+----------+
1 row in set (0.00 sec)
```</p>

<p>I also wanted to execute the deletes on the child table in chunks, so I implemented a stored procedure to delete the orphaned rows by iterating through the rows in the <code>_deleted</code> table, deleting the child rows, and then deleting from the <code>_deleted</code> table. If I had to implement it again, I would probably use <a href="http://code.google.com/p/common-schema/">common_schema</a> to chunk the deletes so I wouldn't need the stored procedure.</p>

<p>Here's an implementation using common_schema:</p>

<p>```
-- first delete the orphaned rows from the child table
set @script := "
  split(sakila.film_category: delete sakila.film_category.*</p>

<pre><code>from sakila.film_category 
inner join sakila.category_deleted on sakila.category_deleted.category_id = sakila.film_category.category_id 
</code></pre>

<p>  )
  SELECT $split_total_rowcount AS 'rows deleted so far';
";
call common_schema.run(@script);</p>

<p>-- then delete the rows from the _deleted table (assuming they have no children)
delete p.*
from sakila.category_deleted p
left outer join sakila.film_category c on c.category_id = p.category_id
where c.category_id is null;
```</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79570&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79570&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Wed, 22 May 2013 02:12:00 +0000</pubDate>
    <dc:creator>Ike Walker</dc:creator>
  </item>

  <item>
    <title>Implementing asynchronous cascade delete in MySQL</title>
    <guid isPermaLink="false">http://mechanics.flite.com/blog/2013/05/21/implementing-asynchronous-cascade-delete-in-mysql</guid>
    <link>http://mechanics.flite.com/blog/2013/05/21/implementing-asynchronous-cascade-delete-in-mysql/</link>
    <description>A while back one of my foreign keys started causing trouble. The problem was that some parent rows had tens of thousand of child rows, and the foreign key was defined with CASCADE DELETE enabled. When we deleted one of those parent rows on a master database, it took several seconds to execute the delete because of the cascade. This led to latency for the end user, and also led to replication delays.

The immediate solution was make the application tolerant of orphaned rows in the child table and to drop the explicit foreign key constraint.

I didn't really want to leave those orphaned rows hanging around in the child table, so I decided to implement an asynchronous process to delete the orphaned rows on a scheduled basis. Read on for a description of that process.




Using the sakila database as an example, imagine I drop the foreign key between file_category and category, like so:


alter table sakila.film_category
  drop foreign key fk_film_category_category;


Without the foreign key in place, deletes on the category table lead to orphaned rows in film_category. For example, I will delete the &quot;New&quot; category:

```
mysql&gt; delete from sakila.category

-&amp;gt; where name = 'New';


Query OK, 1 row affected (0.01 sec)
```

There are several ways to count the orphaned rows. Here are two different naive implementations using OUTER JOIN or NOT EXISTS:

```
mysql&gt; select count(*)

-&amp;gt; from sakila.film_category c 
-&amp;gt; left outer join sakila.category p on p.category_id = c.category_id 
-&amp;gt; where p.category_id is null;


+----------+
| count(*) |
+----------+
|       63 |
+----------+
1 row in set (0.00 sec)

mysql&gt; select count(*)

-&amp;gt; from sakila.film_category c 
-&amp;gt; where not exists 
-&amp;gt; (
-&amp;gt;   select NULL from sakila.category p where p.category_id = c.category_id
-&amp;gt; );


+----------+
| count(*) |
+----------+
|       63 |
+----------+
1 row in set (0.01 sec)
```

I can also delete the orphaned rows using the same query approaches. I'll roll the first delete back so I can demonstrate the second query in the same session:

```
mysql&gt; set autocommit = 0;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; delete c.*

-&amp;gt; from sakila.film_category c 
-&amp;gt; left outer join sakila.category p on p.category_id = c.category_id 
-&amp;gt; where p.category_id is null;


Query OK, 63 rows affected (0.02 sec)

mysql&gt; rollback;
Query OK, 0 rows affected (0.00 sec)

mysql&gt; delete c.*

-&amp;gt; from sakila.film_category c 
-&amp;gt; where not exists (select NULL from sakila.category p where p.category_id = c.category_id);


Query OK, 63 rows affected (0.01 sec)

mysql&gt; commit;
Query OK, 0 rows affected (0.00 sec)
```

This approach will be very slow for tables containing millions of rows, so in my real world case I didn't use this approach. Instead I decided it would be a lot easier and faster to delete the orphaned rows if I knew who their parent was. To this end I created a new table to track the deleted rows, and populated it using a trigger. Continuing the example in the sakila database:

```
CREATE TABLE category_deleted (
  category_id tinyint(3) unsigned NOT NULL,
  name varchar(25) NOT NULL,
  last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  delete_time timestamp NOT NULL,
  PRIMARY KEY (category_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DELIMITER $$

DROP TRIGGER IF EXISTS sakila.TR_A_DEL_CATEGORY $$

CREATE TRIGGER sakila.TR_A_DEL_CATEGORY AFTER DELETE ON sakila.category FOR EACH ROW BEGIN

  INSERT IGNORE INTO sakila.category_deleted (category_id, name, last_update, delete_time)
  VALUES (old.category_id, old.name, old.last_update,now());

END $$

DELIMITER ;
```

Now I can delete another category to test the trigger:

```
mysql&gt; -- delete a single category
mysql&gt; delete from sakila.category

-&amp;gt;     where name = 'Classics';


Query OK, 1 row affected (0.01 sec)

mysql&gt; -- verify the trigger worked
mysql&gt; select * from sakila.category_deleted;
+-------------+----------+---------------------+---------------------+
| category_id | name     | last_update         | delete_time         |
+-------------+----------+---------------------+---------------------+
|           4 | Classics | 2006-02-15 04:46:27 | 2013-05-21 18:21:53 |
+-------------+----------+---------------------+---------------------+
1 row in set (0.00 sec)

mysql&gt; -- count the orphaned rows using the _deleted table
mysql&gt; select count(*)

-&amp;gt; from sakila.film_category c 
-&amp;gt;     inner join sakila.category_deleted p on p.category_id = c.category_id;   


+----------+
| count(*) |
+----------+
|       57 |
+----------+
1 row in set (0.00 sec)
```

I also wanted to execute the deletes on the child table in chunks, so I implemented a stored procedure to delete the orphaned rows by iterating through the rows in the _deleted table, deleting the child rows, and then deleting from the _deleted table. If I had to implement it again, I would probably use common_schema to chunk the deletes so I wouldn't need the stored procedure.

Here's an implementation using common_schema:

```
-- first delete the orphaned rows from the child table
set @script := &quot;
  split(sakila.film_category: delete sakila.film_category.*

from sakila.film_category 
inner join sakila.category_deleted on sakila.category_deleted.category_id = sakila.film_category.category_id 


  )
  SELECT $split_total_rowcount AS 'rows deleted so far';
&quot;;
call common_schema.run(@script);

-- then delete the rows from the _deleted table (assuming they have no children)
delete p.*
from sakila.category_deleted p
left outer join sakila.film_category c on c.category_id = p.category_id
where c.category_id is null;
```</description>
    <content:encoded><![CDATA[<p>A while back one of my foreign keys started causing trouble. The problem was that some parent rows had tens of thousand of child rows, and the foreign key was defined with <code>CASCADE DELETE</code> enabled. When we deleted one of those parent rows on a master database, it took several seconds to execute the delete because of the cascade. This led to latency for the end user, and also led to replication delays.</p>

<p>The immediate solution was make the application tolerant of orphaned rows in the child table and to drop the explicit foreign key constraint.</p>

<p>I didn't really want to leave those orphaned rows hanging around in the child table, so I decided to implement an asynchronous process to delete the orphaned rows on a scheduled basis. Read on for a description of that process.</p>

<!-- more -->


<p>Using the <a href="http://dev.mysql.com/doc/sakila/en/sakila-installation.html">sakila database</a> as an example, imagine I drop the foreign key between <code>file_category</code> and <code>category</code>, like so:</p>

<p><code>
alter table sakila.film_category
  drop foreign key fk_film_category_category;
</code></p>

<p>Without the foreign key in place, deletes on the <code>category</code> table lead to orphaned rows in <code>film_category</code>. For example, I will delete the "New" category:</p>

<p>```
mysql> delete from sakila.category</p>

<pre><code>-&gt; where name = 'New';
</code></pre>

<p>Query OK, 1 row affected (0.01 sec)
```</p>

<p>There are several ways to count the orphaned rows. Here are two different naive implementations using <code>OUTER JOIN</code> or <code>NOT EXISTS</code>:</p>

<p>```
mysql> select count(*)</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt; left outer join sakila.category p on p.category_id = c.category_id 
-&gt; where p.category_id is null;
</code></pre>

<p>+----------+
| count(*) |
+----------+
|       63 |
+----------+
1 row in set (0.00 sec)</p>

<p>mysql> select count(*)</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt; where not exists 
-&gt; (
-&gt;   select NULL from sakila.category p where p.category_id = c.category_id
-&gt; );
</code></pre>

<p>+----------+
| count(*) |
+----------+
|       63 |
+----------+
1 row in set (0.01 sec)
```</p>

<p>I can also delete the orphaned rows using the same query approaches. I'll roll the first delete back so I can demonstrate the second query in the same session:</p>

<p>```
mysql> set autocommit = 0;
Query OK, 0 rows affected (0.00 sec)</p>

<p>mysql> delete c.*</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt; left outer join sakila.category p on p.category_id = c.category_id 
-&gt; where p.category_id is null;
</code></pre>

<p>Query OK, 63 rows affected (0.02 sec)</p>

<p>mysql> rollback;
Query OK, 0 rows affected (0.00 sec)</p>

<p>mysql> delete c.*</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt; where not exists (select NULL from sakila.category p where p.category_id = c.category_id);
</code></pre>

<p>Query OK, 63 rows affected (0.01 sec)</p>

<p>mysql> commit;
Query OK, 0 rows affected (0.00 sec)
```</p>

<p>This approach will be very slow for tables containing millions of rows, so in my real world case I didn't use this approach. Instead I decided it would be a lot easier and faster to delete the orphaned rows if I knew who their parent was. To this end I created a new table to track the deleted rows, and populated it using a trigger. Continuing the example in the sakila database:</p>

<p>```
CREATE TABLE category_deleted (
  category_id tinyint(3) unsigned NOT NULL,
  name varchar(25) NOT NULL,
  last_update timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  delete_time timestamp NOT NULL,
  PRIMARY KEY (category_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;</p>

<p>DELIMITER $$</p>

<p>DROP TRIGGER IF EXISTS sakila.TR_A_DEL_CATEGORY $$</p>

<p>CREATE TRIGGER sakila.TR_A_DEL_CATEGORY AFTER DELETE ON sakila.category FOR EACH ROW BEGIN</p>

<p>  INSERT IGNORE INTO sakila.category_deleted (category_id, name, last_update, delete_time)
  VALUES (old.category_id, old.name, old.last_update,now());</p>

<p>END $$</p>

<p>DELIMITER ;
```</p>

<p>Now I can delete another category to test the trigger:</p>

<p>```
mysql> -- delete a single category
mysql> delete from sakila.category</p>

<pre><code>-&gt;     where name = 'Classics';
</code></pre>

<p>Query OK, 1 row affected (0.01 sec)</p>

<p>mysql> -- verify the trigger worked
mysql> select * from sakila.category_deleted;
+-------------+----------+---------------------+---------------------+
| category_id | name     | last_update         | delete_time         |
+-------------+----------+---------------------+---------------------+
|           4 | Classics | 2006-02-15 04:46:27 | 2013-05-21 18:21:53 |
+-------------+----------+---------------------+---------------------+
1 row in set (0.00 sec)</p>

<p>mysql> -- count the orphaned rows using the _deleted table
mysql> select count(*)</p>

<pre><code>-&gt; from sakila.film_category c 
-&gt;     inner join sakila.category_deleted p on p.category_id = c.category_id;   
</code></pre>

<p>+----------+
| count(*) |
+----------+
|       57 |
+----------+
1 row in set (0.00 sec)
```</p>

<p>I also wanted to execute the deletes on the child table in chunks, so I implemented a stored procedure to delete the orphaned rows by iterating through the rows in the <code>_deleted</code> table, deleting the child rows, and then deleting from the <code>_deleted</code> table. If I had to implement it again, I would probably use <a href="http://code.google.com/p/common-schema/">common_schema</a> to chunk the deletes so I wouldn't need the stored procedure.</p>

<p>Here's an implementation using common_schema:</p>

<p>```
-- first delete the orphaned rows from the child table
set @script := "
  split(sakila.film_category: delete sakila.film_category.*</p>

<pre><code>from sakila.film_category 
inner join sakila.category_deleted on sakila.category_deleted.category_id = sakila.film_category.category_id 
</code></pre>

<p>  )
  SELECT $split_total_rowcount AS 'rows deleted so far';
";
call common_schema.run(@script);</p>

<p>-- then delete the rows from the _deleted table (assuming they have no children)
delete p.*
from sakila.category_deleted p
left outer join sakila.film_category c on c.category_id = p.category_id
where c.category_id is null;
```</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79539&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79539&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 21 May 2013 23:12:00 +0000</pubDate>
    <dc:creator>Ike Walker</dc:creator>
  </item>

  <item>
    <title>Shard-Query 2.0 Beta 1 released</title>
    <guid isPermaLink="false">http://shardquery.com/?p=14</guid>
    <link>http://shardquery.com/2013/05/21/shard-query-2-0-beta-1-released/</link>
    <description>It is finally here.  After three years of development, the new version of Shard-Query is finally available for broad testing.
This new version of Shard-Query is vastly improved over previous versions in many ways.  This is in large part due to the fact that the previous version of Shard-Query (version 1.1) entered into production at a large company.  Their feedback during implementation was invaluable in building the new Shard-Query features.   The great thing is that this means that many of the new 2.0 features have already been tested in at least one production environment.
This post is intended to highlight the new features in Shard-Query 2.0.  I will be making posts about individual features as well as posting benchmark results.
Configuration Repository
Shard-Query 1.x stored the configuration in a .ini file.  In an installation with many nodes, keeping the .ini file in sync was difficult.  There was no way to guarantee that all of Shard-Query saw the state of the cluster (in terms of node composition) as an entire unit.  Shard-Query 2.0 solves this problem and makes configuration and bootstrapping of new nodes simpler.  Shard-Query 2.0 stores the configuration inside of a database schema, rather than in a flat file.  Each node is made aware of the configuration repository through the node setup process.  The cluster configuration is then read from the repository each time Shard-Query initializes.
REST interface/GUI
Shard-Query 2.0 features a user interface built using the DooPHP MVC framework.  This interface was graciously contributed by Alex Hurd as part of the implementation I spoke of earlier.  The web interface provides for both query execution and post-installation Shard-Query configuration.
MySQL proxy 0.8.3 interface
Shard-Query now includes a Lua script for MySQL proxy.  This allows applications designed to interact with MySQL to work with Shard-Query transparently.  This is very useful for tools such as Mondrian, Tableau or other tools that are designed for working with and visualizing big data.
DDL and SHOW support
Shard-Query now supports creating and dropping tables and indexes.  The MySQL Proxy interface also supports SHOW commands such as SHOW TABLES and SHOW DATABASES.  Please note that cross-shard operations such as creating and dropping tables requires that all shards be online for the operation.  Failures may result in inconsistency (tables or indexes on some nodes, but not others) so please use with care.  Unfortunately MySQL does not have transactional DDL.
Extended SQL support
Previous versions of Shard-Query only supported limited support for SQL expressions.  Expressions such as ROUND(SUM(expr), 2) did not work.  Nor did SUM(expr)/COUNT(expr).  These issues have been resolved.  Shard-Query now supports nearly all MySQL SELECT syntax.  This includes complex expressions, ORDER BY, LIMIT, HAVING and WITH ROLLUP.  Support for subqueries in the FROM clause has been extended.  UNION and UNION ALL queries are now executed slightly differently as well.  SQL syntax checking is now performed as well, and malformed queries return familiar error messages.
Partitioning based parallelism
Tables partitioned at the MySQL level are now automatically detected and used for intra-query parallelism.  Currently RANGE, LIST, RANGE COLUMNS and LIST COLUMNS partitioning methods are supported for partition parallelism when a single column is used as the partition key. Shard-Query will automatically construct WHERE clauses to examine individual partitions and examine partitions in parallel. The next version of Shard-Query (2.5) will support all types of partitions for any number of partition key columns for MySQL 5.6.10 or greater, through use of the new PARTITION hint.
Improved parallel loading mechanism
The Shard-Query loader was formerly multi-process, but this did not work on Windows.  Now the loader has been split into two parts.  The first is a quick scan operation with identifies individual &amp;#8220;chunks&amp;#8221; of the table to load.  The second phase involves Gearman workers actually loading those chunks.  Currently, the flat file input must be available on all nodes running loader workers via the same path.  This likely means that the files must be placed on shared storage or duplicated on all nodes on which the loader workers run.  This limitation will probably be lifted in the future.
Asynchronous query execution
Shard-Query now supports executing queries asynchronously.  There is a job table which can be used to determine if a background job has completed yet.  See the bin/update_job_table script which actually populates the job table. If you don&amp;#8217;r run (or cron) the script, you won&amp;#8217;t see any jobs completing.  See another example in the GUI (it invokes the job table update code too).  This feature can be used to execute long running queries over large amounts of data.
Multi-shard (range) shard lookups
Queries which access more than one shard key via IN, BETWEEN or OR clauses will now be sent to only the shards which contain the keys in question.  In previous versions range lookups scanned all shards. A bug was also fixed in WHERE clause processing.  WHERE clause expressions such as &amp;#8220;WHERE (the_shard_key IN(1,2,3,4,5))&amp;#8221; were not handled properly due to the enclosing parenthesis, but this has been resolved.
Star Schema Optimization
Star schemata present unique challenges to traditional database optimizers.  By turning on star schema optimization Shard-Query can offer vastly improved query performance for queries which utilize a star schema.  Often an improvement of an order of magnitude or more can be seen when using this option, but it only works forstar schema.
Custom aggregate functions
The parser now supports the addition of custom aggregate functions to the SQL dialect.  A reference function called PERCENTILE(expr, N) is included.  Custom non-aggregate functions are not yet supported.
   </description>
    <content:encoded><![CDATA[<p>It is <a href="https://code.google.com/p/shard-query/downloads/list">finally here</a>.  After three years of development, the new version of <a href="http://code.google.com/p/shard-query/">Shard-Query</a> is finally available for broad testing.</p>
<p>This new version of Shard-Query is vastly improved over previous versions in many ways.  This is in large part due to the fact that the previous version of Shard-Query (version 1.1) entered into production at a large company.  Their feedback during implementation was invaluable in building the new Shard-Query features.   The great thing is that this means that many of the new 2.0 features have already been tested in at least one production environment.</p>
<p>This post is intended to highlight the new features in Shard-Query 2.0.  I will be making posts about individual features as well as posting benchmark results.</p>
<p><strong>Configuration Repository<br />
</strong>Shard-Query 1.x stored the configuration in a .ini file.  In an installation with many nodes, keeping the .ini file in sync was difficult.  There was no way to guarantee that all of Shard-Query saw the state of the cluster (in terms of node composition) as an entire unit.  Shard-Query 2.0 solves this problem and makes configuration and bootstrapping of new nodes simpler.  Shard-Query 2.0 stores the configuration inside of a database schema, rather than in a flat file.  Each node is made aware of the configuration repository through the node setup process.  The cluster configuration is then read from the repository each time Shard-Query initializes.<span></span></p>
<p><strong>REST interface/GUI<br />
</strong>Shard-Query 2.0 features a user interface built using the DooPHP MVC framework.  This interface was graciously contributed by Alex Hurd as part of the implementation I spoke of earlier.  The web interface provides for both query execution and post-installation Shard-Query configuration.</p>
<p><strong>MySQL proxy 0.8.3 interface<br />
</strong>Shard-Query now includes a Lua script for MySQL proxy.  This allows applications designed to interact with MySQL to work with Shard-Query transparently.  This is very useful for tools such as Mondrian, Tableau or other tools that are designed for working with and visualizing big data.</p>
<p><strong>DDL and SHOW support<br />
</strong>Shard-Query now supports creating and dropping tables and indexes.  The MySQL Proxy interface also supports SHOW commands such as SHOW TABLES and SHOW DATABASES.  Please note that cross-shard operations such as creating and dropping tables requires that all shards be online for the operation.  Failures may result in inconsistency (tables or indexes on some nodes, but not others) so please use with care.  Unfortunately MySQL does not have transactional DDL.</p>
<p><strong>Extended SQL support<br />
</strong>Previous versions of Shard-Query only supported limited support for SQL expressions.  Expressions such as ROUND(SUM(expr), 2) did not work.  Nor did SUM(expr)/COUNT(expr).  These issues have been resolved.  Shard-Query now supports nearly all MySQL SELECT syntax.  This includes complex expressions, ORDER BY, LIMIT, HAVING and WITH ROLLUP.  Support for subqueries in the FROM clause has been extended.  UNION and UNION ALL queries are now executed slightly differently as well.  SQL syntax checking is now performed as well, and malformed queries return familiar error messages.</p>
<p><strong>Partitioning based parallelism</strong><br />
Tables partitioned at the MySQL level are now automatically detected and used for intra-query parallelism.  Currently RANGE, LIST, RANGE COLUMNS and LIST COLUMNS partitioning methods are supported for partition parallelism <em>when a single column is used as the partition key</em>. Shard-Query will automatically construct WHERE clauses to examine individual partitions and examine partitions in parallel. The next version of Shard-Query (2.5) will support all types of partitions for any number of partition key columns for MySQL 5.6.10 or greater, through use of the new PARTITION hint.</p>
<p><strong>Improved parallel loading mechanism</strong><br />
The Shard-Query loader was formerly multi-process, but this did not work on Windows.  Now the loader has been split into two parts.  The first is a quick scan operation with identifies individual &#8220;chunks&#8221; of the table to load.  The second phase involves Gearman workers actually loading those chunks.  Currently, the flat file input must be available on all nodes running loader workers <em>via the same path</em>.  This likely means that the files must be placed on shared storage or duplicated on all nodes on which the loader workers run.  This limitation will probably be lifted in the future.</p>
<p><strong>Asynchronous query execution<br />
</strong>Shard-Query now supports executing queries asynchronously.  There is a job table which can be used to determine if a background job has completed yet.  See the bin/update_job_table script <span>which actually populates the job table</span>. If you don&#8217;r run (or cron) the script, you won&#8217;t see any jobs completing.  See another example in the GUI (it invokes the job table update code too).  This feature can be used to execute long running queries over large amounts of data.</p>
<p><strong>Multi-shard (range) shard lookups<br />
</strong>Queries which access more than one shard key via IN, BETWEEN or OR clauses will now be sent to only the shards which contain the keys in question.  In previous versions range lookups scanned all shards. A bug was also fixed in WHERE clause processing.  WHERE clause expressions such as &#8220;WHERE (the_shard_key IN(1,2,3,4,5))&#8221; were not handled properly due to the enclosing parenthesis, but this has been resolved.</p>
<p><strong>Star Schema Optimization<br />
</strong>Star schemata present unique challenges to traditional database optimizers.  By turning on star schema optimization Shard-Query can offer vastly improved query performance for queries which utilize a star schema.  Often an improvement of an order of magnitude or more can be seen when using this option, but it only works forstar schema.</p>
<p><strong>Custom aggregate functions<br />
</strong>The parser now supports the addition of custom aggregate functions to the SQL dialect.  A reference function called PERCENTILE(expr, N) is included.  Custom non-aggregate functions are not yet supported.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shardquery.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shardquery.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shardquery.com&amp;blog=52522344&amp;post=14&amp;subd=shardquery&amp;ref=&amp;feed=1" width="1" height="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79537&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79537&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 21 May 2013 20:11:20 +0000</pubDate>
    <dc:creator>Justin Swanhart</dc:creator>
    <category>Announcements</category>
    <category>introduction</category>
    <category>mysql</category>
    <category>optimizer</category>
    <category>parallelism</category>
    <category>release</category>
    <category>repository</category>
    <category>shard-query</category>
  </item>

  <item>
    <title>PHPTek</title>
    <guid isPermaLink="false">http://opensourcedba.wordpress.com/?p=1341</guid>
    <link>http://opensourcedba.wordpress.com/2013/05/21/phptek/</link>
    <description>The PHPTek Conference bills itself as the premier professional PHP conference with a community flair.  Having been to dozens of PHP conferences, I thought that was a pretty bold claim. MySQL Boogiebot But as they say in Texas, it ain&amp;#8217;t bragging if you can do it.  MySQL plush dolphins and BoogieBots.  The wind up dancing robots were popular in Chicago  And the organizers picked perfect weather for this Chicago based show.  
The quality of the presenters and presentations was amazing high. Most of these sessions covered intricacies with the PHP language. The talks covered the range from beginning Symfony 2 to advanced security. The presenters were indeed the cream of the crop and the material covered very well developed.
Oracle&amp;#8217;s own Ligaya Trumelle started the second day with a MySQL 5.6 new features session specifically tailored to what this elite audience wanted to know about 5.6.   Later she teamed with Davey Shafik on Engine Yard on MySQL HA, Recovery, and Load Balancing.   The second talks was a comprehensive look at the most popular options for all three areas1.
Oracle was a sponsor of this show and I also had an opportunity to present Ten Things To Do To Make Your MySQL Databases Stronger and Healthier when not at the booth handing out three hundred Boogie Bots, MySQL Stickers,  and a handful of plush Sakila Dolphins.  The attendee questions at the booth were also high level (isolation levels for the best insert concurrency, how to use GTIDs,  and  partitioning) as opposed to more mundane questions at other shows.  
So this truly is the premier PHP show and if you are a serious PHP coder, you need to plan to attend this show next year.

 You should download their slides on this as they worked hard to provide good benchmark numbers.  Sadly some of the software (third party) did not prove to be robust enough for a good comparison.  Lig and Davey put a lot of hard work into this sessions and the slides were loaded with vital info and their configurations.


   </description>
    <content:encoded><![CDATA[<p>The <a href="http://tek.phparch.com/" target="_blank">PHPTek</a> Conference bills itself as the premier professional PHP conference with a community flair.  Having been to dozens of PHP conferences, I thought that was a pretty bold claim. <div><img src="http://p.twimg.com/A8-I4cpCEAAo_B3.jpg%3Athumb" width="150" height="150" class="class" /><p>MySQL Boogiebot</p></div> But as they say in Texas, <em>it ain&#8217;t bragging if you can do it</em>.  <div><a href="http://opensourcedba.files.wordpress.com/2013/05/phptek.jpg"><img src="http://opensourcedba.files.wordpress.com/2013/05/phptek.jpg?w=217&amp;h=300" alt="MySQL plush dolphins and BoogieBots.  The wind up dancing robots were popular in Chicago" width="217" height="300" class="size-medium wp-image-1342" /></a><p>MySQL plush dolphins and BoogieBots.  The wind up dancing robots were popular in Chicago</p></div>  And the organizers picked perfect weather for this Chicago based show.  </p>
<p>The quality of the presenters and presentations was amazing high. Most of these sessions covered intricacies with the PHP language. The talks covered the range from beginning Symfony 2 to advanced security. The presenters were indeed the cream of the crop and the material covered very well developed.</p>
<p>Oracle&#8217;s own Ligaya Trumelle started the second day with a MySQL 5.6 new features session specifically tailored to what this elite audience wanted to know about 5.6.   Later she teamed with Davey Shafik on Engine Yard on MySQL HA, Recovery, and Load Balancing.   The second talks was a comprehensive look at the most popular options for all three areas<sup>1</sup>.</p>
<p>Oracle was a sponsor of this show and I also had an opportunity to present <strong>Ten Things To Do To Make Your MySQL Databases Stronger and Healthier</strong> when not at the booth handing out three hundred Boogie Bots, MySQL Stickers,  and a handful of plush Sakila Dolphins.  The attendee questions at the booth were also high level (isolation levels for the best insert concurrency, how to use GTIDs,  and  partitioning) as opposed to more mundane questions at other shows.  </p>
<p>So this truly is the premier PHP show and if you are a serious PHP coder, you need to plan to attend this show next year.</p>
<ol>
<li> You should download their slides on this as they worked hard to provide good benchmark numbers.  Sadly some of the software (third party) did not prove to be robust enough for a good comparison.  Lig and Davey put a lot of hard work into this sessions and the slides were loaded with vital info and their configurations.
</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/opensourcedba.wordpress.com/1341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/opensourcedba.wordpress.com/1341/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=opensourcedba.wordpress.com&amp;blog=15386988&amp;post=1341&amp;subd=opensourcedba&amp;ref=&amp;feed=1" width="1" height="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79536&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79536&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 21 May 2013 18:08:01 +0000</pubDate>
    <dc:creator>Dave Stokes</dc:creator>
    <category>community team</category>
    <category>PHP</category>
  </item>

  <item>
    <title>Replication in MySQL 5.6: GTIDs benefits and limitations – Part 1</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15514</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/21/replication-in-mysql-5-6-gtids-benefits-and-limitations-part-1/</link>
    <description>Global Transactions Identifiers are one of the new features regarding replication in MySQL 5.6. They open up a lot of opportunities to make the life of DBAs much easier when having to maintain servers under a specific replication topology. However you should keep in mind some limitations of the current implementation. This post is the first one of a series of articles focused on the implications of enabling GTIDs on a production setup.The manual describes very nicely how to switch to GTID-based replication, I won&amp;#8217;t repeat it.Basically the steps are:Make the master read-only so that the slaves can execute all events and be in sync with the masterChange configuration for all servers and restart themUse CHANGE MASTER TO to instruct all servers to use GTIDsDisable read-only modeThis procedure will switch all your servers from regular replication to GTID replication. But if you are running a production system, you will probably want to gradually enable GTID replication for an easier rollback in the event of a problem. And some items in the documentation are not so clear.For instance:Do we really need to restart all the servers at the same time? Downtime is something we like to avoid!Is it necessary to make the master read-only?Can we use regular replication for some slaves and GTID replication for other slaves at the same time?To find an answer to these questions, let&amp;#8217;s create a simple replication configuration with one master and two slaves, all running MySQL 5.6 with GTIDs disabled.First try: configure only one of the servers with GTIDsLet&amp;#8217;s stop slave #2, change configuration and restart it:mysql&amp;gt; show slave status\G
[...]
Slave_IO_Running: No
Slave_SQL_Running: Yes
          [...]The error log tells us why the IO thread has not started:2013-05-17 13:21:26 3130 [ERROR] Slave I/O: The slave IO thread stops because the master has GTID_MODE OFF and this server has GTID_MODE ON, Error_code: 1593So unfortunately if you want replication to work correctly, gtid_mode must be ON on all servers or OFF on all servers, but not something in the middle.What if we try to reconfigure the master? This time, replication on slave #1 will stop:2013-05-17 13:32:08 2563 [ERROR] Slave I/O: The slave IO thread stops because the master has GTID_MODE ON and this server has GTID_MODE OFF, Error_code: 1593These simple tests answer the first two questions: replication works only if all servers have the same value for gtid_mode, so you should restart them at the same time, which is best done by making the master read-only. However, &amp;#8220;at the same time&amp;#8221; means &amp;#8220;at the same binlog position&amp;#8221;, so you can perfectly restart the servers one by one.Second try: GTIDs enabled, mixing regular replication and GTID replicationThis time, we will enable GTID replication on slave #1, but not on slave #2:# slave #1
mysql&amp;gt; change master to master_auto_position = 1;
mysql&amp;gt; start slave;and let&amp;#8217;s create a new table on the master:mysql&amp;gt; create table test.t (id int not null auto_increment primary key);Executing SHOW TABLES FROM test on both slaves shows that the table has been created everywhere. So once GTIDs are enabled on all servers, you can have some slaves using file-based positioning and some other slaves using GTID-based positioning.This answers the second question: we can have different replication modes on different servers, but only if all servers have gtid_mode set to ON. Could it be interesting to run file-based replication when gtid_mode is ON? I can&amp;#8217;t think of any use case, so in practice, you&amp;#8217;ll probably use either file-based replication only (gtid_mode=off for all servers) or GTID-based replication only (gtid_mode=on for all servers).Additional question: how can you know if a slave is using GTID-based replication by inspecting the output of SHOW SLAVE STATUS? Look at the last field, Auto_Position:# Slave #1
mysql&amp;gt; show slave status\G
[...]
Auto_Position: 1  -&amp;gt; GTID-based positioning
# Slave #2
mysql&amp;gt; show slave status\G
[...]
Auto_Position: 0  -&amp;gt; File-based positioningConclusionEnabling GTID-based replication can be tricky if your application does not easily tolerate downtime or read-only mode, especially if you have a lot of servers to reconfigure. It would be really nice to be able to mix servers where gtid_mode is ON with servers where gtid_mode is OFF. This would greatly simplify the transition to GTID-based replication and allow easier rollbacks if something goes wrong.The post Replication in MySQL 5.6: GTIDs benefits and limitations &amp;#8211; Part 1 appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/data_replication2.jpg"><img class="alignleft  wp-image-15554" style="margin-left: 9px; margin-right: 9px;" alt="GTID-based replication" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/data_replication2-300x204.jpg" width="270" height="184" /></a>Global Transactions Identifiers are one of the new features regarding replication in MySQL 5.6. They open up a lot of opportunities to make the life of DBAs much easier when having to maintain servers under a specific replication topology. However you should keep in mind some limitations of the current implementation. This post is the first one of a series of articles focused on the implications of enabling GTIDs on a production setup.</p><p>The <a href="http://dev.mysql.com/doc/refman/5.6/en/replication-gtids-howto.html" target="_blank">manual</a> describes very nicely how to switch to GTID-based replication, I won&#8217;t repeat it.</p><p>Basically the steps are:</p><ul><li>Make the master read-only so that the slaves can execute all events and be in sync with the master</li><li>Change configuration for all servers and restart them</li><li>Use <code>CHANGE MASTER TO</code> to instruct all servers to use GTIDs</li><li>Disable read-only mode</li></ul><p>This procedure will switch all your servers from regular replication to GTID replication. But if you are running a production system, you will probably want to gradually enable GTID replication for an easier rollback in the event of a problem. And some items in the documentation are not so clear.</p><p>For instance:</p><ul><li>Do we really need to restart all the servers at the same time? Downtime is something we like to avoid!</li><li>Is it necessary to make the master read-only?</li><li>Can we use regular replication for some slaves and GTID replication for other slaves at the same time?</li></ul><p>To find an answer to these questions, let&#8217;s create a simple replication configuration with one master and two slaves, all running MySQL 5.6 with GTIDs disabled.</p><h2>First try: configure only one of the servers with GTIDs</h2><p>Let&#8217;s stop slave #2, change configuration and restart it:</p><pre>mysql&gt; show slave status\G
[...]
Slave_IO_Running: No
Slave_SQL_Running: Yes
          [...]</pre><p>The error log tells us why the IO thread has not started:</p><pre>2013-05-17 13:21:26 3130 [ERROR] Slave I/O: The slave IO thread stops because the master has GTID_MODE OFF and this server has GTID_MODE ON, Error_code: 1593</pre><p>So unfortunately if you want replication to work correctly, gtid_mode must be ON on all servers or OFF on all servers, but not something in the middle.</p><p>What if we try to reconfigure the master? This time, replication on slave #1 will stop:</p><pre>2013-05-17 13:32:08 2563 [ERROR] Slave I/O: The slave IO thread stops because the master has GTID_MODE ON and this server has GTID_MODE OFF, Error_code: 1593</pre><p>These simple tests answer the first two questions: replication works only if all servers have the same value for gtid_mode, so you should restart them at the same time, which is best done by making the master read-only. However, &#8220;at the same time&#8221; means &#8220;at the same binlog position&#8221;, so you can perfectly restart the servers one by one.</p><h2>Second try: GTIDs enabled, mixing regular replication and GTID replication</h2><p>This time, we will enable GTID replication on slave #1, but not on slave #2:</p><pre># slave #1
mysql&gt; change master to master_auto_position = 1;
mysql&gt; start slave;</pre><p>and let&#8217;s create a new table on the master:</p><pre>mysql&gt; create table test.t (id int not null auto_increment primary key);</pre><p>Executing <code>SHOW TABLES FROM test</code> on both slaves shows that the table has been created everywhere. So once GTIDs are enabled on all servers, you can have some slaves using file-based positioning and some other slaves using GTID-based positioning.</p><p>This answers the second question: we can have different replication modes on different servers, but only if all servers have gtid_mode set to ON. Could it be interesting to run file-based replication when gtid_mode is ON? I can&#8217;t think of any use case, so in practice, you&#8217;ll probably use either file-based replication only (gtid_mode=off for all servers) or GTID-based replication only (gtid_mode=on for all servers).</p><p>Additional question: how can you know if a slave is using GTID-based replication by inspecting the output of <code>SHOW SLAVE STATUS</code>? Look at the last field, <code>Auto_Position</code>:</p><pre># Slave #1
mysql&gt; show slave status\G
[...]
Auto_Position: 1  -&gt; GTID-based positioning
# Slave #2
mysql&gt; show slave status\G
[...]
Auto_Position: 0  -&gt; File-based positioning</pre><p></p><h2>Conclusion</h2><p>Enabling GTID-based replication can be tricky if your application does not easily tolerate downtime or read-only mode, especially if you have a lot of servers to reconfigure. It would be really nice to be able to mix servers where gtid_mode is ON with servers where gtid_mode is OFF. This would greatly simplify the transition to GTID-based replication and allow easier rollbacks if something goes wrong.</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/21/replication-in-mysql-5-6-gtids-benefits-and-limitations-part-1/">Replication in MySQL 5.6: GTIDs benefits and limitations &#8211; Part 1</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79535&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79535&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Tue, 21 May 2013 10:00:42 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>MySQL</category>
    <category>GTID</category>
    <category>MySQL 5.6</category>
    <category>Replication</category>
  </item>

  <item>
    <title>MyISAM's &amp;quot;table lock&amp;quot; problem, and how InnoDB solves it</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-87087949336034516.post-8074703824119176378</guid>
    <link>http://www.stevemeyers.net/2013/05/myisams-table-lock-problem-and-how.html</link>
    <description>Most serious users of MySQL have moved their tables to InnoDB years ago.  For those who haven't, let's discuss why InnoDB is a more scalable solution than MyISAM.

MyISAM was designed to be very fast for read queries.  It does not handle higher loads of writes very well.  It also suffers a more serious flaw: it isn't crash-safe.  In other words, you better have frequent backups.

MyISAM tables</description>
    <content:encoded><![CDATA[Most serious users of MySQL have moved their tables to InnoDB years ago.  For those who haven't, let's discuss why InnoDB is a more scalable solution than MyISAM.

MyISAM was designed to be very fast for read queries.  It does not handle higher loads of writes very well.  It also suffers a more serious flaw: it isn't crash-safe.  In other words, you better have frequent backups.

MyISAM tables<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79534&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79534&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 21:54:00 +0000</pubDate>
    <dc:creator>Steve Meyers</dc:creator>
  </item>

  <item>
    <title>Why I do what I do?</title>
    <guid isPermaLink="false">http://www.mysqlplus.net/?p=1513</guid>
    <link>http://feedproxy.google.com/~r/mysqlplusrss/~3/sfoYxQt18lI/</link>
    <description>I was sincerely affected by this last MySQL post and this other very long post from Jeremy Cole.
Yes, these two guys are MySQL rock stars and they are really impressives, their involvement in the MySQL community is utter!
I don&amp;#8217;t want to write a long long speech about my simple life&amp;#8230;
I just want to clarify why I do what I do.
Many people have asked or wondered without asking why I do what I do
(Jeremy Cole - 2013)
A few years ago Ashley Unitt asked me what I was most proud of, and now, I can make a complete answer. I&amp;#8217;m very proud to take part of a community, MySQL has transformed my job into a passion and an incredible desire to share this passion, as honestly as possible.
What does it mean in real life?
If I can help in decision making or take part of a discussion, without any bad motivations, independently, I do it!
If the opportunity arises to have a good time over a glass of rosé and discussing open source with Stéphane Varoqui, I do it!
If I have suddenly an idea and a friend with me for several nights and weekends to achieve it, oh yes, I do it!
I do it because it&amp;#8217;s terribly exciting and fun, even if I&amp;#8217;ve just did it for myself&amp;#8230; on a whim.
Yes, I&amp;#8217;m very proud when we made MYXPLAIN.net with Max, I&amp;#8217;m proud to work for an amazing company, I&amp;#8217;m proud to advise someone who challenge me from the other side of the world, I&amp;#8217;m proud to read an email from Rick James in my inbox&amp;#8230;
I&amp;#8217;m proud to be honest!

   
</description>
    <content:encoded><![CDATA[<p>I was sincerely affected by <a href="http://openlife.cc/blogs/2013/may/5-years-mysql" target="_blank">this last MySQL post </a>and this other very long post from <a href="http://blog.jcole.us/2013/04/25/mysql-community-contributor-of-the-year-2013/" target="_blank">Jeremy Cole</a>.<br />
Yes, these two guys are MySQL rock stars and they are really impressives, their involvement in the MySQL community is utter!</p>
<p>I don&#8217;t want to write a long long speech about my simple life&#8230;<br />
I just want to clarify why I do what I do.</p>
<pre>Many people have asked or wondered without asking <em>why</em> I do what I do
(Jeremy Cole - 2013)</pre>
<p>A few years ago Ashley Unitt asked me what I was most proud of, and now, I can make a complete answer. I&#8217;m very proud to take part of a community, MySQL has transformed my job into a passion and an incredible desire to share this passion, as honestly as possible.</p>
<p>What does it mean in real life?</p>
<p>If I can help in decision making or take part of a discussion, without any bad motivations, independently, I do it!</p>
<p>If the opportunity arises to have a good time over a glass of <em>rosé</em> and discussing open source with Stéphane Varoqui, I do it!</p>
<p>If I have suddenly an idea and a friend with me for several nights and weekends to achieve it, oh yes, I do it!</p>
<p>I do it because it&#8217;s terribly exciting and fun, even if I&#8217;ve just did it for myself&#8230; on a whim.</p>
<p>Yes, I&#8217;m very proud when we made <a href="http://www.myxplain.net" target="_blank">MYXPLAIN.net</a> with Max, I&#8217;m proud to work for an amazing company, I&#8217;m proud to advise someone who challenge me from the other side of the world, I&#8217;m proud to read an email from Rick James in my inbox&#8230;</p>
<p>I&#8217;m proud to be honest!</p>
<div>
<a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=sfoYxQt18lI:scUtanG8Sfk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=sfoYxQt18lI:scUtanG8Sfk:-BTjWOF_DHI"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?i=sfoYxQt18lI:scUtanG8Sfk:-BTjWOF_DHI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=sfoYxQt18lI:scUtanG8Sfk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?i=sfoYxQt18lI:scUtanG8Sfk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/mysqlplusrss?a=sfoYxQt18lI:scUtanG8Sfk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/mysqlplusrss?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/mysqlplusrss/~4/sfoYxQt18lI" height="1" width="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79533&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79533&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 20:46:37 +0000</pubDate>
    <dc:creator>Cedric PEINTRE</dc:creator>
    <category>Admin</category>
  </item>

  <item>
    <title>Get the Best from Web, Cloud, and Embedded Applications as a MySQL DBA</title>
    <guid isPermaLink="false">https://blogs.oracle.com/MySQL/entry/get_the_best_from_web</guid>
    <link>https://blogs.oracle.com/MySQL/entry/get_the_best_from_web</link>
    <description>After taking this MySQL for Database Administrators course, you will be equipped to use all the features of MySQL to get the best out of your Web, Cloud, and embedded applications, whether you work with the command line or graphical tools such as MySQL Workbench and MySQL Enterprise Monitor, whether your application uses complex queries or the NoSQL API, and whether your preferred challenge is replicated servers or highly-tuned transactional systems.
  You can take this 5-day live instructor-led course as a:
  
    Live-Virtual Event: Take this course from your own desk, no travel required. You can choose from a wide selection of events on the schedule to suit different timezones. 
    In-Class Event: Travel to an education center to attend this class. Below is a selection of events already on the schedule. 
  
  
    
      
        
          
            &amp;nbsp;Location
          
          
            &amp;nbsp;Date
          
          
            &amp;nbsp;Delivery Language
          
        
        
          
            &amp;nbsp;Brussels, Belgium
          
          
            &amp;nbsp;3 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;London, England
          
          
            &amp;nbsp;9 September 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Aix-en-Provence, France
          
          
            &amp;nbsp;2 December 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Bordeaux, France
          
          
            &amp;nbsp;2 December 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Nice, France
          
          
            &amp;nbsp;4 November 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Puteaux, France
          
          
            &amp;nbsp;16 September 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Strasbourg, France
          
          
            &amp;nbsp;1 July 2013
          
          
            &amp;nbsp;French
          
        
        
          
            &amp;nbsp;Dresden, Germany
          
          
            &amp;nbsp;3 June 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Dusseldorf, Germany
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Gummersbach, Germany
          
          
            &amp;nbsp;1 July 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Hamburg, Germany
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Munchen, Germany
          
          
            &amp;nbsp;19 August 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Munster, Germany
          
          
            &amp;nbsp;9 September 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Stuttgart, Germany
          
          
            &amp;nbsp;8 July 2013
          
          
            &amp;nbsp;German
          
        
        
          
            &amp;nbsp;Budapest, Hungary
          
          
            &amp;nbsp;4 November&amp;nbsp;2013
          
          
            &amp;nbsp;Hungarian
          
        
        
          
            &amp;nbsp;Belfast, Ireland
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Milan, Italy
          
          
            &amp;nbsp;7 October 2013
          
          
            &amp;nbsp;Italian
          
        
        
          
            &amp;nbsp;Rome, Italy
          
          
            &amp;nbsp;17 June 2013
          
          
            &amp;nbsp;Italian
          
        
        
          
            &amp;nbsp;Utrecht, Netherlands
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;Dutch
          
        
        
          
            &amp;nbsp;Warsaw, Poland
          
          
            &amp;nbsp;5 August 2013
          
          
            &amp;nbsp;Polish
          
        
        
          
            &amp;nbsp;Lisbon, Portugal
          
          
            &amp;nbsp;16 September 2013
          
          
            &amp;nbsp;European Portugese
          
        
        
          
            &amp;nbsp;Cairo, Egypt
          
          
            &amp;nbsp;30 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Nairobi, Kenya
          
          
            &amp;nbsp;22 July 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Jakarta, Indonesia
          
          
            &amp;nbsp;16 September 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Petaling Jaya, Malaysia
          
          
            &amp;nbsp;1 July 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Makati City, Philippines
          
          
            &amp;nbsp;3 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Melbourne, Australia
          
          
            &amp;nbsp;3 June 2013
          
          
            &amp;nbsp;English
          
        
        
          
            &amp;nbsp;Curitiba, Brazil
          
          
            &amp;nbsp;27 May 2013
          
          
            &amp;nbsp;Brazilian Portugese
          
        
        
          
            &amp;nbsp;Sao Paolo, Brazil
          
          
            &amp;nbsp;10 June 2013
          
          
            &amp;nbsp;Brazilian Portugese
          
        
        
          
            &amp;nbsp;Mexico City, Mexico
          
          
            &amp;nbsp;24 June 2013
          
          
            &amp;nbsp;Spanish
          
        
      
    
  
  To register for this course or to learn more about the courses on the authentic MySQL curriculum, go to http://oracle.com/education/MySQL.</description>
    <content:encoded><![CDATA[<p>After taking this <a title="3" href="http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=609&amp;lang=US&amp;get_params=dc:D61762GC20,p_preview:N&amp;intcmp=WWOU12014584MPP004C024">MySQL for Database Administrators course</a>, you will be equipped to use all the features of MySQL to get the best out of your Web, Cloud, and embedded applications, whether you work with the command line or graphical tools such as MySQL Workbench and MySQL Enterprise Monitor, whether your application uses complex queries or the NoSQL API, and whether your preferred challenge is replicated servers or highly-tuned transactional systems.</p>
  <p>You can take this 5-day live instructor-led course as a:</p>
  <ul>
    <li>Live-Virtual Event: Take this course from your own desk, no travel required. You can choose from a wide selection of events on the schedule to suit different timezones. </li>
    <li>In-Class Event: Travel to an education center to attend this class. Below is a selection of events already on the schedule. </li>
  </ul>
  <p>
    <table border="1" cellspacing="1" cellpadding="1">
      <tbody>
        <tr>
          <td>
            <p align="center"><strong>&nbsp;Location</strong></p>
          </td>
          <td>
            <p align="center"><strong>&nbsp;Date</strong></p>
          </td>
          <td>
            <p align="center"><strong>&nbsp;Delivery Language</strong></p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Brussels, Belgium</p>
          </td>
          <td>
            <p align="center">&nbsp;3 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;London, England</p>
          </td>
          <td>
            <p align="center">&nbsp;9 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Aix-en-Provence, France</p>
          </td>
          <td>
            <p align="center">&nbsp;2 December 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Bordeaux, France</p>
          </td>
          <td>
            <p align="center">&nbsp;2 December 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Nice, France</p>
          </td>
          <td>
            <p align="center">&nbsp;4 November 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Puteaux, France</p>
          </td>
          <td>
            <p align="center">&nbsp;16 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Strasbourg, France</p>
          </td>
          <td>
            <p align="center">&nbsp;1 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;French</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Dresden, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;3 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Dusseldorf, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Gummersbach, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;1 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Hamburg, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Munchen, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;19 August 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Munster, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;9 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Stuttgart, Germany</p>
          </td>
          <td>
            <p align="center">&nbsp;8 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;German</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Budapest, Hungary</p>
          </td>
          <td>
            <p align="center">&nbsp;4 November&nbsp;2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Hungarian</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Belfast, Ireland</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Milan, Italy</p>
          </td>
          <td>
            <p align="center">&nbsp;7 October 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Italian</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Rome, Italy</p>
          </td>
          <td>
            <p align="center">&nbsp;17 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Italian</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Utrecht, Netherlands</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Dutch</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Warsaw, Poland</p>
          </td>
          <td>
            <p align="center">&nbsp;5 August 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Polish</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Lisbon, Portugal</p>
          </td>
          <td>
            <p align="center">&nbsp;16 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;European Portugese</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Cairo, Egypt</p>
          </td>
          <td>
            <p align="center">&nbsp;30 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Nairobi, Kenya</p>
          </td>
          <td>
            <p align="center">&nbsp;22 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Jakarta, Indonesia</p>
          </td>
          <td>
            <p align="center">&nbsp;16 September 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Petaling Jaya, Malaysia</p>
          </td>
          <td>
            <p align="center">&nbsp;1 July 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Makati City, Philippines</p>
          </td>
          <td>
            <p align="center">&nbsp;3 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Melbourne, Australia</p>
          </td>
          <td>
            <p align="center">&nbsp;3 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;English</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Curitiba, Brazil</p>
          </td>
          <td>
            <p align="center">&nbsp;27 May 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Brazilian Portugese</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Sao Paolo, Brazil</p>
          </td>
          <td>
            <p align="center">&nbsp;10 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Brazilian Portugese</p>
          </td>
        </tr>
        <tr>
          <td>
            <p align="center">&nbsp;Mexico City, Mexico</p>
          </td>
          <td>
            <p align="center">&nbsp;24 June 2013</p>
          </td>
          <td>
            <p align="center">&nbsp;Spanish</p>
          </td>
        </tr>
      </tbody>
    </table>
  </p>
  <p>To register for this course or to learn more about the courses on the authentic MySQL curriculum, go to <a href="http://oracle.com/education/MySQL">http://oracle.com/education/MySQL</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79532&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79532&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 20:03:01 +0000</pubDate>
    <dc:creator>Oracle MySQL Group</dc:creator>
    <category>MySQL Training</category>
    <category>dba</category>
    <category>mysql</category>
    <category>oracle</category>
    <category>training</category>
  </item>

  <item>
    <title>More details on &amp;quot;MySQL 5.6 Experiences&amp;quot; coming soon...</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-3080615211468083537.post-1511826766907652752</guid>
    <link>http://mysqlentomologist.blogspot.com/2013/05/more-details-on-mysql-56-experiences.html</link>
    <description>I've already shared my presentation few hours before I made it during PLMCE 2013, back on April 24. Let's just have it here for the reference: http://www.slideshare.net/ValeriyKravchuk/mysql-56experiencesbugssolutions50mins.During the upcoming weeks I plan to explain every slide in more details (as 50 minutes were not enough for this) here and check status of all the active bugs mentioned in it. I'll also check new bugs for each major feature mentioned (if any). So, stay tuned...</description>
    <content:encoded><![CDATA[I've already shared my <a href="http://www.slideshare.net/ValeriyKravchuk/mysql-56experiencesbugssolutions50mins" target="_blank">presentation</a> few hours before I made it during <a href="http://www.percona.com/live/mysql-conference-2013/home" target="_blank">PLMCE 2013</a>, back on April 24. Let's just have it here for the reference: http://www.slideshare.net/ValeriyKravchuk/mysql-56experiencesbugssolutions50mins.<br /><br />During the upcoming weeks I plan to explain every slide in more details (as 50 minutes were not enough for this) here and check status of all the active bugs mentioned in it. I'll also check new bugs for each major feature mentioned (if any). So, stay tuned...<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79531&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79531&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 18:12:01 +0000</pubDate>
    <dc:creator>Valeriy Kravchuk</dc:creator>
    <category>bugs</category>
    <category>mysql</category>
    <category>5.6 GA</category>
    <category>presentation</category>
  </item>

  <item>
    <title>Webinar: SQL Query Patterns, Optimized</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15532</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/20/webinar-sql-query-patterns-optimized/</link>
    <description>Next Friday, May 31 at 10 a.m. Pacific, I&amp;#8217;ll present Percona&amp;#8217;s next webinar, &amp;#8220;SQL Query Patterns, Optimized.&amp;#8221;Based on my experiences solving tough SQL problems for Percona training and consulting, I&amp;#8217;ll classify several common types of queries with which developers struggle. I&amp;#8217;ll test several SQL solutions for each type of query objective, and show how you can use MySQL 5.6 built-in methods to analyze them for optimal query efficiency.  The discussion will cover optimizer reports, query profiling, and session status to measure performance.The query patterns will include:Exclusion JoinRandom SelectionGreatest-Per-GroupDynamic PivotRelational DivisionPlease register for this webinar and join me next Friday!The post Webinar: SQL Query Patterns, Optimized appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/02/Percona-MySQL-Webinars.jpg"><img class="alignleft  wp-image-12964" alt="Using MySQL 5.6 Performance Schema to Troubleshoot Typical Workload Bottlenecks" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/02/Percona-MySQL-Webinars-285x300.jpg" width="171" height="180" /></a>Next Friday, May 31 at 10 a.m. Pacific, I&#8217;ll present Percona&#8217;s next webinar, &#8220;<a href="http://www.percona.com/webinars/mysql-query-patterns-optimized">SQL Query Patterns, Optimized</a>.&#8221;</p><p>Based on my experiences solving tough SQL problems for <a href="http://www.percona.com/training">Percona training</a> and <a href="http://www.percona.com/mysql-consulting/overview">consulting</a>, I&#8217;ll classify several common types of queries with which developers struggle. I&#8217;ll test several SQL solutions for each type of query objective, and show how you can use MySQL 5.6 built-in methods to analyze them for optimal query efficiency.  The discussion will cover optimizer reports, query profiling, and session status to measure performance.</p><p>The query patterns will include:</p><ul><li>Exclusion Join</li><li>Random Selection</li><li>Greatest-Per-Group</li><li>Dynamic Pivot</li><li>Relational Division</li></ul><p>Please <a href="http://www.percona.com/webinars/mysql-query-patterns-optimized">register for this webinar</a> and join me next Friday!</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/20/webinar-sql-query-patterns-optimized/">Webinar: SQL Query Patterns, Optimized</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79528&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79528&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 10:00:28 +0000</pubDate>
    <dc:creator>Bill Karwin</dc:creator>
    <category>MySQL</category>
    <category>MySQL Webinars</category>
    <category>Bill Karwin</category>
    <category>Optimizer</category>
    <category>SQL Query Patterns</category>
    <category>Tips</category>
  </item>

  <item>
    <title>New Article on Performance Schema on Dr.Dobbs</title>
    <guid isPermaLink="false">http://www.markleith.co.uk/?p=1208</guid>
    <link>http://www.markleith.co.uk/2013/05/20/new-article-on-performance-schema-on-dr-dobbs/?utm_source=rss&amp;amp;utm_medium=rss&amp;amp;utm_campaign=new-article-on-performance-schema-on-dr-dobbs</link>
    <description>Interested in an introduction to using Performance Schema to profile statement activity on your MySQL instances? Head on over to Detailed Profiling of SQL Activity in MySQL 5.6, which was recently published on the Dr.Dobbs site!</description>
    <content:encoded><![CDATA[<p>Interested in an introduction to using Performance Schema to profile statement activity on your MySQL instances? Head on over to <a href="http://www.drdobbs.com/database/detailed-profiling-of-sql-activity-in-my/240154959?pgno=1" title="Detailed Profiling of SQL Activity in MySQL 5.6">Detailed Profiling of SQL Activity in MySQL 5.6</a>, which was recently published on the Dr.Dobbs site!</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79527&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79527&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 09:06:58 +0000</pubDate>
    <dc:creator>Mark Leith</dc:creator>
    <category>MySQL</category>
  </item>

  <item>
    <title>Easier Overview of Current Performance Schema Setting</title>
    <guid isPermaLink="false">http://mysql.wisborg.dk/?p=148</guid>
    <link>http://mysql.wisborg.dk/2013/05/20/easier-overview-of-current-performance-schema-setting/</link>
    <description>While I prepared for my Hands-On Lab about the Performance Schema at MySQL Connect last year, one of the things that occurred to me was how difficult it was quickly getting an overview of which consumers, instruments, actors, etc. are actually enabled. For the consumers things are made more complicated as the effective setting also depends on parents in the hierarchy. So my thought was: &amp;#8220;How difficult can it be to write a stored procedure that outputs a tree of the hierarchies.&amp;#8221; Well, simple enough in principle, but trying to be general ended up making it into a lengthy project and as it was a hobby project, it often ended up being put aside for more urgent tasks.
However here around eight months later, it is starting to shape up. While there definitely still is work to be done, e.g. creating the full tree and outputting it in text mode (more on modes later) takes around one minute on my test system &amp;#8211; granted I am using a standard laptop and MySQL is running in a VM, so it is nothing sophisticated.
The current routines can be found in ps_tools.sql.gz &amp;#8211; it may later be merged into Mark Leith&amp;#8217;s ps_helper to try to keep the Performance Schema tools collected in one place.
Note: This far the routines have only been tested in Linux on MySQL 5.6.11. Particularly line endings may give problems on Windows and Mac.
Description of the ps_tools Routines
The current status are two views, four stored procedure, and four functions &amp;#8211; not including several functions and procedures that does all the hard work:

Views:

setup_consumers &amp;#8211; Displays whether each consumer is enabled and whether the consumer actually will be collected based on the hierarchy rules described in Pre-Filtering by Consumer in the Reference Manual.
accounts_enabled &amp;#8211; Displays whether each account defined in the mysql.user table has instrumentation enabled based on the rows in performance_schema.setup_actors.


Procedures:

setup_tree_consumers(format, color) &amp;#8211; Create a tree based on setup_consumers displaying whether each consumer is effectively enabled. The arguments are:

format is the output format and can be either (see also below).:

Text: Left-Right
Text: Top-Bottom
Dot: Left-Right
Dot: Top-Bottom


color is whether to add bash color escapes sequences around the consumer names when used a Text format (ignored for Dot outputs).


setup_tree_instruments(format, color, only_enabled, regex_filter) &amp;#8211; Create a tree based on setup_instruments displaying whether each instrument is enabled. The tree is creating by splitting the instrument names at each /. The arguments are:

format is the output format and can be either:

Text: Left-Right
Dot: Left-Right
Dot: Top-Bottom


color is whether to add bash color escapes sequences around the instrument names when used a Text format (ignored for Dot outputs).
type &amp;#8211; whether to base the tree on the ENABLED or TIMED column of setup_instruments.
only_enabled &amp;#8211; if TRUE only the enabled instruments are included.
regex_filter &amp;#8211; if set to a non-empty string only instruments that match the regex will be included.


setup_tree_actors_by_host(format, color) &amp;#8211; Create a tree of each account defined in mysql.user and whether they are enabled; grouped by host. The arguments are:

format is the output format and can be either:

Text: Left-Right
Dot: Left-Right
Dot: Top-Bottom


color is whether to add bash color escape sequences around the names when used a Text format (ignored for Dot outputs).


setup_tree_actors_by_user &amp;#8211; Create a tree of each account defined in mysql.user and whether they are enabled; grouped by username. The arguments are:

format is the output format and can be either:

Text: Left-Right
Dot: Left-Right
Dot: Top-Bottom


color is whether to add bash color escape sequences around the names when used a Text format (ignored for Dot outputs).




Functions:

is_consumer_enabled(consumer_name) &amp;#8211; Returns whether a given consumer is effectively enabled.
is_account_enabled(host, user) &amp;#8211; Returns whether a given account (host, user) is enabled according to setup_actors.
substr_count(haystack, needle, offset, length) &amp;#8211; The number of times a given substring occurs in a string. A port of the PHP function of the same name.
substr_by_delim(set, delimiter, pos) &amp;#8211; Returns the Nth element from a delimiter string.



The two functions substr_count() and substr_by_delim() was also described in an earlier blog.
The formats for the four stored procedures consists of two parts: whether it is Text or Dot and the direction. Text is a tree that can be viewed directly either in the mysql command line client (coloured output not supported) or the shell (colours supported for bash). Dot will output a DOT graph file in the same way as dump_thread_stack() in ps_helper. The direction is as defined in the DOT language, so e.g. Left-Right will have the first level furthest to the left, then add each new level to the right of the parent level.
Examples
As the source code &amp;#8211; including comments &amp;#8211; is more than 1600 lines, I will not discuss it here, but rather go through some examples.
setup_tree_consumers
Using the coloured output:
or the same using a non-coloured output:

setup_tree_instruments
Here a small part of the tree is selected using a regex.
setup_tree_actors_%
With only root@localhost and root@127.0.0.1 enabled, the outputs of setup_tree_actors_by_host and setup_tree_actors_by_user gives respectively:
DOT Graph of setup_instruments
The full tree of setup_instruments can be created using the following sequence of steps (I am using graphviz to get support for dot files):MySQL 5.6.11$ echo -e &quot;$(mysql -NBe &quot;CALL ps_tools.setup_tree_instruments('Dot: Left-Right', FALSE, 'Enabled', FALSE, '')&quot;)&quot; &amp;gt; /tmp/setup_instruments.dot
MySQL 5.6.11$ dot -Tpng /tmp/setup_instruments.dot -o /tmp/setup_instruments.pngThe full output is rather large (6.7M). If you want to see if you can get to it at http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr.png.
Views
mysql&amp;gt; SELECT * FROM ps_tools.setup_consumers;
+--------------------------------+---------+----------+
| NAME                           | ENABLED | COLLECTS |
+--------------------------------+---------+----------+
| events_stages_current          | NO      | NO       |
| events_stages_history          | NO      | NO       |
| events_stages_history_long     | NO      | NO       |
| events_statements_current      | YES     | YES      |
| events_statements_history      | NO      | NO       |
| events_statements_history_long | NO      | NO       |
| events_waits_current           | NO      | NO       |
| events_waits_history           | NO      | NO       |
| events_waits_history_long      | NO      | NO       |
| global_instrumentation         | YES     | YES      |
| thread_instrumentation         | YES     | YES      |
| statements_digest              | YES     | YES      |
+--------------------------------+---------+----------+
12 rows in set (0.00 sec)

mysql&amp;gt; SELECT * FROM ps_tools.accounts_enabled;
+-------------+-----------+---------+
| User        | Host      | Enabled |
+-------------+-----------+---------+
| replication | 127.0.0.1 | NO      |
| root        | 127.0.0.1 | YES     |
| root        | ::1       | NO      |
| meb         | localhost | NO      |
| memagent    | localhost | NO      |
| root        | localhost | YES     |
+-------------+-----------+---------+
6 rows in set (0.00 sec)
Conclusion
There is definitely more work to do on making the Performance Schema easier to access. ps_helper and ps_tools are a great start to what I am sure will be an extensive library of useful diagnostic queries and tools.</description>
    <content:encoded><![CDATA[<p>While I prepared for my <a title="Slides and Other Files From My Hands-On Labs at MySQL Connect 2012" href="http://mysql.wisborg.dk/2012/10/15/slides-and-other-files-from-my-hands-on-labs-at-mysql-connect-2012/" target="_blank">Hands-On Lab about the Performance Schema</a> at <a title="MySQL Connect" href="http://www.oracle.com/mysqlconnect/">MySQL Connect</a> last year, one of the things that occurred to me was how difficult it was quickly getting an overview of which consumers, instruments, actors, etc. are actually enabled. For the consumers things are made more complicated as the effective setting also depends on parents in the hierarchy. So my thought was: &#8220;How difficult can it be to write a stored procedure that outputs a tree of the hierarchies.&#8221; Well, simple enough in principle, but trying to be general ended up making it into a lengthy project and as it was a hobby project, it often ended up being put aside for more urgent tasks.</p>
<p>However here around eight months later, it is starting to shape up. While there definitely still is work to be done, e.g. creating the full tree and outputting it in text mode (more on modes later) takes around one minute on my test system &#8211; granted I am using a standard laptop and MySQL is running in a VM, so it is nothing sophisticated.</p>
<p>The current routines can be found in <a title="ps_tools for MySQL 5.6" href="http://mysql.wisborg.dk/media/ps_tools_56.sql.gz">ps_tools.sql.gz</a> &#8211; it may later be merged into <a title="ps_helper" href="http://www.markleith.co.uk/ps_helper/" target="_blank">Mark Leith&#8217;s ps_helper</a> to try to keep the Performance Schema tools collected in one place.</p>
<p><strong>Note:</strong> This far the routines have only been tested in Linux on MySQL 5.6.11. Particularly line endings may give problems on Windows and Mac.</p>
<h2>Description of the ps_tools Routines</h2>
<p>The current status are two views, four stored procedure, and four functions &#8211; not including several functions and procedures that does all the hard work:</p>
<ul>
<li>Views:
<ul>
<li>setup_consumers &#8211; Displays whether each consumer is enabled and whether the consumer actually will be collected based on the hierarchy rules described in <a title="Pre-Filtering by Consumer" href="https://dev.mysql.com/doc/refman/5.6/en/performance-schema-filtering.html#performance-schema-consumer-filtering" target="_blank"><em>Pre-Filtering by Consume</em></a>r in the Reference Manual.</li>
<li>accounts_enabled &#8211; Displays whether each account defined in the<em> mysql.user</em> table has instrumentation enabled based on the rows in <em>performance_schema.setup_actors</em>.</li>
</ul>
</li>
<li>Procedures:
<ul>
<li>setup_tree_consumers(format, color) &#8211; Create a tree based on <em>setup_consumers</em> displaying whether each consumer is effectively enabled. The arguments are:
<ul>
<li>format is the output format and can be either (see also below).:
<ul>
<li>Text: Left-Right</li>
<li>Text: Top-Bottom</li>
<li>Dot: Left-Right</li>
<li>Dot: Top-Bottom</li>
</ul>
</li>
<li>color is whether to add bash color escapes sequences around the consumer names when used a Text format (ignored for Dot outputs).</li>
</ul>
</li>
<li>setup_tree_instruments(format, color, only_enabled, regex_filter) &#8211; Create a tree based on <em>setup_instruments</em> displaying whether each instrument is enabled. The tree is creating by splitting the instrument names at each /. The arguments are:
<ul>
<li>format is the output format and can be either:
<ul>
<li>Text: Left-Right</li>
<li>Dot: Left-Right</li>
<li>Dot: Top-Bottom</li>
</ul>
</li>
<li>color is whether to add bash color escapes sequences around the instrument names when used a Text format (ignored for Dot outputs).</li>
<li>type &#8211; whether to base the tree on the <em>ENABLED</em> or <em>TIMED</em> column of <em>setup_instruments</em>.</li>
<li>only_enabled &#8211; if <em>TRUE</em> only the enabled instruments are included.</li>
<li>regex_filter &#8211; if set to a non-empty string only instruments that match the regex will be included.</li>
</ul>
</li>
<li>setup_tree_actors_by_host(format, color) &#8211; Create a tree of each account defined in <em>mysql.user</em> and whether they are enabled; grouped by host. The arguments are:
<ul>
<li>format is the output format and can be either:
<ul>
<li>Text: Left-Right</li>
<li>Dot: Left-Right</li>
<li>Dot: Top-Bottom</li>
</ul>
</li>
<li>color is whether to add bash color escape sequences around the names when used a Text format (ignored for Dot outputs).</li>
</ul>
</li>
<li>setup_tree_actors_by_user &#8211; Create a tree of each account defined in <em>mysql.user</em> and whether they are enabled; grouped by username. The arguments are:
<ul>
<li>format is the output format and can be either:
<ul>
<li>Text: Left-Right</li>
<li>Dot: Left-Right</li>
<li>Dot: Top-Bottom</li>
</ul>
</li>
<li>color is whether to add bash color escape sequences around the names when used a Text format (ignored for Dot outputs).</li>
</ul>
</li>
</ul>
</li>
<li>Functions:
<ul>
<li>is_consumer_enabled(consumer_name) &#8211; Returns whether a given consumer is effectively enabled.</li>
<li>is_account_enabled(host, user) &#8211; Returns whether a given account (host, user) is enabled according to <em>setup_actors</em>.</li>
<li>substr_count(haystack, needle, offset, length) &#8211; The number of times a given substring occurs in a string. A port of the PHP function of the same name.</li>
<li>substr_by_delim(set, delimiter, pos) &#8211; Returns the Nth element from a delimiter string.</li>
</ul>
</li>
</ul>
<p>The two functions substr_count() and substr_by_delim() was also described in <a title="A Couple of Substring Functions: substr_count() and substr_by_delim()" href="http://mysql.wisborg.dk/2012/10/22/a-couple-of-substring-functions/" target="_blank">an earlier blog</a>.</p>
<p>The formats for the four stored procedures consists of two parts: whether it is Text or Dot and the direction. Text is a tree that can be viewed directly either in the mysql command line client (coloured output not supported) or the shell (colours supported for bash). Dot will output a DOT graph file in the same way as dump_thread_stack() in ps_helper. The direction is as defined in the DOT language, so e.g. Left-Right will have the first level furthest to the left, then add each new level to the right of the parent level.</p>
<h2>Examples</h2>
<p>As the source code &#8211; including comments &#8211; is more than 1600 lines, I will not discuss it here, but rather go through some examples.</p>
<h3>setup_tree_consumers</h3>
<p>Using the coloured output:</p>
<p><a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_consumers_tb.png"><img class="aligncenter size-medium wp-image-161" alt="setup_tree_consumers_tb" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_consumers_tb-300x60.png" width="300" height="60" /></a>or the same using a non-coloured output:<br />
<a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_consumers_lr.png"><img class="aligncenter  wp-image-168" alt="setup_tree_consumers_lr" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_consumers_lr-300x93.png" width="300" height="93" /></a></p>
<h3>setup_tree_instruments</h3>
<p><a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_lr.png"><img class="aligncenter size-medium wp-image-162" alt="setup_tree_instruments_lr" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_lr-300x53.png" width="300" height="53" /></a>Here a small part of the tree is selected using a regex.</p>
<h3>setup_tree_actors_%</h3>
<p>With only root@localhost and root@127.0.0.1 enabled, the outputs of setup_tree_actors_by_host and setup_tree_actors_by_user gives respectively:<a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_actors_by_host_lr.png"><img class="aligncenter size-medium wp-image-159" alt="setup_tree_actors_by_host_lr" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_actors_by_host_lr-300x97.png" width="300" height="97" /></a><a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_actors_by_user_lr.png"><img class="aligncenter size-medium wp-image-160" alt="setup_tree_actors_by_user_lr" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_actors_by_user_lr-300x99.png" width="300" height="99" /></a></p>
<h3>DOT Graph of setup_instruments</h3>
<p>The full tree of setup_instruments can be created using the following sequence of steps (I am using graphviz to get support for dot files):</p><pre>MySQL 5.6.11$ echo -e "$(mysql -NBe "CALL ps_tools.setup_tree_instruments('Dot: Left-Right', FALSE, 'Enabled', FALSE, '')")" &gt; /tmp/setup_instruments.dot
MySQL 5.6.11$ dot -Tpng /tmp/setup_instruments.dot -o /tmp/setup_instruments.png</pre><p><a href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr_snip.png"><img class="aligncenter size-medium wp-image-164" alt="setup_tree_instruments_dot_lr_snip" src="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr_snip-300x81.png" width="300" height="81" /></a>The full output is rather large (6.7M). If you want to see if you can get to it at <a title="DOT generated output of setup_instruments" href="http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr.png" target="_blank">http://mysql.wisborg.dk/wp-content/uploads/2013/05/setup_tree_instruments_dot_lr.png</a>.</p>
<h3>Views</h3>
<p></p><pre>mysql&gt; SELECT * FROM ps_tools.setup_consumers;
+--------------------------------+---------+----------+
| NAME                           | ENABLED | COLLECTS |
+--------------------------------+---------+----------+
| events_stages_current          | NO      | NO       |
| events_stages_history          | NO      | NO       |
| events_stages_history_long     | NO      | NO       |
| events_statements_current      | YES     | YES      |
| events_statements_history      | NO      | NO       |
| events_statements_history_long | NO      | NO       |
| events_waits_current           | NO      | NO       |
| events_waits_history           | NO      | NO       |
| events_waits_history_long      | NO      | NO       |
| global_instrumentation         | YES     | YES      |
| thread_instrumentation         | YES     | YES      |
| statements_digest              | YES     | YES      |
+--------------------------------+---------+----------+
12 rows in set (0.00 sec)

mysql&gt; SELECT * FROM ps_tools.accounts_enabled;
+-------------+-----------+---------+
| User        | Host      | Enabled |
+-------------+-----------+---------+
| replication | 127.0.0.1 | NO      |
| root        | 127.0.0.1 | YES     |
| root        | ::1       | NO      |
| meb         | localhost | NO      |
| memagent    | localhost | NO      |
| root        | localhost | YES     |
+-------------+-----------+---------+
6 rows in set (0.00 sec)</pre><p></p>
<h2>Conclusion</h2>
<p>There is definitely more work to do on making the Performance Schema easier to access. ps_helper and ps_tools are a great start to what I am sure will be an extensive library of useful diagnostic queries and tools.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79525&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79525&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 04:31:07 +0000</pubDate>
    <dc:creator>Jesper Krogh</dc:creator>
    <category>MySQL</category>
    <category>MySQL 5.6</category>
    <category>MySQL Connect 2012</category>
    <category>Performance Schema</category>
  </item>

  <item>
    <title>Experimenting with MySQL 5.7</title>
    <guid isPermaLink="false">http://www.tocker.ca/2013/05/20/experimenting-with-mysql-5-7.html</guid>
    <link>http://www.tocker.ca/2013/05/20/experimenting-with-mysql-5-7.html</link>
    <description>I was playing around with MySQL 5.7 this weekend and before having read the changelog, I managed to spot these two little gems.

Duplicate Indexes


&amp;#8220;The server now issues a warning if an index is created that duplicates an existing index, or an error in strict SQL mode.&amp;#8221; Bug #37520


Example Testcase:

mysql&amp;gt; SHOW CREATE TABLE city\G
*************************** 1. row ***************************
       Table: city
Create Table: CREATE TABLE `city` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` char(35) NOT NULL DEFAULT &amp;#39;&amp;#39;,
  `CountryCode` char(3) NOT NULL DEFAULT &amp;#39;&amp;#39;,
  `District` char(20) NOT NULL DEFAULT &amp;#39;&amp;#39;,
  `Population` int(11) NOT NULL DEFAULT &amp;#39;0&amp;#39;,
  PRIMARY KEY (`ID`),
  KEY `CountryCode` (`CountryCode`),
  CONSTRAINT `city_ibfk_1` FOREIGN KEY (`CountryCode`) REFERENCES `Country` (`Code`)
) ENGINE=InnoDB AUTO_INCREMENT=4080 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql&amp;gt; ALTER TABLE city add index (countrycode);
ERROR 1831 (HY000): Duplicate index &amp;#39;CountryCode_2&amp;#39; defined on the table &amp;#39;world.city&amp;#39;. 
This is deprecated and will be disallowed in a future release.

Pretty cool - I know this previously caught a lot of people.

Control-C support in the client


&amp;#8220;Previously, Control+C in mysql interrupted the current statement if there was one, or exited mysql if not. Now Control+C interrupts the current statement if there was one, or cancels any partial input line otherwise, but does not exit.&amp;#8221; Bug #66583


Example Testcase:

mysql&amp;gt; this is a test
    -&amp;gt; test
    -&amp;gt; test
    -&amp;gt; ^C

So if I want to quit, I can now control-C then type &amp;#8220;quit&amp;#8221;. This is much more intuitive.</description>
    <content:encoded><![CDATA[<p>I was playing around with MySQL 5.7 this weekend and before having read the <a href="http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-0.html">changelog</a>, I managed to spot these two little gems.</p>

<h2>Duplicate Indexes</h2>

<blockquote>
<p>&#8220;The server now issues a warning if an index is created that duplicates an existing index, or an error in strict SQL mode.&#8221; <a href="http://bugs.mysql.com/bug.php?id=37520">Bug #37520</a></p>
</blockquote>

<p>Example Testcase:</p>

<pre><code>mysql&gt; SHOW CREATE TABLE city\G
*************************** 1. row ***************************
       Table: city
Create Table: CREATE TABLE `city` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `Name` char(35) NOT NULL DEFAULT &#39;&#39;,
  `CountryCode` char(3) NOT NULL DEFAULT &#39;&#39;,
  `District` char(20) NOT NULL DEFAULT &#39;&#39;,
  `Population` int(11) NOT NULL DEFAULT &#39;0&#39;,
  PRIMARY KEY (`ID`),
  KEY `CountryCode` (`CountryCode`),
  CONSTRAINT `city_ibfk_1` FOREIGN KEY (`CountryCode`) REFERENCES `Country` (`Code`)
) ENGINE=InnoDB AUTO_INCREMENT=4080 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql&gt; ALTER TABLE city add index (countrycode);
ERROR 1831 (HY000): Duplicate index &#39;CountryCode_2&#39; defined on the table &#39;world.city&#39;. 
This is deprecated and will be disallowed in a future release.</code></pre>

<p>Pretty cool - I know this previously caught a lot of people.</p>

<h2>Control-C support in the client</h2>

<blockquote>
<p>&#8220;Previously, Control+C in mysql interrupted the current statement if there was one, or exited mysql if not. Now Control+C interrupts the current statement if there was one, or cancels any partial input line otherwise, but does not exit.&#8221; <a href="http://bugs.mysql.com/bug.php?id=66583">Bug #66583</a></p>
</blockquote>

<p>Example Testcase:</p>

<pre><code>mysql&gt; this is a test
    -&gt; test
    -&gt; test
    -&gt; ^C</code></pre>

<p>So if I want to quit, I can now control-C then type &#8220;quit&#8221;. This is much more intuitive.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79530&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=79530&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Mon, 20 May 2013 04:00:00 +0000</pubDate>
    <dc:creator>Morgan Tocker</dc:creator>
  </item>

  <item>
    <title>What's the deal with NoSQL?</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-9144505959002328789.post-3086645831197706309</guid>
    <link>http://karlssonondatabases.blogspot.com/2013/05/whats-deal-with-nosql.html</link>
    <description>Everybody seems to be looking at and debating NoSQL these days, and so am I and I thought I'd say a few words about it. Which is not to say I haven't said stuff before, bit them I was mainly targeting specific attributes of many NoSQL solutions (like &quot;eventual consistency&quot; or, as you might call it, &quot;instant inconsistency&quot;, What I was opposing is that &quot;eventual consistency&quot; has anything to do with just that, consistency. Rather, what this means is that at any point in time the system is inconsistent, and even if it might be consistent, you cannot rely on it being so. Which is fine, but don't call it consistency, call it inconsistency. Allowing a database to be somewhat inconsistent doesn't necessarily mean that it's something wrong with it).All this said, what is going on here, why are we MySQL and MariaDB users seeing so many MongoDB, Cassandra and LevelDB applications pop up? Come on, these are typically less functional implementations of a database than even the most basic MySQL setup? No transactions, no joins, no standards etc. etc. And the answer, if you want to hear what I have to say, is ease of use. So let's explore that a bit.Following the Object Orientation frenzy of the 1990s, when any application project ended up consisting of endless sessions modeling objects, usually involving expensive consultants, dresses in expensive, blue suits. And when that was done (which took years!) you had a way cool object model, but no money left to do the actual implementation, i.e. do the real programming (shiver), and you went to some other project and the nicely dressed object design consultant left to see another OO sucker.Now, objects are much more standard, even non-OO languages have a big chunk of OO features, and these are used enhance programmer productivity and better code and design. Which is fine (except that if you were one of those OO consultants, which means you are now out of a job, as such mundane tasks of writing is not something you would ever do, such dirty stuff is better left to &quot;programmers&quot;. Oh no, I forgot that you are now an ITIL consultant, that just slipped my mind) but how does this relate to MySQL and MariaDB. The answer is that MySQL, which was once considered real easy to use, no longer is as easy as it used to be. The Relational data model is still brilliant when you look at data as data, and that is how many of us look at it, so we go through the process of mapping data to objects, if that is what it takes. SQL and Java, PHP or whatever merges, and the application now contains a layer mapping objects to real data. Or we use hibernate, which does this automatically for us.But a new cadre of developers are emerging, and they look at OO as natural and they look at objects as data (it's not. Data, in my mind, should be independent from the application using it, objects on the other hand, are closely tied to the application at hand). With which I do not mean that there is something wrong with building applications using objects, quite the opposite. But if all you know is objects, then using relational technology turns difficult, and SQL, for all the good things with it, seems old-fashioned and arcane, which it is (but it is so widely used you cannot avoid it). So you go with something that looks at objects as all you need, and present that in some object format. Like JSON.And again, there is nothing wrong with that. But if we who are on the SQL and Relational track just discards these NoSQL technologies, we are not making any friends. We have to accept that MySQL and MariaDB really aren't that easy to use anymore, at least not for newcomers.And then there is another thing: Some data, like Big Data, has attributes that really doesn't fit well in a relational model. Data where the attribute of a value can't easily be determined once and for all, and you need to reprocess that data (large test objects, images and maps are some examples). In this case, you really need to extend the relational model, somehow.But SQL-based relational isn't going away. The Relational model is still one of the best ways to look at data, it's just that we also need some other ways of looking at data. And it needs to be easier to access. And we shouldn't really have to push SQL down the throat of every single developer, trying to develop an application using some OO technology. The answer is we need both. And these technologies needs to interoperate. I want to use SQL for my data. But I also want JSON and REST for my data. And there shouldn't be much of a performance overhead. All in all, we SQL folks need to wake up and data easier to use again. We know data better than the Cassandra and MongoDB folks. We know transactions better than them too. But they know how to work with developers who doesn't know who The Beatles were and make Relational easy to use for them, without them having to learn JSON (and now having to listen to a tirade about todays youngsters not knowing what real music is and that it died with John Lennon! What? You don't know who John Lennon was! That's exactly what I mean, you have no taste at all!).Just my 2 cents.../Karlsson</description>
    <content:encoded><![CDATA[Everybody seems to be looking at and debating <b>NoSQL </b>these days, and so am I and I thought I'd say a few words about it. Which is not to say I haven't said stuff before, bit them I was mainly targeting specific attributes of many NoSQL solutions (like "eventual consistency" or, as you might call it, "instant inconsistency", What I was opposing is that "<i>eventual consistency</i>" has anything to do with just that, consistency. Rather, what this means is that at any point in time the system is inconsistent, and even if it might be consistent, you cannot rely on it being so. Which is fine, but don't call it consistency, call it inconsistency. Allowing a database to be somewhat inconsistent doesn't necessarily mean that it's something wrong with it).<br /><br />All this said, what is going on here, why are we <b>MySQL </b>and <b>MariaDB </b>users seeing so many <b>MongoDB</b>, <b>Cassandra </b>and <b>LevelDB </b>applications pop up? Come on, these are typically less functional implementations of a database than even the most basic MySQL setup? No transactions, no joins, no standards etc. etc. And the answer, if you want to hear what I have to say, is ease of use. So let's explore that a bit.<br /><br />Following the Object Orientation frenzy of the 1990s, when any application project ended up consisting of endless sessions modeling objects, usually involving expensive consultants, dresses in expensive, blue suits. And when that was done (which took years!) you had a way cool object model, but no money left to do the actual implementation, i.e. do the real programming (<i>shiver</i>), and you went to some other project and the nicely dressed object design consultant left to see another OO sucker.<br /><br />Now, objects are much more standard, even non-OO languages have a big chunk of OO features, and these are used enhance programmer productivity and better code and design. Which is fine (except that if you were one of those OO consultants, which means you are now out of a job, as such mundane tasks of writing is not something you would ever do, such dirty stuff is better left to "programmers". Oh no, I forgot that you are now an <b>ITIL </b>consultant, that just slipped my mind) but how does this relate to MySQL and MariaDB. The answer is that MySQL, which was once considered real easy to use, no longer is as easy as it used to be. The Relational data model is still brilliant when you look at data as data, and that is how many of us look at it, so we go through the process of mapping data to objects, if that is what it takes. SQL and Java, PHP or whatever merges, and the application now contains a layer mapping objects to real data. Or we use hibernate, which does this automatically for us.<br /><br />But a new cadre of developers are emerging, and they look at OO as natural and they look at objects as data (it's not. Data, in my mind, should be independent from the application using it, objects on the other hand, are closely tied to the application at hand). With which I do not mean that there is something wrong with building applications using objects, quite the opposite. But if all you know is objects, then using relational technology turns difficult, and SQL, for all the good things with it, seems old-fashioned and arcane, which it is (but it is so widely used you cannot avoid it). So you go with something that looks at objects as all you need, and present that in some object format. Like <b>JSON</b>.<br /><br />And again, there is nothing wrong with that. But if we who are on the SQL and Relational track just discards these NoSQL technologies, we are not making any friends. We have to accept that MySQL and MariaDB really aren't that easy to use anymore, at least not for newcomers.<br /><br />And then there is another thing: Some data, like Big Data, has attributes that really doesn't fit well in a relational model. Data where the attribute of a value can't easily be determined once and for all, and you need to reprocess that data (large test objects, images and maps are some examples). In this case, you really need to extend the relational model, somehow.<br /><br />But SQL-based relational isn't going away. The Relational model is still one of the best ways to look at data, it's just that we also need some other ways of looking at data. And it needs to be easier to access. And we shouldn't really have to push SQL down the throat of every single developer, trying to develop an application using some OO technology. The answer is we need both. And these technologies needs to interoperate. I want to use SQL for my data. But I also want JSON and REST for my data. And there shouldn't be much of a performance overhead. All in all, we SQL folks need to wake up and data easier to use again. We know data better than the Cassandra and MongoDB folks. We know transactions better than them too. But they know how to work with developers who doesn't know who <b>The Beatles</b> were and make Relational easy to use for them, without them having to learn JSON (and now having to listen to a tirade about todays youngsters not knowing what <b>real music</b> is and that it died with <b>John Lennon</b>! <i>What? You don't know who John Lennon was! That's exactly what I mean, you have no taste at all!</i>).<br /><br />Just my 2 cents...<br /><br />/Karlsson<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72792&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72792&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sun, 19 May 2013 18:49:00 +0000</pubDate>
    <dc:creator>Anders Karlsson</dc:creator>
    <category>mysql</category>
    <category>json</category>
    <category>mariadb</category>
  </item>

  <item>
    <title>HeidiSQL 8.0 released</title>
    <guid isPermaLink="false">http://www.heidisql.com/rss.php?c=1,7&amp;amp;p=12650</guid>
    <link>http://www.heidisql.com/forum.php?t=12650#p12650</link>
    <description>343 revisions after the 7.0 release follows the new 8.0 release of HeidiSQL now.  Get it from the download page.  Here are the most noticable changes:   - Available in 23 languages now. Thanks to all translators and Transifex hereby! - Database tree: Introduce optional folders for tables, views, routines etc. - Introduce session folders in session manager. - Make routine editor work on MS SQL servers. - Support search and replace in data and query results. - Add support for microseconds in temporal datatypes of MariaDB 5.3+ and MySQL 5.6. - Introduce a query history, available in the right side helpers box. Can be turned off. - Implement grid export as PHP array. - Host &amp;gt; Variables: Add &quot;Global&quot; column, and highlight values different to their session pendant - Add menu item for launching mysql.exe command line with current parameters.   ... and more: - Table editor: Fix handling of BIT default values, and support BIT columns in MS SQL. - Table editor: Improve selection of ENUM and SET default values - User manager: Support dots in database and table privileges - Data grids: Support copying/pasting NULL values - Fix stripped backslashes in VIEW body editor - Apply hotkeys to dialog buttons - Grid export: Remove zero padding to avoid octal =&amp;gt; integer conversion in PHP - Data grid: Propose column names from selected table in filter panel - Database and new table filter above database tree - Table editor: Display number of selected columns in status bar - Database tree: Indicate previously selected tables with a non-ghosted icon in the tree, while leaving never selected ones ghosted - Display timestamp in very right status bar panel when executing a query - Table editor: Add missing DATE and TIME datatypes for MS SQL - Table editor: Support old style &quot;TYPE BTREE&quot; in table index code - Routine editor: Finally fix ramshackle detection of routine body - Data grid: Make foreign values drop down optionally - Dialogs: Introduce &quot;KeepAskingSetting&quot; checkbox - Session manager: Move startup script and local time zone options together with SSL settings to a new &quot;Advanced&quot; tab - SQL export: Support filename and dirname patterns in export target combobox - Database tree: Display overlay icons for some special table engines like federated, csv, aria and performance_schema - Implement an automatic keep-alive ping, to prevent SSH tunnels from disconnecting - Add support for renaming tables in MS SQL - Fix crash on exit when connected to pre-4.1 servers - Table editor: Enhance MS SQL compatibility in table editor - Fix and enhance handling of multiple statements and multiple results - Grid export: Add &quot;Include query&quot; and &quot;Include auto increment column&quot; checkbox options - Processlist: Add link label &quot;EXPLAIN Analyzer on MariaDB.org&quot; - Internal: Refactor logic for reading and writing application and session settings - Session manager: Introduce new columns &quot;Last connect&quot; and &quot;Counter&quot; - Extend the variable editor to explicitly modify strings, numbers, booleans or enumerations - Detect client timezone and send SET time_zone to the server, so that NOW() and friends return UTC-fixed values - Session manager: Add server specific icons for TokuDB, InfiniDB and Infobright - Session handling: Use home brown file format for exporting and importing registry settings, as used for the portable version - Implement usage of mysql_warning_count(). Ask for running SHOW WARNINGS in a new query tab. - Fix command line for Wine users - Introduce new preference option &quot;Prefill empty date/time fields&quot;. - Restore previous selection after refreshing process list (and neighbor tabs)</description>
    <content:encoded><![CDATA[343 revisions after the 7.0 release follows the new 8.0 release of HeidiSQL now.<br /> <br /> Get it from the <a href="http://www.heidisql.com/download.php">download page</a>.<br /> <br /> Here are the most noticable changes:<br /> <br /> <strong><br /> - Available in 23 languages now. Thanks to all translators and Transifex hereby!<br /> - Database tree: Introduce optional folders for tables, views, routines etc.<br /> - Introduce session folders in session manager.<br /> - Make routine editor work on MS SQL servers.<br /> - Support search and replace in data and query results.<br /> - Add support for microseconds in temporal datatypes of MariaDB 5.3+ and MySQL 5.6.<br /> - Introduce a query history, available in the right side helpers box. Can be turned off.<br /> - Implement grid export as PHP array.<br /> - Host &gt; Variables: Add "Global" column, and highlight values different to their session pendant<br /> - Add menu item for launching mysql.exe command line with current parameters.<br /> </strong><br /> <br /> ... and more:<br /> - Table editor: Fix handling of BIT default values, and support BIT columns in MS SQL.<br /> - Table editor: Improve selection of ENUM and SET default values<br /> - User manager: Support dots in database and table privileges<br /> - Data grids: Support copying/pasting NULL values<br /> - Fix stripped backslashes in VIEW body editor<br /> - Apply hotkeys to dialog buttons<br /> - Grid export: Remove zero padding to avoid octal =&gt; integer conversion in PHP<br /> - Data grid: Propose column names from selected table in filter panel<br /> - Database and new table filter above database tree<br /> - Table editor: Display number of selected columns in status bar<br /> - Database tree: Indicate previously selected tables with a non-ghosted icon in the tree, while leaving never selected ones ghosted<br /> - Display timestamp in very right status bar panel when executing a query<br /> - Table editor: Add missing DATE and TIME datatypes for MS SQL<br /> - Table editor: Support old style "TYPE BTREE" in table index code<br /> - Routine editor: Finally fix ramshackle detection of routine body<br /> - Data grid: Make foreign values drop down optionally<br /> - Dialogs: Introduce "KeepAskingSetting" checkbox<br /> - Session manager: Move startup script and local time zone options together with SSL settings to a new "Advanced" tab<br /> - SQL export: Support filename and dirname patterns in export target combobox<br /> - Database tree: Display overlay icons for some special table engines like federated, csv, aria and performance_schema<br /> - Implement an automatic keep-alive ping, to prevent SSH tunnels from disconnecting<br /> - Add support for renaming tables in MS SQL<br /> - Fix crash on exit when connected to pre-4.1 servers<br /> - Table editor: Enhance MS SQL compatibility in table editor<br /> - Fix and enhance handling of multiple statements and multiple results<br /> - Grid export: Add "Include query" and "Include auto increment column" checkbox options<br /> - Processlist: Add link label "EXPLAIN Analyzer on MariaDB.org"<br /> - Internal: Refactor logic for reading and writing application and session settings<br /> - Session manager: Introduce new columns "Last connect" and "Counter"<br /> - Extend the variable editor to explicitly modify strings, numbers, booleans or enumerations<br /> - Detect client timezone and send SET time_zone to the server, so that NOW() and friends return UTC-fixed values<br /> - Session manager: Add server specific icons for TokuDB, InfiniDB and Infobright<br /> - Session handling: Use home brown file format for exporting and importing registry settings, as used for the portable version<br /> - Implement usage of mysql_warning_count(). Ask for running SHOW WARNINGS in a new query tab.<br /> - Fix command line for Wine users<br /> - Introduce new preference option "Prefill empty date/time fields".<br /> - Restore previous selection after refreshing process list (and neighbor tabs)<br /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72791&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72791&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sun, 19 May 2013 09:11:52 +0000</pubDate>
    <dc:creator>Ansgar Becker</dc:creator>
    <category>Anouncements</category>
  </item>

  <item>
    <title>MySQL 5.6, InnoDB and fast storage</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-5915567578707286635.post-796209114341327474</guid>
    <link>http://mysqlha.blogspot.com/2013/05/mysql-56-innodb-and-fast-storage.html</link>
    <description>I used a simple workload with sysbench to determine the rate at which InnoDB can read blocks from disk. The workload is read-only and each query fetches 1 row by PK. The workload was IO-bound with a 2G InnoDB buffer pool and 32G database. Storage was fast courtesy of buffered IO and enough RAM to cache the database in the OS filesystem cache.Using MySQL 5.6.11 and InnoDB with a few hacks the peak throughput was about 240,000 QPS and 210,000 block reads/second. The test server has 32 cores (16 physical cores, 32 logical cores with HT enabled). This is a great result that can probably be even better. Contention on fil_system-&amp;gt;mutex was the bottleneck and I think that can be improved (see feature request&amp;nbsp;#69276). I wonder if 400,000 block reads/second is possible?A few years back, in 2009 or 2010, I ran similar tests using a server with 8 physical cores. I think HT was disabled. Using MySQL 5.1 with the Facebook patch I was able to get about 40,000 QPS and 35,000 block reads/second. It is good to see software advance to keep up with hardware.</description>
    <content:encoded><![CDATA[I used a simple workload with sysbench to determine the rate at which InnoDB can read blocks from disk. The workload is read-only and each query fetches 1 row by PK. The workload was IO-bound with a 2G InnoDB buffer pool and 32G database. Storage was fast courtesy of buffered IO and enough RAM to cache the database in the OS filesystem cache.<br /><br />Using MySQL 5.6.11 and InnoDB with a few hacks the peak throughput was about 240,000 QPS and 210,000 block reads/second. The test server has 32 cores (16 physical cores, 32 logical cores with HT enabled). This is a great result that can probably be even better. Contention on fil_system-&gt;mutex was the bottleneck and I think that can be improved (see feature request&nbsp;<a href="http://bugs.mysql.com/bug.php?id=69276">#69276</a>). I wonder if 400,000 block reads/second is possible?<br /><br />A few years back, in 2009 or 2010, I ran similar tests using a server with 8 physical cores. I think HT was disabled. Using MySQL 5.1 with the Facebook patch I was able to get about 40,000 QPS and 35,000 block reads/second. It is good to see software advance to keep up with hardware.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72679&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=72679&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sat, 18 May 2013 22:03:00 +0000</pubDate>
    <dc:creator>Mark Callaghan</dc:creator>
    <category>mysql</category>
  </item>

  <item>
    <title>New Feature Qualification</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-4838504497908987050.post-595533353260171556</guid>
    <link>http://anithagopi.blogspot.com/2013/05/new-feature-qualification.html</link>
    <description>Early this year Oracle released&amp;nbsp; MySQL 5.6 - Best MySQL Release Ever. This release delivered not only quality, but also quantity in terms of number of features. See a comprehensive list here . The blogs below also refer to the massive changes introduced in 5.6http://www.mysqlperformanceblog.com/2013/01/27/mysql-5-6-improvements-in-the-nutshell/http://www.flamingspork.com/blog/2013/03/05/mysql-code-size/ It is no mean task to deliver so many features with high quality that too for a feature rich product like MySQL. This was made possible by the increased focus given to testing during 5.6 development . Testing was integrated far better than in the past with MySQL processes and test team was grown significantly. After the first few milestone releases developers and other stake holders started seeing benefits of the new processes and that resulted in better cooperation between development and test teams which in turn resulted in a bunch of happy testers :). In this post I will take you through the process that was established for new feature qualification. Features are delivered through milestones which Tomas Ulin has explained very well at http://insidemysql.com/the-milestone-release-model-revisited/. MySQL Server QA has the following goals for new featuresComplete functional and non functional test coverage of changed and new functionality No regressionsMore than 80% Code CoverageQA involvement starts as soon as the requirements and specifications of the feature are finalized by the development team. QA reviews available documents and provides feedback on the design, usability, testability etc. A discussion follows with the developer and changes are made as needed to ensure that the feature can be tested.Once the specifications and requirements are acceptable QA starts working on the test plan.&amp;nbsp; First QA documents all scenarios that needs to be tested. This includes stand alone tests, integration tests, non functional tests etc. Next step is to identify tools for automating the scenarios. Most commonly used functional test tools areMTR(mysql-test-run)- Used to cover simple to medium complexity test casesRQG(Random Query Generator) - This is a very powerful tool and is used for concurrency tests, generating large number of SQL queries etcMTR based tests are added by default for any new feature. RQG use started from 5.5 and it gained wide acceptance in 5.6. At least 90% of the features in 5.6 have gone through RQG testing and this helped weed out many bugs which would have been nearly impossible to find using MTR.While the developers are working on the product code , QA engineers start working on the automated tests, test infrastructure improvements etc.Final round of testing starts after the feature has passed code reviews. This phase can last anywhere between a few days to months depending on the complexity of the feature, stability of the code etc. Features gets signed off only when the following conditions are met:No open bugs in the new feature - This is very strictly enforced and even minor bugs are not allowed. We believe that bugs are easiest to fix when the code is new and hence this can help us deliver features that are of high quality. No regressions - A feature gets developed on a tree which gets tested regularly through a continuous integration testing tool. Any regressions are detected and fixed before sign off. Acceptable Code coverage numbers - Code coverage report is generated for the changed lines of code and the minimum expected coverage is 80%. Most features have coverage of more than 90%. Any uncovered lines of code are analyzed and wherever possible new tests are added to increase code coverage.All new tests are added to the automated regression suite.All planned testing has completed with satisfactory results.This process worked really well in 5.6 and we will use our experiences to improve this further and deliver an even better 5.7 !!</description>
    <content:encoded><![CDATA[<div dir="ltr" trbidi="on">Early this year Oracle released&nbsp; <a href="https://blogs.oracle.com/MySQL/entry/the_best_mysql_release_ever">MySQL 5.6 - Best MySQL Release Ever</a>. This release delivered not only quality, but also quantity in terms of number of features. See a comprehensive list <a href="https://blogs.oracle.com/MySQL/entry/mysql_5_6_is_a">here</a> . The blogs below also refer to the massive changes introduced in 5.6<br /><a href="http://www.mysqlperformanceblog.com/2013/01/27/mysql-5-6-improvements-in-the-nutshell/">http://www.mysqlperformanceblog.com/2013/01/27/mysql-5-6-improvements-in-the-nutshell/</a><br /><a href="http://www.flamingspork.com/blog/2013/03/05/mysql-code-size/">http://www.flamingspork.com/blog/2013/03/05/mysql-code-size/ </a><br /><br />It is no mean task to deliver so many features with high quality that too for a feature rich product like MySQL. This was made possible by the increased focus given to testing during 5.6 development . Testing was integrated far better than in the past with MySQL processes and test team was grown significantly. After the first few milestone releases developers and other stake holders started seeing benefits of the new processes and that resulted in better cooperation between development and test teams which in turn resulted in a bunch of happy testers :). In this post I will take you through the process that was established for new feature qualification. <br /><br />Features are delivered through milestones which Tomas Ulin has explained very well at<a href="http://insidemysql.com/the-milestone-release-model-revisited/"> http://insidemysql.com/the-milestone-release-model-revisited/. </a>MySQL Server QA has the following goals for new features<br /><br /><ul><li>Complete functional and non functional test coverage of changed and new functionality </li><li>No regressions</li><li>More than 80% Code Coverage</li></ul>QA involvement starts as soon as the requirements and specifications of the feature are finalized by the development team. QA reviews available documents and provides feedback on the design, usability, testability etc. A discussion follows with the developer and changes are made as needed to ensure that the feature can be tested.<br /><br />Once the specifications and requirements are acceptable QA starts working on the test plan.&nbsp; First QA documents all scenarios that needs to be tested. This includes stand alone tests, integration tests, non functional tests etc. Next step is to identify tools for automating the scenarios. Most commonly used functional test tools are<br /><br /><ul><li><a href="http://dev.mysql.com/doc/mysqltest/2.0/en/mysql-test-run-pl.html">MTR(mysql-test-run)</a>- Used to cover simple to medium complexity test cases</li><li><a href="https://github.com/RQG/RQG-Documentation/wiki/Category%3ARandomQueryGenerator">RQG(Random Query Generator)</a> - This is a very powerful tool and is used for concurrency tests, generating large number of SQL queries etc</li></ul>MTR based tests are added by default for any new feature. RQG use started from 5.5 and it gained wide acceptance in 5.6. At least 90% of the features in 5.6 have gone through RQG testing and this helped weed out many bugs which would have been nearly impossible to find using MTR.<br /><br />While the developers are working on the product code , QA engineers start working on the automated tests, test infrastructure improvements etc.Final round of testing starts after the feature has passed code reviews. This phase can last anywhere between a few days to months depending on the complexity of the feature, stability of the code etc. <br /><br />Features gets signed off only when the following conditions are met:<br /><ul><li>No open bugs in the new feature - This is very strictly enforced and even minor bugs are not allowed. We believe that bugs are easiest to fix when the code is new and hence this can help us deliver features that are of high quality. </li><li>No regressions - A feature gets developed on a tree which gets tested regularly through a continuous integration testing tool. Any regressions are detected and fixed before sign off. </li><li>Acceptable Code coverage numbers - Code coverage report is generated for the changed lines of code and the minimum expected coverage is 80%. Most features have coverage of more than 90%. Any uncovered lines of code are analyzed and wherever possible new tests are added to increase code coverage.</li><li>All new tests are added to the automated regression suite.</li><li>All planned testing has completed with satisfactory results.</li></ul>This process worked really well in 5.6 and we will use our experiences to improve this further and deliver an even better 5.7 !!<br /><ul></ul><ul></ul><ul></ul></div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=71759&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=71759&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sat, 18 May 2013 11:00:00 +0000</pubDate>
    <dc:creator>Anitha Gopi</dc:creator>
    <category>MySQL testing</category>
  </item>

  <item>
    <title>MySQL binlogs - Don't forget to do your homework!</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-8932703.post-5987183006125074923</guid>
    <link>http://opendba.blogspot.com/2013/05/mysql-binlogs-dont-forget-to-do-your.html</link>
    <description>Now that I'm back doing just database stuff, I've come to realize I've gotten a little sloppy about doing my homework.  Homework's never been my favorite thing in the world, but it often reduces stress when your under the gun during an outage or upgrade...



We had a MySQL database server that's been slow on DML changes, and based on the slowest statements being 'COMMIT', we had a good mind</description>
    <content:encoded><![CDATA[Now that I'm back doing just database stuff, I've come to realize I've gotten a little sloppy about doing my homework.  Homework's never been my favorite thing in the world, but it often reduces stress when your under the gun during an outage or upgrade...



We had a MySQL database server that's been slow on DML changes, and based on the slowest statements being 'COMMIT', we had a good mind<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70636&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70636&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sat, 18 May 2013 04:34:00 +0000</pubDate>
    <dc:creator>Phil Hildebrand</dc:creator>
    <category>MySQL</category>
    <category>Maintenance</category>
    <category>Replication</category>
    <category>Configuration</category>
    <category>Troubleshooting</category>
  </item>

  <item>
    <title>Percona XtraBackup 2.1.2 for MySQL available for download</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15500</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/18/percona-xtrabackup-2-1-2-for-mysql-available-for-download/</link>
    <description> Percona is glad to announce the release of Percona XtraBackup 2.1.2 for MySQL on May 18, 2013. Downloads are available from our download site here and Percona Software Repositories.This release fixes number of high-priority bugs since version 2.1 became GA. It’s advised to upgrade your latest 2.1 version to 2.1.2. This release is the latest stable release in the 2.1 series.Bugs Fixed:Using Perl’s DBD::MySQL package for server communication instead of spawning the MySQL command line client introduced a regression which caused innobackupex &amp;#8211;galera-info option to fail. Bug fixed #1180672.The format of xtrabackup_galera_info was missing the ‘:’ separator between the values of wsrep_local_state_uuid and wsrep_last_committed. Bug fixed #1181222.innobackupex automatic version detection did not work correctly for latest Percona Server and MySQL 5.1 releases which could cause innobackupex to fail. Bugs fixed #1181092, #1181099 and #1180905.When backing up a server that is not a replication slave with the innobackupex &amp;#8211;slave-info option, innobackupex failed with a fatal error. Replaced the fatal error with a diagnostic message about innobackupex &amp;#8211;slave-info being ignored in such a case. Bug fixed #1180662.Low values for wait_timeout on the server could cause server to close the connection while backup is being taken. Fixed by setting the bigger value for wait_timeout option on the server to prevent server from closing connections if the global wait_timeout value is set too low. Bug fixed #1180922.Other bug fixes: bug fixed #1177182.Release notes with all the bugfixes for Percona XtraBackup 2.1.2 are available in our online documentation. Bugs can be reported on the launchpad bug tracker.The post Percona XtraBackup 2.1.2 for MySQL available for download appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/Percona_XtraBackup.jpg"><img class="alignleft  wp-image-12668" style="margin-top: 5px; margin-bottom: 5px;" alt="Percona XtraBackup for MySQL" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/01/Percona_XtraBackup.jpg" width="206" height="78" /></a> <em>Percona</em> is glad to announce the release of <a href="http://www.percona.com/software/percona-xtrabackup">Percona XtraBackup</a> 2.1.2 for MySQL on May 18, 2013. Downloads are available from our download site <a href="http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.2/">here</a> and <a href="http://www.percona.com/doc/percona-xtrabackup/2.1/installation.html">Percona Software Repositories</a>.</p><p>This release fixes number of high-priority bugs since version 2.1 became GA. It’s advised to upgrade your latest 2.1 version to 2.1.2. This release is the latest stable release in the 2.1 series.</p><p>Bugs Fixed:</p><ul><li>Using Perl’s <code>DBD::MySQL</code> package for server communication instead of spawning the <em>MySQL</em> command line client introduced a regression which caused innobackupex &#8211;galera-info option to fail. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1180672">#1180672</a>.</li><li>The format of <code>xtrabackup_galera_info</code> was missing the ‘:’ separator between the values of <code>wsrep_local_state_uuid</code> and <code>wsrep_last_committed</code>. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1181222">#1181222</a>.</li><li><strong>innobackupex</strong> automatic version detection did not work correctly for latest <em>Percona Server</em> and <em>MySQL</em> 5.1 releases which could cause innobackupex to fail. Bugs fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1181092">#1181092</a>, <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1181099">#1181099</a> and <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1180905">#1180905</a>.</li><li>When backing up a server that is not a replication slave with the innobackupex &#8211;slave-info option, <strong>innobackupex</strong> failed with a fatal error. Replaced the fatal error with a diagnostic message about innobackupex &#8211;slave-info being ignored in such a case. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1180662">#1180662</a>.</li><li>Low values for <code>wait_timeout</code> on the server could cause server to close the connection while backup is being taken. Fixed by setting the bigger value for <code>wait_timeout</code> option on the server to prevent server from closing connections if the global <code>wait_timeout</code> value is set too low. Bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1180922">#1180922</a>.</li></ul><p>Other bug fixes: bug fixed <a href="https://bugs.launchpad.net/percona-xtrabackup/+bug/1177182">#1177182</a>.</p><p>Release notes with all the bugfixes for <em>Percona XtraBackup</em> 2.1.2 are available in our <a href="http://www.percona.com/doc/percona-xtrabackup/release-notes/2.1/2.1.2.html">online documentation</a>. Bugs can be reported on the <a href="https://bugs.launchpad.net/percona-xtrabackup/+filebug">launchpad bug tracker</a>.</p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/18/percona-xtrabackup-2-1-2-for-mysql-available-for-download/">Percona XtraBackup 2.1.2 for MySQL available for download</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70635&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70635&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Sat, 18 May 2013 04:25:53 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>MySQL</category>
    <category>Percona Software</category>
    <category>Percona XtraBackup</category>
    <category>DBD</category>
    <category>innobackupex</category>
    <category>Perl</category>
  </item>

  <item>
    <title>OurSQL Episode 140: More Performance</title>
    <guid isPermaLink="false">1245 at http://technocation.org</guid>
    <link>http://technocation.org/content/oursql-episode-140%3A-more-performance</link>
    <description>This week we explain performance_schema a bit deeper. In Ear Candy, we talk about max_binlog_cache_size and At the Movies presents Max Mether of SkySQL talking about &quot;High Availability Solutions for MySQL&quot;.
Events
DB Hangops - every other Wednesay at noon Pacific time
Upcoming MySQL events
Training
SkySQL Trainings
Tungsten University trainings
read more</description>
    <content:encoded><![CDATA[<p>This week we explain performance_schema a bit deeper. In Ear Candy, we talk about max_binlog_cache_size and At the Movies presents Max Mether of SkySQL talking about "High Availability Solutions for MySQL".</p>
<p><strong>Events</strong><br />
<a href="http://dbahangops.com">DB Hangops</a> - every other Wednesay at noon Pacific time<br />
<a href="http://www.mysql.com/news-and-events/events/">Upcoming MySQL events</a></p>
<p><strong>Training</strong><br />
<a href="http://www.skysql.com/services/training/schedule">SkySQL Trainings</a><br />
<a href="https://docs.continuent.com/wiki/display/TEDOC/Tungsten+University">Tungsten University trainings</a></p>
<p><a href="http://technocation.org/content/oursql-episode-140%3A-more-performance">read more</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70429&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=70429&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 17 May 2013 18:20:13 +0000</pubDate>
    <dc:creator>Technocation</dc:creator>
    <category>Podcasts</category>
    <category>Performance</category>
  </item>

  <item>
    <title>Log Buffer #320, A Carnival of the Vanities for DBAs</title>
    <guid isPermaLink="false">http://www.pythian.com/blog/?p=55171</guid>
    <link>http://www.pythian.com/blog/log-buffer-320-a-carnival-of-the-vanities-for-dbas/</link>
    <description>The red carpet has been laid down at this Log Buffer Edition, and you can witness and cheer the cat-walking blog posts from Oracle, SQL Server and MySQL. Every one of them is chic, elegant, sensual in its own right. Enjoy.
Oracle:
Create colored heat maps in SQL*Plus with Kyle Hailey.
Here’s a quick and dirty script to create a procedure (in the SYS schema – so be careful) to check the Hakan Factor for an object.
Connor has a good post about default null for collection parameter.
This is yet another blogpost on Oracle’s direct path read feature which was introduced for non-parallel query processes in Oracle version 11.
Owen Allen has seen some questions about provisioning Oracle Solaris 11. They boil down to this.
SQL Server:
Shashank Srivastava tells us as how to Change the SQL Server Instance Name after Renaming the Windows Host.
Daniel Calbimonte shares as how to synchronize two SSAS Servers.
Data Architecture underpins just about everything we do in IT.  Without a clear understanding of how data is structured, there is no reliable way to derive meaning from it.
Orlando Colamatteo is login-less in Seattle.
Lets get started testing database with tSQLt with Robert Sheldon.
MySQL:
After a lot of fuzz, Anders Karlsson is now releasing MyQuery version 3.5.1.
Nothing like reestablishing a tradition and Dave Stokes is doing just that for MySQL.
Mare Alff is spreading the word about the performance schema.
Slava Akhmechet talks about secondary indexes, batched inserts performance improvements, soft durability mode.
It is a central part of the MySQL philosophy to try and help you as much as you can. There are many occasions when it could tell you that what you are asking for is utterly stupid or give you a bad execution plan because &amp;#8220;you asked for it&amp;#8221;.
</description>
    <content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>The red carpet has been laid down at this Log Buffer Edition, and you can witness and cheer the cat-walking blog posts from Oracle, SQL Server and MySQL. Every one of them is chic, elegant, sensual in its own right. Enjoy.<br />
<span></span><strong>Oracle:</strong></p>
<p>Create colored heat maps in SQL*Plus with <a href="http://dboptimizer.com/2013/05/10/colored-heat-maps-in-sqlplus/">Kyle Hailey.</a></p>
<p>Here’s a quick and dirty script to create a procedure (in the SYS schema – so be careful) to check the <a href="http://jonathanlewis.wordpress.com/2013/05/10/hakan-factor/">Hakan</a> Factor for an object.</p>
<p><a href="http://connormcdonald.wordpress.com/2013/05/13/default-null-for-collection-parameter/">Connor</a> has a good post about default null for collection parameter.</p>
<p>This is yet another blogpost on <a href="http://fritshoogland.wordpress.com/2013/05/09/direct-path-read-and-fast-full-index-scans/">Oracle</a>’s direct path read feature which was introduced for non-parallel query processes in Oracle version 11.</p>
<p>Owen Allen has seen some questions about provisioning Oracle Solaris 11. They boil down to <a href="https://blogs.oracle.com/opscenter/entry/provisioning_oracle_solaris_111">this</a>.</p>
<p><strong>SQL Server:</strong></p>
<p><a href="http://www.sqlservercentral.com/articles/Administration/98346/">Shashank Srivastava</a> tells us as how to Change the SQL Server Instance Name after Renaming the Windows Host.</p>
<p><a href="http://www.mssqltips.com/sqlservertip/2938/how-to-synchronize-two-ssas-servers/">Daniel Calbimonte</a> shares as how to synchronize two SSAS Servers.</p>
<p><a href="http://dataarch.sqlpass.org/">Data</a> Architecture underpins just about everything we do in IT.  Without a clear understanding of how data is structured, there is no reliable way to derive meaning from it.</p>
<p><a href="http://www.sqlservercentral.com/articles/Security/98202/">Orlando Colamatteo</a> is login-less in Seattle.</p>
<p>Lets get started testing database with tSQLt with <a href="https://www.simple-talk.com/sql/t-sql-programming/getting-started-testing-databases-with-tsqlt/">Robert Sheldon</a>.</p>
<p><strong>MySQL:</strong></p>
<p>After a lot of fuzz, Anders Karlsson is now releasing <a href="http://karlssonondatabases.blogspot.com/2013/05/myquery-351-beta-released.html">MyQuery</a> version 3.5.1.</p>
<p>Nothing like reestablishing a tradition and Dave Stokes is doing just that for <a href="http://opensourcedba.wordpress.com/2013/05/16/reestablishing-a-mysql-tradition/">MySQL</a>.</p>
<p><a href="http://marcalff.blogspot.com/2013/05/spreading-word-about-performance-schema.html">Mare Alff</a> is spreading the word about the performance schema.</p>
<p><a href="http://rethinkdb.com/blog/1.5-release">Slava Akhmechet</a> talks about secondary indexes, batched inserts performance improvements, soft durability mode.</p>
<p>It is a central part of the <a href="http://optimize-this.blogspot.com/2013/05/the-outer-join-to-inner-join-coversion.html">MySQL</a> philosophy to try and help you as much as you can. There are many occasions when it could tell you that what you are asking for is utterly stupid or give you a bad execution plan because &#8220;you asked for it&#8221;.</p>
</div><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69919&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69919&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 17 May 2013 12:23:12 +0000</pubDate>
    <dc:creator>The Pythian Group</dc:creator>
    <category>Log Buffer</category>
    <category>MySQL</category>
    <category>Oracle</category>
    <category>SQL Server</category>
  </item>

  <item>
    <title>Replication Enhancements in MySQL 5.7: SHOW SLAVE STATUS NONBLOCKING</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-200162575501976303.post-3983276756436665644</guid>
    <link>http://myhadds.blogspot.com/2013/05/replication-enhancements-in-mysql-57.html</link>
    <description>2013 is on it's initial months and we already have 5.6 GA and the first release of 5.7, 5.7.1 DMR with lots of exciting new features, future is promising!A new feature added in replication was the NONBLOCKING option to SHOW SLAVE STATUS command.In the past if we stop slave during a big transaction, until the transaction was applied we cannot execute SHOW SLAVE STATUS to see the slave progress. The latter operation would block until the former finish, this would disable all external monitoring or third-party applications that need a immediate response from server.To solve this problem, NONBLOCKING option was added to SHOW SLAVE STATUS, when it is used we can obtain immediate response from server about slave progress. As a tradeoff, the returned info may not be the latest data but it won't block waiting for STOP SLAVE.This enhancement and many more can be downloaded from MySQL development releases page.</description>
    <content:encoded><![CDATA[2013 is on it's initial months and we already have 5.6 GA and the first release of 5.7, 5.7.1 DMR with lots of exciting <a href="http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-1.html" target="_blank">new features</a>, future is promising!<br /><br />A new feature added in replication was the NONBLOCKING option to SHOW SLAVE STATUS command.<br /><br />In the past if we stop slave during a big transaction, until the transaction was applied we cannot execute SHOW SLAVE STATUS to see the slave progress. The latter operation would block until the former finish, this would disable all external monitoring or third-party applications that need a immediate response from server.<br /><br />To solve this problem, NONBLOCKING option was added to <a href="http://dev.mysql.com/doc/refman/5.7/en/show-slave-status.html" target="_blank">SHOW SLAVE STATUS</a>, when it is used we can obtain immediate response from server about slave progress. As a tradeoff, the returned info may not be the latest data but it won't block waiting for STOP SLAVE.<br /><br />This enhancement and many more can be downloaded from MySQL <a href="http://dev.mysql.com/downloads/mysql/5.7.html" target="_blank">development releases page</a>.<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69920&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69920&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 17 May 2013 11:17:00 +0000</pubDate>
    <dc:creator>Nuno Carvalho</dc:creator>
    <category>MySQL</category>
    <category>replication</category>
  </item>

  <item>
    <title>Virident vCache vs. FlashCache: Part 2</title>
    <guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=15474</guid>
    <link>http://www.mysqlperformanceblog.com/2013/05/17/virident-vcache-vs-flashcache-part-2/</link>
    <description>This is the second part in a two-part series comparing Virident&amp;#8217;s vCache to FlashCache. The first part was focused on usability and feature comparison; in this post, we&amp;#8217;ll look at some sysbench test results.Disclosure: The research and testing conducted for this post were sponsored by Virident.First, some background information. All tests were conducted on Percona&amp;#8217;s Cisco UCS C250 test machine, and both the vCache and FlashCache tests used the same 2.2TB Virident FlashMAX II as the cache storage device. EXT4 is the filesystem, and CentOS 6.4 the operating system, although the pre-release modules I received from Virident required the use of the CentOS 6.2 kernel, 2.6.32-220, so that was the kernel in use for all of the benchmarks on both systems. The benchmark tool used was sysbench 0.5 and the version of MySQL used was Percona Server 5.5.30-rel30.1-465. Each test was allowed to run for 7200 seconds, and the first 3600 seconds were discarded as warmup time; the remaining 3600 seconds were averaged into 10-second intervals. All tests were conducted with approximately 78GiB of data (32 tables, 10M rows each) and a 4GiB buffer pool. The cache devices were flushed to disk immediately prior to and immediately following each test run.With that out of the way, let&amp;#8217;s look at some numbers.vCache vs. vCache &amp;#8211; MySQL parameter testingThe first test was designed to look solely at vCache performance under some different sets of MySQL configuration parameters. For example, given that the front-end device is a very fast PCIe SSD, would it make more sense to configure MySQL as if it were using SSD storage or to just use an optimized HDD storage configuration? After creating a vCache device with the default configuration, I started with a baseline HDD configuration for MySQL (configuration A, listed at the bottom of this post) and then tried three additional sets of experiments. First, the baseline configuration plus:  innodb_read_io_threads = 16 innodb_write_io_threads = 16  We call this configuration B. The next one contained four SSD-specific optimizations based partially on some earlier work that I&amp;#8217;d done with this Virident card (configuration C):  innodb_io_capacity = 30000 innodb_adaptive_flushing_method = keep_average innodb_flush_neighbor_pages=none innodb_max_dirty_pages_pct = 60  And then finally, a fourth test (configuration D) which combined the parameter changes from tests B and C. The graph below shows the sysbench throughput (tps) for these four configurations:  As we can see, all of the configuration options produce numbers that, in the absence of outliers, are roughly identical, but it&amp;#8217;s configuration C (shown in the graph as the blue line &amp;#8211; SSD config) which shows the most consistent performance. The others all have assorted performance drops scattered throughout the graph. We see the exact same pattern when looking at transaction latency; the baseline numbers are roughly identical for all four configurations, but configuration C avoids the spikes and produces a very constant and predictable result.vCache vs. FlashCache &amp;#8211; the basicsOnce I&amp;#8217;d determined that configuration C appeared to produce the most optimal results, I moved on to reviewing FlashCache performance versus that of vCache, and I also included a &amp;#8220;no cache&amp;#8221; test run as well using the base HDD MySQL configuration for purposes of comparison. Given the apparent differences in time-based flushing in vCache and FlashCache, both cache devices were set up so that time-based flushing was disabled. Also, both devices were set up such that all IO would be cached (i.e., no special treatment of sequential writes) and with a 50% dirty page threshold. Again, for comparison purposes, I also include the numbers from the vCache test where the time-based flushing is enabled.As we&amp;#8217;d expect, the HDD-only solution barely registered on the graph. With a buffer pool that&amp;#8217;s much smaller than the working set, the no-cache approach is fairly crippled and ineffectual. FlashCache does substantially better, coming in at an average of around 600 tps, but vCache is about 3x better. The interesting item here is that vCache with time-based flushing enabled actually produces better and more consistent performance than vCache without time-based flushing, but even at its worst, the vCache test without time-based flushing still outperforms FlashCache by over 2x, on average.Looking just at sysbench reads, vCache with time-based flushing consistently hit about 27000 per second, whereas without time-based flushing it averaged about 12500. FlashCache came in around 7500 or so. Sysbench writes came in just under 8000 for vCache + time-based flushing, around 6000 for vCache without time-based flushing, and somewhere around 2500 for FlashCache.We can take a look at some vmstat data to see what&amp;#8217;s actually happening on the system during all these various tests. Clockwise from the top left in the next graph, we have &amp;#8220;no cache&amp;#8221;, &amp;#8220;FlashCache&amp;#8221;, &amp;#8220;vCache with no time-based flushing&amp;#8221;, and &amp;#8220;vCache with time-based flushing.&amp;#8221; As the images demonstrate, the no-cache system is being crushed by IO wait. FlashCache and vCache both show improvements, but it&amp;#8217;s not until we get to vCache with the time-based flushing that we see some nice, predictable, constant performance.So why is it the case that vCache with time-based flushing appears to outperform all the rest? My hypothesis here is that time-based flushing allows the backing store to be written to at a more constant and, potentially, submaximal, rate compared to dirty-page-threshold flushing, which kicks in at a given level and then attempts to flush as quickly as possible to bring the dirty pages back within acceptable bounds. This is, however, only a hypothesis.vCache vs. FlashCache &amp;#8211; dirty page thresholdFinally, we examine the impact of a couple of different dirty-page ratios on device performance, since this is the only parameter which can be reliably varied between the two in the same way. The following graph shows sysbench OLTP performance for FlashCache vs. vCache with a 10% dirty threshold versus the same metrics at a 50% dirty threshold. Time-based flushing has been disabled. In this case, both systems produce better performance when the dirty-page threshold is set to 50%, but once again, vCache at 10% outperforms FlashCache at 10%.The one interesting item here is that vCache actually appears to get *better* over time; I&amp;#8217;m not entirely sure why that&amp;#8217;s the case or at what point the performance is going to level off since these tests were all run for 2 hours anyway, but I think the overall results still speak for themselves, and even with a vCache volume where the dirty ratio is only 10%, such as might be the case where a deployment has a massive data set size in relation to both the working set and the cache device size, the numbers are encouraging.ConclusionOverall, the I think the graphs speak for themselves. When the working set outstrips the available buffer pool memory but still fits into the cache device, vCache shines. Compared to a deployment with no SSD cache whatsoever, FlashCache still does quite well, massively outperforming the HDD-only setup, but it doesn&amp;#8217;t even really come close to the numbers obtained with vCache. There may be ways to adjust the FlashCache configuration to produce better or more consistent results, or results that are more inline with the numbers put up by vCache, but when we consider that overall usability was one of the evaluation points and combine that with the fact that the best vCache performance results were obtained with the default vCache configuration, I think vCache can be declared the clear winner.Base MySQL &amp;amp; Benchmark ConfigurationAll benchmarks were conducted with the following:  sysbench ­­--num­-threads=32 ­­--test=tests/db/oltp.lua ­­--oltp_tables_count=32 \ --oltp­-table­-size=10000000 ­­--rand­-init=on ­­--report­-interval=1 ­­--rand­-type=pareto \ --forced­-shutdown=1 ­­--max­-time=7200 ­­--max­-requests=0 ­­--percentile=95 ­­\ --mysql­-user=root --mysql­-socket=/tmp/mysql.sock ­­--mysql­-table­-engine=innodb ­­\ --oltp­-read­-only=off run The base MySQL configuration (configuration A) appears below:  #####fixed innodb options innodb_file_format = barracuda innodb_buffer_pool_size = 4G innodb_file_per_table = true innodb_data_file_path = ibdata1:100M innodb_flush_method = O_DIRECT innodb_log_buffer_size = 128M innodb_flush_log_at_trx_commit = 1 innodb_log_file_size = 1G innodb_log_files_in_group = 2 innodb_purge_threads = 1 innodb_fast_shutdown = 1 #not innodb options (fixed) back_log = 50 wait_timeout = 120 max_connections = 5000 max_prepared_stmt_count=500000 max_connect_errors = 10 table_open_cache = 10240 max_allowed_packet = 16M binlog_cache_size = 16M max_heap_table_size = 64M sort_buffer_size = 4M join_buffer_size = 4M thread_cache_size = 1000 query_cache_size = 0 query_cache_type = 0 ft_min_word_len = 4 thread_stack = 192K tmp_table_size = 64M server­id = 101 key_buffer_size = 8M read_buffer_size = 1M read_rnd_buffer_size = 4M bulk_insert_buffer_size = 8M myisam_sort_buffer_size = 8M myisam_max_sort_file_size = 10G myisam_repair_threads = 1 myisam_recover The post Virident vCache vs. FlashCache: Part 2 appeared first on MySQL Performance Blog.</description>
    <content:encoded><![CDATA[<p>This is the second part in a two-part series comparing Virident&#8217;s vCache to FlashCache. The first part was focused on usability and feature comparison; in this post, we&#8217;ll look at some sysbench test results.</p><p>Disclosure: The research and testing conducted for this post were sponsored by Virident.</p><p>First, some background information. All tests were conducted on <a href="http://www.percona.com/docs/wiki/benchmark%3Ahardware%3Acisco_ucs_c250" target="_blank">Percona&#8217;s Cisco UCS C250</a> test machine, and both the vCache and FlashCache tests used the same 2.2TB Virident FlashMAX II as the cache storage device. EXT4 is the filesystem, and CentOS 6.4 the operating system, although the pre-release modules I received from Virident required the use of the CentOS 6.2 kernel, 2.6.32-220, so that was the kernel in use for all of the benchmarks on both systems. The benchmark tool used was sysbench 0.5 and the version of MySQL used was Percona Server 5.5.30-rel30.1-465. Each test was allowed to run for 7200 seconds, and the first 3600 seconds were discarded as warmup time; the remaining 3600 seconds were averaged into 10-second intervals. All tests were conducted with approximately 78GiB of data (32 tables, 10M rows each) and a 4GiB buffer pool. The cache devices were flushed to disk immediately prior to and immediately following each test run.</p><p>With that out of the way, let&#8217;s look at some numbers.</p><h3>vCache vs. vCache &#8211; MySQL parameter testing</h3><p>The first test was designed to look solely at vCache performance under some different sets of MySQL configuration parameters. For example, given that the front-end device is a very fast PCIe SSD, would it make more sense to configure MySQL as if it were using SSD storage or to just use an optimized HDD storage configuration? After creating a vCache device with the default configuration, I started with a baseline HDD configuration for MySQL (configuration A, listed at the bottom of this post) and then tried three additional sets of experiments. First, the baseline configuration plus:<br
/> <code><br
/> innodb_read_io_threads = 16<br
/> innodb_write_io_threads = 16<br
/> </code><br
/> We call this configuration B. The next one contained four SSD-specific optimizations based partially on some earlier work that I&#8217;d done with this Virident card (configuration C):<br
/> <code><br
/> innodb_io_capacity = 30000<br
/> innodb_adaptive_flushing_method = keep_average<br
/> innodb_flush_neighbor_pages=none<br
/> innodb_max_dirty_pages_pct = 60<br
/> </code><br
/> And then finally, a fourth test (configuration D) which combined the parameter changes from tests B and C. The graph below shows the sysbench throughput (tps) for these four configurations:<br
/> <a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_trx_params.png"><img class="alignnone size-full wp-image-15482" alt="vcache_trx_params" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_trx_params.png" width="640" height="480" /></a><br
/> As we can see, all of the configuration options produce numbers that, in the absence of outliers, are roughly identical, but it&#8217;s configuration C (shown in the graph as the blue line &#8211; SSD config) which shows the most consistent performance. The others all have assorted performance drops scattered throughout the graph. We see the exact same pattern when looking at transaction latency; the baseline numbers are roughly identical for all four configurations, but configuration C avoids the spikes and produces a very constant and predictable result.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_response_params.png"><img class="alignnone size-full wp-image-15483" alt="vcache_response_params" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_response_params.png" width="640" height="480" /></a></p><h3>vCache vs. FlashCache &#8211; the basics</h3><p>Once I&#8217;d determined that configuration C appeared to produce the most optimal results, I moved on to reviewing FlashCache performance versus that of vCache, and I also included a &#8220;no cache&#8221; test run as well using the base HDD MySQL configuration for purposes of comparison. Given the apparent differences in time-based flushing in vCache and FlashCache, both cache devices were set up so that time-based flushing was disabled. Also, both devices were set up such that all IO would be cached (i.e., no special treatment of sequential writes) and with a 50% dirty page threshold. Again, for comparison purposes, I also include the numbers from the vCache test where the time-based flushing is enabled.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_fcache_trx_params.png"><img class="alignnone size-full wp-image-15484" alt="vcache_fcache_trx_params" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_fcache_trx_params.png" width="640" height="480" /></a></p><p>As we&#8217;d expect, the HDD-only solution barely registered on the graph. With a buffer pool that&#8217;s much smaller than the working set, the no-cache approach is fairly crippled and ineffectual. FlashCache does substantially better, coming in at an average of around 600 tps, but vCache is about 3x better. The interesting item here is that vCache with time-based flushing enabled actually produces better and more consistent performance than vCache without time-based flushing, but even at its worst, the vCache test without time-based flushing still outperforms FlashCache by over 2x, on average.</p><p>Looking just at sysbench reads, vCache with time-based flushing consistently hit about 27000 per second, whereas without time-based flushing it averaged about 12500. FlashCache came in around 7500 or so. Sysbench writes came in just under 8000 for vCache + time-based flushing, around 6000 for vCache without time-based flushing, and somewhere around 2500 for FlashCache.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_fcache_read_write.png"><img class="alignnone  wp-image-15485" alt="vcache_fcache_read_write" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache_fcache_read_write.png" width="720" height="270" /></a></p><p>We can take a look at some vmstat data to see what&#8217;s actually happening on the system during all these various tests. Clockwise from the top left in the next graph, we have &#8220;no cache&#8221;, &#8220;FlashCache&#8221;, &#8220;vCache with no time-based flushing&#8221;, and &#8220;vCache with time-based flushing.&#8221; As the images demonstrate, the no-cache system is being crushed by IO wait. FlashCache and vCache both show improvements, but it&#8217;s not until we get to vCache with the time-based flushing that we see some nice, predictable, constant performance.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/cpu-usage-all.png"><img class="alignnone  wp-image-15486" alt="cpu-usage-all" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/cpu-usage-all-1024x768.png" width="737" height="553" /></a></p><p>So why is it the case that vCache with time-based flushing appears to outperform all the rest? My hypothesis here is that time-based flushing allows the backing store to be written to at a more constant and, potentially, submaximal, rate compared to dirty-page-threshold flushing, which kicks in at a given level and then attempts to flush as quickly as possible to bring the dirty pages back within acceptable bounds. This is, however, only a hypothesis.</p><h3>vCache vs. FlashCache &#8211; dirty page threshold</h3><p>Finally, we examine the impact of a couple of different dirty-page ratios on device performance, since this is the only parameter which can be reliably varied between the two in the same way. The following graph shows sysbench OLTP performance for FlashCache vs. vCache with a 10% dirty threshold versus the same metrics at a 50% dirty threshold. Time-based flushing has been disabled. In this case, both systems produce better performance when the dirty-page threshold is set to 50%, but once again, vCache at 10% outperforms FlashCache at 10%.</p><p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache-dirty_trx_params.png"><img class="alignnone size-full wp-image-15487" alt="vcache-dirty_trx_params" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2013/05/vcache-dirty_trx_params.png" width="640" height="480" /></a></p><p>The one interesting item here is that vCache actually appears to get *better* over time; I&#8217;m not entirely sure why that&#8217;s the case or at what point the performance is going to level off since these tests were all run for 2 hours anyway, but I think the overall results still speak for themselves, and even with a vCache volume where the dirty ratio is only 10%, such as might be the case where a deployment has a massive data set size in relation to both the working set and the cache device size, the numbers are encouraging.</p><h3>Conclusion</h3><p>Overall, the I think the graphs speak for themselves. When the working set outstrips the available buffer pool memory but still fits into the cache device, vCache shines. Compared to a deployment with no SSD cache whatsoever, FlashCache still does quite well, massively outperforming the HDD-only setup, but it doesn&#8217;t even really come close to the numbers obtained with vCache. There may be ways to adjust the FlashCache configuration to produce better or more consistent results, or results that are more inline with the numbers put up by vCache, but when we consider that overall usability was one of the evaluation points and combine that with the fact that the best vCache performance results were obtained with the default vCache configuration, I think vCache can be declared the clear winner.</p><h3>Base MySQL &amp; Benchmark Configuration</h3><p>All benchmarks were conducted with the following:<br
/> <code><br
/> sysbench ­­--num­-threads=32 ­­--test=tests/db/oltp.lua ­­--oltp_tables_count=32 \<br
/> --oltp­-table­-size=10000000 ­­--rand­-init=on ­­--report­-interval=1 ­­--rand­-type=pareto \<br
/> --forced­-shutdown=1 ­­--max­-time=7200 ­­--max­-requests=0 ­­--percentile=95 ­­\<br
/> --mysql­-user=root --mysql­-socket=/tmp/mysql.sock ­­--mysql­-table­-engine=innodb ­­\<br
/> --oltp­-read­-only=off run<br
/> </code></p><p>The base MySQL configuration (configuration A) appears below:<br
/> <code><br
/> #####fixed innodb options<br
/> innodb_file_format = barracuda<br
/> innodb_buffer_pool_size = 4G<br
/> innodb_file_per_table = true<br
/> innodb_data_file_path = ibdata1:100M<br
/> innodb_flush_method = O_DIRECT<br
/> innodb_log_buffer_size = 128M<br
/> innodb_flush_log_at_trx_commit = 1<br
/> innodb_log_file_size = 1G<br
/> innodb_log_files_in_group = 2<br
/> innodb_purge_threads = 1<br
/> innodb_fast_shutdown = 1<br
/> #not innodb options (fixed)<br
/> back_log = 50<br
/> wait_timeout = 120<br
/> max_connections = 5000<br
/> max_prepared_stmt_count=500000<br
/> max_connect_errors = 10<br
/> table_open_cache = 10240<br
/> max_allowed_packet = 16M<br
/> binlog_cache_size = 16M<br
/> max_heap_table_size = 64M<br
/> sort_buffer_size = 4M<br
/> join_buffer_size = 4M<br
/> thread_cache_size = 1000<br
/> query_cache_size = 0<br
/> query_cache_type = 0<br
/> ft_min_word_len = 4<br
/> thread_stack = 192K<br
/> tmp_table_size = 64M<br
/> server­id = 101<br
/> key_buffer_size = 8M<br
/> read_buffer_size = 1M<br
/> read_rnd_buffer_size = 4M<br
/> bulk_insert_buffer_size = 8M<br
/> myisam_sort_buffer_size = 8M<br
/> myisam_max_sort_file_size = 10G<br
/> myisam_repair_threads = 1<br
/> myisam_recover<br
/> </code></p><p>The post <a href="http://www.mysqlperformanceblog.com/2013/05/17/virident-vcache-vs-flashcache-part-2/">Virident vCache vs. FlashCache: Part 2</a> appeared first on <a href="http://www.mysqlperformanceblog.com">MySQL Performance Blog</a>.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69418&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=69418&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Fri, 17 May 2013 10:00:56 +0000</pubDate>
    <dc:creator>MySQL Performance Blog</dc:creator>
    <category>Benchmarks</category>
    <category>Hardware and Storage</category>
    <category>MySQL</category>
    <category>Ernie Souhrada</category>
    <category>FlashCache</category>
    <category>MLC</category>
    <category>PCIe</category>
    <category>sysbench</category>
    <category>vCache</category>
    <category>Virident</category>
  </item>

  <item>
    <title>MyQuery 3.5.1 beta released!</title>
    <guid isPermaLink="false">tag:blogger.com,1999:blog-9144505959002328789.post-4449469162256345380</guid>
    <link>http://karlssonondatabases.blogspot.com/2013/05/myquery-351-beta-released.html</link>
    <description>After a lot of fuzz, I am now releasing MyQuery version 3.5.1. This version introduces one big feature, a brand new Dictionary viewer. In addition to that, there are numerous bug fixes and the removal of one feature, which is the option to run with just 1 connection: In this version, 2 connections will always be used, and I have some good reasons to remove this as being optional, fact is, running with 1 connection was hard to diagnose, caused a lot of problems, and had no real benefit actually, just drawbacks.So, for you Windows users, MyQuery 3.5.1 is now out there, but it is really a beta. The beta is caused by the new Dictionary viewer, the rest should be pretty stable.Download it from sourceforge.Happy SQLing/Karlsson</description>
    <content:encoded><![CDATA[After a lot of fuzz, I am now releasing MyQuery version 3.5.1. This version introduces one big feature, a brand new Dictionary viewer. In addition to that, there are numerous bug fixes and the removal of one feature, which is the option to run with just 1 connection: In this version, 2 connections will always be used, and I have some good reasons to remove this as being optional, fact is, running with 1 connection was hard to diagnose, caused a lot of problems, and had no real benefit actually, just drawbacks.<br /><br />So, for you Windows users, MyQuery 3.5.1 is now out there, but it is really a beta. The beta is caused by the new Dictionary viewer, the rest should be pretty stable.<br /><br />Download it from <a href="http://sourceforge.net/projects/myquery/" target="_blank">sourceforge</a>.<br /><br />Happy SQLing<br />/Karlsson<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68297&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68297&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 22:38:00 +0000</pubDate>
    <dc:creator>Anders Karlsson</dc:creator>
    <category>mysql windows query</category>
  </item>

  <item>
    <title>Reestablishing a MySQL Tradition</title>
    <guid isPermaLink="false">http://opensourcedba.wordpress.com/?p=1338</guid>
    <link>http://opensourcedba.wordpress.com/2013/05/16/reestablishing-a-mysql-tradition/</link>
    <description>Every so often you see something from the past and wonder &amp;#8220;Why don&amp;#8217;t we do that anymore?&amp;#8221;  Well, in this case it was a former co-worker wearing his MySQL Contributor shirt. This is Antony Curtis in one of the original MySQL Community Contributor shirt So the MySQL Community Team had a quick meeting and the result is that we are reestablishing the tradition.  So if you have a signed Oracle Contributor Agreement and have contributed to MySQL, you should have in your inbox a request for your shirt size and a shipping address.  If you do not see an email and you qualify for a short, let us know (we probably have an old email on record for you).   And if you are working on some code for MySQL and have that OCA ready but not filed, please expedite your actions so you do not miss out on this batch.
   </description>
    <content:encoded><![CDATA[<p>Every so often you see something from the past and wonder &#8220;Why don&#8217;t we do that anymore?&#8221;  Well, in this case it was a former co-worker wearing his MySQL Contributor shirt. <div><a href="http://opensourcedba.files.wordpress.com/2013/05/contribshirt.jpg"><img src="http://opensourcedba.files.wordpress.com/2013/05/contribshirt.jpg?w=222&amp;h=300" alt="This is Antony Curtis in the original Community Contributor shit" width="222" height="300" class="size-medium wp-image-1339" /></a><p>This is Antony Curtis in one of the original MySQL Community Contributor shirt</p></div> So the MySQL Community Team had a quick meeting and the result is that we are reestablishing the tradition.  So if you have a signed Oracle Contributor Agreement and have contributed to MySQL, you should have in your inbox a request for your shirt size and a shipping address.  If you do not see an email and you qualify for a short, let us know (we probably have an old email on record for you).   And if you are working on some code for MySQL and have that OCA ready but not filed, please expedite your actions so you do not miss out on this batch.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/opensourcedba.wordpress.com/1338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/opensourcedba.wordpress.com/1338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=opensourcedba.wordpress.com&amp;blog=15386988&amp;post=1338&amp;subd=opensourcedba&amp;ref=&amp;feed=1" width="1" height="1" /><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68296&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68296&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 16:45:06 +0000</pubDate>
    <dc:creator>Dave Stokes</dc:creator>
    <category>community team</category>
  </item>

  <item>
    <title>Understanding Tokutek Fractal Tree Indexes</title>
    <guid isPermaLink="false">http://effectiveMySQL.com/?p=916</guid>
    <link>http://effectivemysql.com/article/understanding-tokutek-fractal-tree-indexes/</link>
    <description>

Download PDF Presentation

Thanks to Tim Callaghan for speaking Tuesday night at the Effective MySQL New York meetup on  Fractal Tree Indexes : Theory and Practice (MySQL and MongoDB).  There was a good turnout and a full room to learn how the TokuDB storage engine from Tokutek is changing how to handle big data in MySQL.  
Also interesting is how the same technology has been applied for use in MongoDB including giving MongoDB transactions; a big change for NoSQL. 
Related News:  Tokutek Meets Big Data Demand With Open Source TokuDB</description>
    <content:encoded><![CDATA[<div>
<a href="http://effectivemysql.com/downloads/20130514-nyc-effective-mysql-toku-mysql-mongo.pdf" alt="download link"><img src="http://effectivemysql.com/images/type-pdf.gif" alt="download pdf" /></a><br />
<a href="http://effectivemysql.com/downloads/20130514-nyc-effective-mysql-toku-mysql-mongo.pdf" alt="download link">Download PDF Presentation</a>
</div>
<p>Thanks to Tim Callaghan for speaking Tuesday night at the Effective MySQL New York meetup on  <a href="http://www.meetup.com/EffectiveMySQL/events/108932962/">Fractal Tree Indexes : Theory and Practice (MySQL and MongoDB)</a>.  There was a good turnout and a full room to learn how the TokuDB storage engine from <a href="http://tokutek.com">Tokutek</a> is changing how to handle big data in MySQL.  </p>
<p>Also interesting is how the same technology has been applied for use in MongoDB including giving MongoDB transactions; a big change for NoSQL. </p>
<p>Related News:  <a href="http://online.wsj.com/article/PR-CO-20130422-907104.html">Tokutek Meets Big Data Demand With Open Source TokuDB</a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68192&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=68192&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
    <pubDate>Thu, 16 May 2013 14:40:45 +0000</pubDate>
    <dc:creator>Effective MySQL</dc:creator>
    <category>Article</category>
    <category>Indexes</category>
    <category>Storage Engines</category>
    <category>compression</category>
    <category>performance</category>
    <category>storage engine</category>
    <category>tokutek</category>
  </item>

</channel>
</rss>
