<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Gary Pendergast &#187; MySQL 5.1</title>
	<atom:link href="http://pento.net/tag/mysql-51/feed/" rel="self" type="application/rss+xml" />
	<link>http://pento.net</link>
	<description>I&#039;m on the Internet</description>
	<lastBuildDate>Wed, 08 Sep 2010 07:04:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<cloud domain='pento.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Don&#8217;t put a NULL in the IN clause in 5.1</title>
		<link>http://pento.net/2009/04/08/dont-put-a-null-in-the-in-clause-in-51/</link>
		<comments>http://pento.net/2009/04/08/dont-put-a-null-in-the-in-clause-in-51/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 07:36:08 +0000</pubDate>
		<dc:creator>Gary Pendergast</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL 5.1]]></category>
		<category><![CDATA[optimizer]]></category>
		<category><![CDATA[regression]]></category>
		<guid isPermaLink="false">http://pento.net/?p=173</guid>
		<description><![CDATA[There seems to be an optimizer problem in 5.1, if you put a NULL in the IN clause of a SELECT. For example, given the following table: CREATE TABLE foo &#40; a INT NOT NULL AUTO_INCREMENT, PRIMARY KEY &#40;a&#41; &#41;; Compare these two EXPLAINs: mysql&#62; EXPLAIN * FROM foo WHERE a IN &#40;160000, 160001, 160002&#41;\G [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be an optimizer problem in 5.1, if you put a NULL in the IN clause of a SELECT. For example, given the following table:</p>
<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> foo <span style="color: #FF00FF;">&#40;</span>
    a <span style="color: #999900; font-weight: bold;">INT</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">AUTO_INCREMENT</span><span style="color: #000033;">,</span>
    <span style="color: #990099; font-weight: bold;">PRIMARY KEY</span> <span style="color: #FF00FF;">&#40;</span>a<span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span></pre></div></div>
<p>Compare these two EXPLAINs:</p>
<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;">mysql<span style="color: #CC0099;">&gt;</span> <span style="color: #990099; font-weight: bold;">EXPLAIN</span> <span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">FROM</span> foo <span style="color: #990099; font-weight: bold;">WHERE</span> a <span style="color: #990099; font-weight: bold;">IN</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">160000</span><span style="color: #000033;">,</span> <span style="color: #008080;">160001</span><span style="color: #000033;">,</span> <span style="color: #008080;">160002</span><span style="color: #FF00FF;">&#41;</span>\G
<span style="color: #CC0099;">***************************</span> <span style="color: #008080;">1.</span> row <span style="color: #CC0099;">***************************</span>
           id: <span style="color: #008080;">1</span>
  select_type: <span style="color: #990099; font-weight: bold;">SIMPLE</span>
        <span style="color: #990099; font-weight: bold;">table</span>: foo
         <span style="color: #990099; font-weight: bold;">type</span>: range
possible_keys: PRIMARY
          <span style="color: #990099; font-weight: bold;">key</span>: PRIMARY
      key_len: <span style="color: #008080;">4</span>
          ref: <span style="color: #9900FF; font-weight: bold;">NULL</span>
         rows: <span style="color: #008080;">3</span>
        Extra: <span style="color: #990099; font-weight: bold;">Using</span> <span style="color: #990099; font-weight: bold;">where</span>
<span style="color: #008080;">1</span> row <span style="color: #990099; font-weight: bold;">in</span> <span style="color: #990099; font-weight: bold;">set</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">0.06</span> sec<span style="color: #FF00FF;">&#41;</span>
&nbsp;
mysql<span style="color: #CC0099;">&gt;</span> <span style="color: #990099; font-weight: bold;">EXPLAIN</span> <span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">FROM</span> foo <span style="color: #990099; font-weight: bold;">WHERE</span> a <span style="color: #990099; font-weight: bold;">IN</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span> <span style="color: #008080;">160000</span><span style="color: #000033;">,</span> <span style="color: #008080;">160001</span><span style="color: #000033;">,</span> <span style="color: #008080;">160002</span><span style="color: #FF00FF;">&#41;</span>\G
<span style="color: #CC0099;">***************************</span> <span style="color: #008080;">1.</span> row <span style="color: #CC0099;">***************************</span>
           id: <span style="color: #008080;">1</span>
  select_type: <span style="color: #990099; font-weight: bold;">SIMPLE</span>
        <span style="color: #990099; font-weight: bold;">table</span>: foo
         <span style="color: #990099; font-weight: bold;">type</span>: <span style="color: #990099; font-weight: bold;">ALL</span>
possible_keys: PRIMARY
          <span style="color: #990099; font-weight: bold;">key</span>: <span style="color: #9900FF; font-weight: bold;">NULL</span>
      key_len: <span style="color: #9900FF; font-weight: bold;">NULL</span>
          ref: <span style="color: #9900FF; font-weight: bold;">NULL</span>
         rows: <span style="color: #008080;">327680</span>
        Extra: <span style="color: #990099; font-weight: bold;">Using</span> <span style="color: #990099; font-weight: bold;">where</span>
<span style="color: #008080;">1</span> row <span style="color: #990099; font-weight: bold;">in</span> <span style="color: #990099; font-weight: bold;">set</span> <span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">0.00</span> sec<span style="color: #FF00FF;">&#41;</span></pre></div></div>
<p>In the query with the NULL, it does a full table scan. So, if you&#8217;ve run into this problem under MySQL 5.1, the workaround is to remove the NULL. This doesn&#8217;t affect MySQL 4.x or 5.0. </p>
<p>You can also follow along with <a href="http://bugs.mysql.com/44139">Bug #33139</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://pento.net/2009/04/08/dont-put-a-null-in-the-in-clause-in-51/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading MySQL with minimal downtime through Replication</title>
		<link>http://pento.net/2009/02/24/upgrading-mysql-with-minimal-downtime-through-replication/</link>
		<comments>http://pento.net/2009/02/24/upgrading-mysql-with-minimal-downtime-through-replication/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 03:22:17 +0000</pubDate>
		<dc:creator>Gary Pendergast</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL 5.1]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[upgrade]]></category>
		<guid isPermaLink="false">http://pento.net/?p=96</guid>
		<description><![CDATA[Problem With the release of MySQL 5.1, many DBAs are going to be scheduling downtime to upgrade their MySQL Server. As with all upgrades between major version numbers, it requires one of two upgrade paths: Dump/reload: The safest method of upgrading, but it takes out your server for quite some time, especially if you have [...]]]></description>
			<content:encoded><![CDATA[<h2>Problem</h2>
<p>With the release of MySQL 5.1, many DBAs are going to be scheduling downtime to upgrade their MySQL Server. As with all upgrades between major version numbers, it requires one of two upgrade paths:</p>
<ul>
<li>Dump/reload: The safest method of upgrading, but it takes out your server for quite some time, especially if you have a large data set.</li>
<li>mysql_upgrade: A much faster method, but it can still be slow for very large data sets.</li>
</ul>
<p>I&#8217;m here to present a third option. It requires minimal application downtime, and is reasonably simple to prepare for and perform.</p>
<h2>Preparation</h2>
<p>First of all, you&#8217;re going to need a second server (which I&#8217;ll refer to as S2). It will act as a &#8216;stand-in&#8217;, while the main server (which I&#8217;ll refer to as S1) is upgraded. Once S2 is ready to go, you can begin the preparation:</p>
<ul>
<li>If you haven&#8217;t already, enable <a title="MySQL 5.0 Reference Manual: The Binary Log" href="http://dev.mysql.com/doc/refman/5.0/en/binary-log.html">Binary Logging</a> on S1. We will need it to act as a replication Master.</li>
<li>Add an extra bit of functionality to your backup procedure. You will need to store the Binary Log position from when the backup was taken.
<ul>
<li>If you&#8217;re using mysqldump, simply add the &#8211;master-data option to your mysqldump call.</li>
<li>If you&#8217;re using InnoDB Hot Backup, there&#8217;s no need to make a change.  The Binary Log position is shown when you restore the backup.</li>
<li>For other backup methods, you will probably need to get the Binary Log position manually:
<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">FLUSH</span> <span style="color: #993333; font-weight: bold;">TABLES</span> <span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #993333; font-weight: bold;">READ</span> <span style="color: #993333; font-weight: bold;">LOCK</span>;
mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SHOW</span> MASTER <span style="color: #993333; font-weight: bold;">STATUS</span>;
<span style="color: #66cc66;">&#40;</span>Perform backup now<span style="color: #66cc66;">...</span><span style="color: #66cc66;">&#41;</span>
mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">UNLOCK</span> <span style="color: #993333; font-weight: bold;">TABLES</span>;</pre></div></div>
</li>
</ul>
<p>Once you have a backup with the corresponding Binary Log position, you can setup S2:</p>
<ul>
<li>Install MySQL 5.1 on S2.</li>
<li>Restore the backup from S1 to S2.</li>
<li><a title="MySQL 5.1 Reference Manual: Creating a User for Replication" href="http://dev.mysql.com/doc/refman/5.1/en/replication-howto-repuser.html">Create the Slave user on S1</a>.</li>
<li>Enter the Slave settings on S2. You should familiarise yourself with the <a title="MySQL 5.1 Reference Manual: How to Set Up Replication" href="http://dev.mysql.com/doc/refman/5.1/en/replication-howto.html">Replication documentation</a>.</li>
<li>Enable Binary Logging on S2. We&#8217;ll need this during the upgrade process.</li>
<li>Setup S2 as a Slave of S1:
<ul>
<li>If you used mysqldump for the backup, you will need to run the following query:
<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">CHANGE</span> MASTER <span style="color: #993333; font-weight: bold;">TO</span> MASTER_HOST<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'S2.ip.address'</span><span style="color: #66cc66;">,</span> MASTER_USER<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'repl_user'</span><span style="color: #66cc66;">,</span> MASTER_PASSWORD<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'repl_password'</span>;</pre></div></div>
</li>
<li>For any other method, you&#8217;ll need to specify the Binary Log position as well:
<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">CHANGE</span> MASTER <span style="color: #993333; font-weight: bold;">TO</span> MASTER_HOST<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'S2.ip.address'</span><span style="color: #66cc66;">,</span> MASTER_USER<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'repl_user'</span><span style="color: #66cc66;">,</span> MASTER_PASSWORD<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'repl_password'</span><span style="color: #66cc66;">,</span> MASTER_LOG_FILE<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'mysql-bin.nnnnnnn'</span><span style="color: #66cc66;">,</span> MASTER_LOG_POS<span style="color: #66cc66;">=</span>mmmmmmmm;</pre></div></div>
</li>
</ul>
</li>
<li>Start the Slave on S2:
<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">&gt;</span> START SLAVE;</pre></div></div>
</li>
</ul>
<p>The major pre-upgrade work is now complete.</p>
<h2>Upgrade</h2>
<p>Just before beginning the upgrade, take a backup of S2. For speed, I&#8217;d recommend running the following queries, then shutting down the MySQL server and copying the data files for the backup.</p>
<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">&gt;</span> STOP SLAVE;
mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">SHOW</span> MASTER <span style="color: #993333; font-weight: bold;">STATUS</span>;</pre></div></div>
<p>Once the backup is complete, restart S2 and let it catch up with S1 again.</p>
<p>When you&#8217;re ready to begin the upgrade, you will need a minor outage. Stop your application, and let S2 catch up with S1. Once it has caught up, they will have identical data. So, switch your application to using S2 instead of S1. Your application can continue running unaffected while you upgrade S1 server.</p>
<ul>
<li>Stop the Slave process on S2:
<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">&gt;</span> STOP SLAVE;</pre></div></div>
</li>
<li>Stop S1.</li>
<li>Upgrade S1 to MySQL 5.1.</li>
<li>Move the S1 data files to a backup location.</li>
<li>Move the backup from S2 into S1&#8242;s data directory.</li>
<li>Start S2.</li>
<li>Setup S1 as a Slave to S2, same as when we made S2 a Slave of S1.</li>
<li>Let S1 catch up with S2. When it has caught up, stop your application, and make sure S1 is still caught up with S2.</li>
<li>Switch your application back to using S1.</li>
</ul>
<p>Complete! Hooray! You just need to run a couple of queries on S1 to clean up the Slave settings:</p>
<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">&gt;</span> STOP SLAVE;
mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">CHANGE</span> MASTER <span style="color: #993333; font-weight: bold;">TO</span> MASTER_HOST<span style="color: #66cc66;">=</span><span style="color: #ff0000;">''</span>;</pre></div></div>
<h2>Conclusion</h2>
<p>You can keep the outage to only a few minutes while performing this upgrade, removing the need for potentially expensive downtime. If you need the downtime to be zero, you probably want to be looking at a <a title="Advanced MySQL Replication Techniques: Circular Replication" href="http://www.onlamp.com/pub/a/onlamp/2006/04/20/advanced-mysql-replication.html">Circular Replication</a> system, though that&#8217;s getting a little outside of this blog post.</p>
]]></content:encoded>
			<wfw:commentRss>http://pento.net/2009/02/24/upgrading-mysql-with-minimal-downtime-through-replication/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Replication with InnoDB and MyISAM Transactions</title>
		<link>http://pento.net/2009/02/13/replication-with-innodb-and-myisam-transactions/</link>
		<comments>http://pento.net/2009/02/13/replication-with-innodb-and-myisam-transactions/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 05:26:57 +0000</pubDate>
		<dc:creator>Gary Pendergast</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL 5.1]]></category>
		<category><![CDATA[RBR]]></category>
		<category><![CDATA[regression]]></category>
		<category><![CDATA[replication]]></category>
		<guid isPermaLink="false">http://pento.net/blog/?p=3</guid>
		<description><![CDATA[There&#8217;s a change of behaviour in MySQL 5.1.31 for Row Based Replication, if you have InnoDB transactions that also write to a MyISAM (or other non-transactional engine) table. It&#8217;s a side effect of fixing Bug #40116. Take this simple example: Transaction 1: INSERT INTO myisam_tbl &#40;item, val&#41; VALUES &#40;1, 0&#41;; Transaction 1: INSERT INTO innodb_tbl [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a change of behaviour in MySQL 5.1.31 for Row Based Replication, if you have InnoDB transactions that also write to a MyISAM (or other non-transactional engine) table. It&#8217;s a side effect of fixing <a title="MySQL Bug #40116: Uncommited changes are replicated and stay on slave after rollback on master" href="http://bugs.mysql.com/40116">Bug #40116</a>. Take this simple example:</p>
<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">Transaction <span style="color: #cc66cc;">1</span>: <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> myisam_tbl <span style="color: #66cc66;">&#40;</span>item<span style="color: #66cc66;">,</span> val<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
Transaction <span style="color: #cc66cc;">1</span>: <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> innodb_tbl <span style="color: #66cc66;">&#40;</span>item<span style="color: #66cc66;">,</span> val<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">-</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">,</span> <span style="color: #66cc66;">-</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
Transaction <span style="color: #cc66cc;">1</span>: START TRANSACTION;
Transaction <span style="color: #cc66cc;">1</span>: <span style="color: #993333; font-weight: bold;">UPDATE</span> myisam_tbl <span style="color: #993333; font-weight: bold;">SET</span> val<span style="color: #66cc66;">=</span>val<span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">WHERE</span> item<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span>;
Transaction <span style="color: #cc66cc;">1</span>: <span style="color: #993333; font-weight: bold;">UPDATE</span> innodb_tbl <span style="color: #993333; font-weight: bold;">SET</span> val<span style="color: #66cc66;">=</span><span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> val <span style="color: #993333; font-weight: bold;">FROM</span> myisam_tbl <span style="color: #993333; font-weight: bold;">WHERE</span> item<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> item<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span>;
Transaction <span style="color: #cc66cc;">2</span>: START TRANSACTION;
Transaction <span style="color: #cc66cc;">2</span>: <span style="color: #993333; font-weight: bold;">UPDATE</span> myisam_tbl <span style="color: #993333; font-weight: bold;">SET</span> val<span style="color: #66cc66;">=</span>val<span style="color: #66cc66;">+</span><span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">WHERE</span> item<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span>;
Transaction <span style="color: #cc66cc;">2</span>: <span style="color: #993333; font-weight: bold;">UPDATE</span> innodb_tbl <span style="color: #993333; font-weight: bold;">SET</span> val<span style="color: #66cc66;">=</span><span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> val <span style="color: #993333; font-weight: bold;">FROM</span> myisam_tbl <span style="color: #993333; font-weight: bold;">WHERE</span> item<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> item<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">2</span>;
Transaction <span style="color: #cc66cc;">2</span>: COMMIT;
Transaction <span style="color: #cc66cc;">1</span>: COMMIT;</pre></div></div>
<p>After this, the Master innodb_tbl would look like this:</p>
<table>
<tbody>
<tr>
<th>item</th>
<th>val</th>
</tr>
<tr>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>And the Master myisam_tbl will look like this:</p>
<table>
<tbody>
<tr>
<th>item</th>
<th>val</th>
</tr>
<tr>
<td>1</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>In 5.1.30 and earlier, the Slave tables will be correct. However, in 5.1.31, the Slave myisam_tbl will be correct, but the innodb_tbl will look like this:</p>
<table>
<tbody>
<tr>
<th>item</th>
<th>val</th>
</tr>
<tr>
<td>1</td>
<td>0</td>
</tr>
<tr>
<td>2</td>
<td>1</td>
</tr>
</tbody>
</table>
<p>As a bonus, there&#8217;s no workaround. Statement Based Replication has never worked for this case. For an SBR Slave (In MySQL 5.0.x and 5.1.x), the Slave myisam_tbl will be correct, but the Slave innodb_tbl will look like this:</p>
<table>
<tbody>
<tr>
<th>item</th>
<th>val</th>
</tr>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
</tr>
</tbody>
</table>
<p>And so, we come to the moral of the story. Don&#8217;t use non-transactional tables in the middle of a transaction. Ever. You will only cause yourself more pain than you can possibly imagine. Instead, move the writes to the non-transactional tables outside of the transaction.</p>
]]></content:encoded>
			<wfw:commentRss>http://pento.net/2009/02/13/replication-with-innodb-and-myisam-transactions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
