<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>PHP, the universe and all the rest - MySQL</title>
    <link>http://www.php-groupies.de/blogs/</link>
    <description>PHP Groupie since 1999 </description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.0.3 - http://www.s9y.org/</generator>
    <pubDate>Fri, 14 Sep 2012 07:51:16 GMT</pubDate>

    <image>
        <url>http://www.php-groupies.de/blogs/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: PHP, the universe and all the rest - MySQL - PHP Groupie since 1999 </title>
        <link>http://www.php-groupies.de/blogs/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Happy Birthday Bug# 30994, here is a present for you ...</title>
    <link>http://www.php-groupies.de/blogs/archives/54-Happy-Birthday-Bug-30994,-here-is-a-present-for-you-....html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/54-Happy-Birthday-Bug-30994,-here-is-a-present-for-you-....html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=54</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;One of the MySQL bugs having &lt;a href=&quot;http://php-groupies.de/mysql-bugs/2012-09-13.html&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;birthday&lt;/a&gt; today is &lt;a href=&quot;http://bugs.mysql.com/30994&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;Bug #30994&lt;/a&gt; which i filed five years ago.&lt;/p&gt;

&lt;p&gt;So i decided to give it a little birthday present by finally writing a patch for it myself:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://code.launchpad.net/~hartmut-php/maria/5.5-bug30994&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;https://code.launchpad.net/~hartmut-php/maria/5.5-bug30994&lt;/a&gt;&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Thu, 13 Sep 2012 21:01:05 +0200</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/54-guid.html</guid>
    
</item>
<item>
    <title>MySQL Bug Anniversaries</title>
    <link>http://www.php-groupies.de/blogs/archives/53-MySQL-Bug-Anniversaries.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/53-MySQL-Bug-Anniversaries.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=53</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;Ten years ago today the first public bug was filed on bugs.mysql.com.&lt;/p&gt;

&lt;p&gt;As we also stumbled across an unfixed bug today that was reported almost exactly two years ago i came up with the idea of writing a little script that would report all bugs filed on exactly the same day one or more years ago that are still in an &amp;quot;active&amp;quot; state (open, verified, etc.).&lt;/p&gt;

&lt;p&gt;The list for today can be found at&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://php-groupies.de/mysql-bugs/2012-09-12.html&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;http://php-groupies.de/mysql-bugs/2012-09-12.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And as i was already on it i also created a RSS feed for this at&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://php-groupies.de/mysql-bugs/bugs.rss&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;http://php-groupies.de/mysql-bugs/bugs.rss&lt;/a&gt;&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Wed, 12 Sep 2012 20:14:28 +0200</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/53-guid.html</guid>
    
</item>
<item>
    <title>Fun with Cluster and Locking</title>
    <link>http://www.php-groupies.de/blogs/archives/50-Fun-with-Cluster-and-Locking.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/50-Fun-with-Cluster-and-Locking.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=50</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=50</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve been dealing with MySQL Cluster in one way or another since around 2005 or so (back in the MySQL 4.1 days) but it is still full of &amp;quot;funny&amp;quot; surprises. This post is a collection of different locking related issue i ran into during the previous weeks that i had not been aware of up to now (or simply may have forgotten over time)&lt;/p&gt;

&lt;p&gt;== Unique hash indexes lock exclusively ==&lt;/p&gt;

&lt;p&gt;This is the one that regular users are most likely to run into: in general row logs in MySQL Cluster distinguish between reads and writes so that writers can block other writers, but not readers and readers from other transactions always see the last committed row value (Cluster currently only supports the READ COMMITTED isolation level). As soon as you have a secondary unique index in addition to a primary key things are different though. Internally a unique index that is not the primary key is implemented as a unique hash index in Cluster (and optionally also as an additional ordered T-Tree), and for unique hash entries there only seems to be exclusive locking so that writers will block readers across transactions.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;http://bugs.mysql.com/65086&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;http://bugs.mysql.com/65086&lt;/a&gt; for actual examples.&lt;/p&gt;

&lt;p&gt;== Long running transactions can block starting nodes ==&lt;/p&gt;

&lt;p&gt;Less likely to happen, but very annoying if it happens and you don&#039;t know about it:&lt;/p&gt;

&lt;p&gt;A starting node needs to lock all rows for a very short period of time near the end of start phase 5. At this point it needs to wait for all current transaction to free the locks they are holding (by either COMMIT or ROLLBACK). This is usually not a problem as cluster transaction are not supposed to last very long anyway, but if there happens to be a long running transaction it can potentially block a node start forever. A stopping node will wait for pending transactions for 5 seconds and will then terminate these transactions the hard way, a starting node on the other hand will gracefully wait forever.&lt;/p&gt;

&lt;p&gt;This is bad in two ways:&lt;/p&gt;

&lt;p&gt;1) it is obviously bad availability wise as you may end up with a non-redundant configuration for extended periods of time and without any way to automatically identify and terminate the offending transaction(s)&lt;/p&gt;

&lt;p&gt;2) currently the blocked starting node does not even tell what it is waiting for, it just silently sits and waits. So unless you know what is going on you are faced with a node that is simply stuck without doing anything (CPU, disc and network load next to zero)&lt;/p&gt;

&lt;p&gt;The related bug report is &lt;a href=&quot;http://bugs.mysql.com/65037&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;http://bugs.mysql.com/65037&lt;/a&gt; , proposed solutions are meaningful log messages in the short term and killing active transactions after a grace period in the long run.&lt;/p&gt;

&lt;p&gt;== Weird error message on lock timeout ==&lt;/p&gt;

&lt;p&gt;This last item is related to the non-standard INSERT ... ON DUPLICATE KEY UPDATE construct. What can happen here is that the INSERT part fails with a lock wait timeout as the key is write locked by another transaction. The expected error message in this case would simply be &amp;quot;Lock wait timeout exceed&amp;quot; but what you&#039;ll actually get is &amp;quot;Transaction already aborted&amp;quot;. What seems to happen here is that the ON DUPLICATE KEY UPDATE part is triggered by any error in the INSERT phase and not only by duplicate key violation. So the INSERT part is tried tried, fails with &amp;quot;Lock wait timeout&amp;quot; (which implicitly rolls back the current transaction), next the UPDATE part is tried, fails with &amp;quot;Transaction already aborted&amp;quot; and overwrites the previous error ...&lt;/p&gt;

&lt;p&gt;The related bug report is &lt;a href=&quot;http://bugs.mysql.com/65130&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;http://bugs.mysql.com/65130&lt;/a&gt;&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Fri, 27 Apr 2012 19:22:44 +0200</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/50-guid.html</guid>
    
</item>
<item>
    <title>Partition fun again, today with ARCHIVE</title>
    <link>http://www.php-groupies.de/blogs/archives/47-Partition-fun-again,-today-with-ARCHIVE.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/47-Partition-fun-again,-today-with-ARCHIVE.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=47</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=47</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;After the fun with InnoDB and MyISAM and massive partitioning it&#039;s time to move on to some other storage engines. So for the next round of fun i chose ARCHIVE:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;  mysql&amp;gt; create table t1 (id int primary key auto_increment, val int) 
      engine=archive partition by hash(id) partitions 1023;
  Query OK, 0 rows affected (0.26 sec)

  mysql&amp;gt; insert into t1 values(NULL,1);
  ERROR 1194 (HY000): Table &#039;t1&#039; is marked as crashed 
      and should be repaired

  mysql&amp;gt; drop table t1; 
  ERROR 2013 (HY000): Lost connection to MySQL server 
      during query&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;PS: MariaDB does not seem to be affected ...&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Fri, 06 Apr 2012 18:50:00 +0200</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/47-guid.html</guid>
    
</item>
<item>
    <title>A different kind of static?</title>
    <link>http://www.php-groupies.de/blogs/archives/48-A-different-kind-of-static.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/48-A-different-kind-of-static.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=48</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=48</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;While actually trying to check for something completely different (more on that later maybe)&lt;br /&gt;
i found that mysql, mysqladmin and other client binaries in my MySQL 5.5 install dir did&lt;br /&gt;
not list libmysqlclient.so as a dependency in ldd output anymore. Looks as if since the&lt;br /&gt;
switch to Cmake it gets statically linked into all the bundled client libraries and so&lt;br /&gt;
increases binary sizes by a factor of about 10x now, and i can&#039;t see any Cmake build&lt;br /&gt;
option that would produce the old behavior either.&lt;/p&gt;

&lt;p&gt;So my /usr/local/mysql-5.5.21/bin directory now uses 130MB instead of the 17MB that&lt;br /&gt;
the /usr/local/mysql-5.1.60/bin one used. Doesn&#039;t sound much by itself, but for &lt;br /&gt;
someone like me who tries to keep as many versions as possible installed in parallel&lt;br /&gt;
for testing purposes it sums up to several GB quickly, and it totally defies the&lt;br /&gt;
purpose of having a shared libmysqlclient.so in the first place ... &lt;img src=&quot;http://www.php-groupies.de/blogs/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Mon, 12 Mar 2012 10:30:55 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/48-guid.html</guid>
    
</item>
<item>
    <title>Fun with partitions and MyISAM, part #2</title>
    <link>http://www.php-groupies.de/blogs/archives/46-Fun-with-partitions-and-MyISAM,-part-2.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/46-Fun-with-partitions-and-MyISAM,-part-2.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=46</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=46</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;This is part of the reply i got on my &lt;a href=&quot;http://bugs.mysql.com/bug.php?id=64498&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;bug report&lt;/a&gt; on the ALTER TABLE issue with MyISAM and a large number of partitions from my &lt;a href=&quot;http://www.php-groupies.de/blogs/archives/44-More-fun-with-partitions,-this-time-with-MyISAM.html&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;previous post&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;This is a design limitation, MyISAM have one file handle open for the .MYI file shared by all instances of one table, and one file handle open for each table instance for the .MYD file. And the ha_partition generic partitioning engine  always open all partitions when opening a table/handler.&lt;/p&gt;

&lt;/blockquote&gt;
&lt;p&gt;So this should not only affect ALTER TABLE but all operations on MyISAM tables with large number of partitions should eventually run into this. Lets try and see what happens ...&lt;/p&gt;

 &lt;br /&gt;&lt;a href=&quot;http://www.php-groupies.de/blogs/archives/46-Fun-with-partitions-and-MyISAM,-part-2.html#extended&quot;&gt;Continue reading &quot;Fun with partitions and MyISAM, part #2&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 07 Mar 2012 05:29:36 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/46-guid.html</guid>
    
</item>
<item>
    <title>More fun with partitions, this time with MyISAM</title>
    <link>http://www.php-groupies.de/blogs/archives/44-More-fun-with-partitions,-this-time-with-MyISAM.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/44-More-fun-with-partitions,-this-time-with-MyISAM.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=44</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=44</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    
&lt;pre&gt;&lt;code&gt;mysql&amp;gt; CREATE TABLE t1 (id INT PRIMARY KEY ) 
             engine=myisam PARTITION BY HASH(id) PARTITIONS 1000;
Query OK, 0 rows affected (0.18 sec)

mysql&amp;gt; alter table t1 add column v int;
ERROR 1016 (HY000): Can&#039;t open file: &#039;./test/t1.frm&#039; (errno: 24)

mysql&amp;gt; quit
Bye

$ perror 24
OS error code  24:  Too many open files&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Looks as if MyISAM tries to open all the 1000 partition .MYD/.MYI files at once and runs out of file handles during this operation ...&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Wed, 29 Feb 2012 14:22:59 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/44-guid.html</guid>
    
</item>
<item>
    <title>Some fun with partitions and InnoDB ...</title>
    <link>http://www.php-groupies.de/blogs/archives/43-Some-fun-with-partitions-and-InnoDB-....html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/43-Some-fun-with-partitions-and-InnoDB-....html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=43</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=43</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;Creating or dropping a partitioned table on InnoDB can become a quite expensive operation, on my laptop i&#039;m seeing the following times for a simple table with 100 or 1000 partitions (using 5.1.58 right now as i&#039;m testing on stock Ubuntu 11.10):&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;  mysql&amp;gt; CREATE TABLE t1 (id INT PRIMARY KEY )
               engine=innodb PARTITION BY HASH(id) PARTITIONS 100;
  Query OK, 0 rows affected (5.21 sec)

  mysql&amp;gt; drop table t1;
  Query OK, 0 rows affected (5.11 sec)

  mysql&amp;gt; CREATE TABLE t1 (id INT PRIMARY KEY )
               engine=innodb PARTITION BY HASH(id) PARTITIONS 1000;
  Query OK, 0 rows affected (52.76 sec)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So the time to create a partitioned InnoDB table grows linearly with the number of partitions at a &#039;speed&#039; of about 20 partitions per second, and during that time the hard disk LED is always on. The rate for creating regular InnoDB tables on this machine is about 10 tables per second by the way.&lt;/p&gt;

&lt;p&gt;MyIsam on the other had can create around 17 tables per second, and creating a single partitioned MyISAM table only takes about a 10th of a second.&lt;/p&gt;

&lt;p&gt;So what is going on with InnoDB here? First of all from the engines point of view each partition of a partitioned table is an actual table, all the partitioning magic happens on a layer above the storage engine one, and the storage engine only receives handler requests for the actual partition tables involved. On the storage engine layer the actual engines are not aware that these tables are part of a larger partitioned table at all (with the exception of ndbcluster tables, but MySQL Cluster is a different story in this respect anyway).&lt;/p&gt;

&lt;p&gt;So when creating an InnoDB table with 1000 partitions the InnoDB storage engine actually receives 1000 individual requests to create a table. Now what seems to happen is that for each&lt;br /&gt;
created partition/table InnoDB flushes at least its internal data dictionary to disk. Given the constant disk activity and rather low internal table creation rate it may even do a full checkpoint for each table, i haven&#039;t checked the details on this yet. And when dropping a partitioned table the same thing happens in reverse.&lt;/p&gt;

&lt;p&gt;So this may be something to keep in mind when planning to use large numbers of partitions on InnoDB ...&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Wed, 29 Feb 2012 12:55:36 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/43-guid.html</guid>
    
</item>
<item>
    <title>MySQL features i forgot about #1 : slave_compressed_protocol</title>
    <link>http://www.php-groupies.de/blogs/archives/42-MySQL-features-i-forgot-about-1-slave_compressed_protocol.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/42-MySQL-features-i-forgot-about-1-slave_compressed_protocol.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=42</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=42</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;It is probably about time to re-read the MySQL manual end-to-end as i more and more find myself discovering features i either completely forgot about or which i never was aware of in the first place ...&lt;/p&gt;

&lt;p&gt;Todays guest is &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/replication-options-slave.html#sysvar_slave_compressed_protocol&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;slave_compressed_protocol&lt;/a&gt;, an option that has probably been there ever since MySQL 3.23 at least (so that i can&#039;t claim that i seem to have missed the ChangeLog entry as i usually do &lt;img src=&quot;http://www.php-groupies.de/blogs/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;

&lt;p&gt;With slave_compressed_protocol enabled the communication between slave and master uses the MYSQL_OPT_COMPRESS option to compress the protocol stream if both sides support it (and it&#039;s very unlikely to find an installation that does *not* support it these days), so this can be a big savior if your master and slave are at different sites with only limited bandwidth between the two.&lt;/p&gt;

&lt;p&gt;Unfortunately this is a global server option though, IMHO this should be part of the options provided by the CHANGE MASTER command, similar to all the SSL encryption related stuff that is part of CHANGE MASTER.&lt;/p&gt;

&lt;p&gt;Looks as if it is about time for YAFR (Yet Another Feature Request) ...&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Thu, 23 Feb 2012 06:10:40 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/42-guid.html</guid>
    
</item>
<item>
    <title>Overriding bind=... in included MySQL option files</title>
    <link>http://www.php-groupies.de/blogs/archives/40-Overriding-bind...-in-included-MySQL-option-files.html</link>
            <category>MySQL</category>
            <category>Puppet</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/40-Overriding-bind...-in-included-MySQL-option-files.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=40</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=40</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;Debian and Ubuntu make use of the &lt;b&gt;!includedir&lt;/b&gt; directive at the end of the packaged &lt;b&gt;my.cnf&lt;/b&gt; to allow for extending and overriding their default configuration without having to modify the distribution config file.&lt;/p&gt;

&lt;p&gt;This is especially nice in combination with configuration tools like &lt;b&gt;puppet&lt;/b&gt; as it is usually much easier to add a file to the system than to modify an existing file.&lt;/p&gt;

&lt;p&gt;I ran into a small gotcha with this though: the default my.cnf binds mysqld to the localhost TCP interface so that it listens IP 127.0.0.1 only. To make the mysql server reachable from other hosts the &lt;b&gt;bind=127.0.0.1&lt;/b&gt; setting needs to be overwritten.&lt;br /&gt;
How to change the binding to a different IP should be obvious, but how to disable an existing binding completely if you want your mysqld to listen on all available interfaces?&lt;/p&gt;

&lt;p&gt;The most obvious would be to simply say&lt;/p&gt;

&lt;p&gt;bind=&lt;/p&gt;

&lt;p&gt;, this does not have any effect though. What needs to be done instead is&lt;/p&gt;

&lt;p&gt;bind=0.0.0.0&lt;/p&gt;

&lt;p&gt;to make mysqld listen on all interfaces again.&lt;/p&gt;

&lt;p&gt;This is obviously a solution for IPv4 only, for allowing incoming connections from all v4 and v6 interfaces allowing &lt;b&gt;bind=&lt;/b&gt; without any argument to reset any existing bindings would probably be more clever?&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Tue, 04 Oct 2011 08:29:10 +0200</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/40-guid.html</guid>
    
</item>
<item>
    <title>MySQL Conference talk slides</title>
    <link>http://www.php-groupies.de/blogs/archives/38-MySQL-Conference-talk-slides.html</link>
            <category>MySQL</category>
            <category>OSM</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/38-MySQL-Conference-talk-slides.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=38</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=38</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;Slides for my two MySQL Conference talks are now available from the O&#039;Reilly conference site:&lt;/p&gt;


&lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://en.oreilly.com/mysql2011/public/schedule/detail/17383&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;From Map to Web - OpenStreetMap -&amp;gt; (PostGIS|MySQL|SpatiaLite) -&amp;gt; Openlayers&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://assets.en.oreilly.com/1/event/56/A%20code%20stub%20generator%20for%20MySQL%20and%20Drizzle%20plugins%20Presentation%201.pdf&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;A code stub generator for MySQL and Drizzle plugins&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

 
    </content:encoded>

    <pubDate>Fri, 15 Apr 2011 18:53:55 +0200</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/38-guid.html</guid>
    
</item>
<item>
    <title>Why go with O(n) if you can have O(n²)?</title>
    <link>http://www.php-groupies.de/blogs/archives/37-Why-go-with-On-if-you-can-have-On.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/37-Why-go-with-On-if-you-can-have-On.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=37</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=37</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;Found this while waiting for the CSV export of a search result from (*undisclosed project*) ...&lt;/p&gt;

&lt;p&gt;The export took almost half an hour even though it was just extracting the snail mail addresses of about 40K contacts, so what caused it to only spit out about 20 rows per second? Looking at the PROCESSLIST output a pattern was easy to detect. What greeted me was a single running query which had only been running for a few seconds even though i was already waiting for export results for about 20 minutes:&lt;/p&gt;

&lt;p&gt;SELECT ... LIMIT 32900, 100;&lt;/p&gt;

&lt;p&gt;And then a few seconds later:&lt;/p&gt;

&lt;p&gt;SELECT ... LIMIT 33000, 100;&lt;/p&gt;

&lt;p&gt;So instead of retrieving the search results for export by firing a single query and processing the results in one go the same pagination logic seemed to be used as for displaying search results. About 400 queries instead of a single one, and each iteration taking more query time, with finally the last one taking about the same time as the only query in the all-at-once alone.&lt;/p&gt;

&lt;p&gt;Somewhere, somehow, something terribly went wrong it seems ....&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Thu, 03 Mar 2011 10:49:01 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/37-guid.html</guid>
    
</item>
<item>
    <title>MySQL Plugin generator now supporting system variables</title>
    <link>http://www.php-groupies.de/blogs/archives/28-MySQL-Plugin-generator-now-supporting-system-variables.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/28-MySQL-Plugin-generator-now-supporting-system-variables.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=28</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=28</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;http://pear.php.net/package/CodeGen_MySQL_Plugin/&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;CodeGen_MySQL_Plugin&lt;/a&gt; had basic support for status variables (for &lt;b&gt;SHOW STATUS&lt;/b&gt;) for quite a while, now it also has basic support for system variables (&lt;b&gt;SHOW [GLOBAL|SESSION] VARIABLES&lt;/b&gt;, &lt;b&gt;SET&lt;/b&gt;) in the 0.9.2 package version i just released as well &lt;img src=&quot;http://www.php-groupies.de/blogs/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;

 &lt;br /&gt;&lt;a href=&quot;http://www.php-groupies.de/blogs/archives/28-MySQL-Plugin-generator-now-supporting-system-variables.html#extended&quot;&gt;Continue reading &quot;MySQL Plugin generator now supporting system variables&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 16 Feb 2009 08:28:26 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/28-guid.html</guid>
    
</item>
<item>
    <title>MySQL UDF generator finally supporting windows</title>
    <link>http://www.php-groupies.de/blogs/archives/27-MySQL-UDF-generator-finally-supporting-windows.html</link>
            <category>MySQL</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/27-MySQL-UDF-generator-finally-supporting-windows.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=27</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=27</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;So i finally defeated my &#039;inner Schweinehund&#039; and set up a working Windows development system again. Using the Visual Studio C++ 2008 Express edition i&#039;m now able to compile UDF projects generated by &lt;b&gt;&lt;a href=&quot;http://pear.php.net/package/CodeGen_MySQL_UDF/&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;CodeGen_MySQL_UDF&lt;/a&gt;&lt;/b&gt; aka. &lt;b&gt;udf-gen&lt;/b&gt;, and the &lt;b&gt;udf-gen&lt;/b&gt; script now works natively on Windows, too.&lt;/p&gt;

 &lt;br /&gt;&lt;a href=&quot;http://www.php-groupies.de/blogs/archives/27-MySQL-UDF-generator-finally-supporting-windows.html#extended&quot;&gt;Continue reading &quot;MySQL UDF generator finally supporting windows&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 11 Feb 2009 09:04:42 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/27-guid.html</guid>
    
</item>
<item>
    <title>Speaking at the MySQL User Conference 2008</title>
    <link>http://www.php-groupies.de/blogs/archives/26-Speaking-at-the-MySQL-User-Conference-2008.html</link>
            <category>MySQL</category>
            <category>PHP</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/26-Speaking-at-the-MySQL-User-Conference-2008.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=26</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=26</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;&lt;a href=&quot;http://www.mysqluc.com/&quot;&gt;&lt;img src=&quot;http://www.php-groupies.de/blogs/uploads/mysql2008_banner_speaker_336x280.gif&quot; align=&quot;left&quot; width=&quot;336&quot; height=&quot;280&quot; alt=&quot;mysql2008_banner_speaker_336x280.gif&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I&#039;m talking at the MySQL User Conference once again this year presenting my &lt;a href=&quot;http://en.oreilly.com/mysql2008/public/schedule/detail/116&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;Code Generators for MySQL Plugins and User Defined Functions&lt;/a&gt; in a formal session this time after my original &amp;quot;pizza &amp;amp; hacking&amp;quot; session on this topic on the 2006 UC (which ended up in hacking some other things on the way first ... photographs may follow ...).&lt;/p&gt;

&lt;p&gt;The &lt;span title=&quot;Something that plugs in&quot; class=&quot;serendipity_glossaryMarkup&quot;&gt;plugin&lt;/span&gt; and UDF code generators are based on the same foundation as my &amp;quot;pecl-gen&amp;quot; generator for PHP extensions so this might be of interest for hardcore PHP folks, too.&lt;/p&gt;

&lt;p&gt;For more information see the &lt;a href=&quot;http://en.oreilly.com/mysql2008/public/schedule/detail/116&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;Conference Schedule&lt;/a&gt;.&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Thu, 06 Mar 2008 16:14:54 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/26-guid.html</guid>
    
</item>

</channel>
</rss>