<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: A little-known way to cause a database deadlock</title>
	<atom:link href="http://www.xaprb.com/blog/2006/08/03/a-little-known-way-to-cause-a-database-deadlock/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2006/08/03/a-little-known-way-to-cause-a-database-deadlock/</link>
	<description>Stay curious!</description>
	<lastBuildDate>Thu, 09 Feb 2012 20:41:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: thushara</title>
		<link>http://www.xaprb.com/blog/2006/08/03/a-little-known-way-to-cause-a-database-deadlock/#comment-18906</link>
		<dc:creator>thushara</dc:creator>
		<pubDate>Sat, 13 Nov 2010 22:29:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=207#comment-18906</guid>
		<description>clear post. i used this to get a good understanding on the concept. i had a different problem of multiple concurrent inserts deadlocking without a select doing a table scan. it seems to be a similar issue:

http://thushw.blogspot.com/2010/11/mysql-deadlocks-with-concurrent-inserts.html</description>
		<content:encoded><![CDATA[<p>clear post. i used this to get a good understanding on the concept. i had a different problem of multiple concurrent inserts deadlocking without a select doing a table scan. it seems to be a similar issue:</p>
<p><a href="http://thushw.blogspot.com/2010/11/mysql-deadlocks-with-concurrent-inserts.html" rel="nofollow">http://thushw.blogspot.com/2010/11/mysql-deadlocks-with-concurrent-inserts.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aliende</title>
		<link>http://www.xaprb.com/blog/2006/08/03/a-little-known-way-to-cause-a-database-deadlock/#comment-18213</link>
		<dc:creator>aliende</dc:creator>
		<pubDate>Tue, 27 Apr 2010 16:40:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=207#comment-18213</guid>
		<description>Wonderful! This clearly shows how the gap locking works. This was not so clear to me when i was reading the MySQL- manual on locking.</description>
		<content:encoded><![CDATA[<p>Wonderful! This clearly shows how the gap locking works. This was not so clear to me when i was reading the MySQL- manual on locking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/08/03/a-little-known-way-to-cause-a-database-deadlock/#comment-1394</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Tue, 08 Aug 2006 19:17:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=207#comment-1394</guid>
		<description>&lt;p&gt;Peter of MySQL Performance Blog wrote a very informative article on &lt;a href=&quot;http://www.mysqlperformanceblog.com/2006/08/06/select-lock-in-share-mode-and-for-update/&quot;&gt;how locking and transaction isolation levels work in InnoDB&lt;/a&gt;.  Then I asked questions in the comments and he replied.  It is well worth reading the article and the comments!&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Peter of MySQL Performance Blog wrote a very informative article on <a href="http://www.mysqlperformanceblog.com/2006/08/06/select-lock-in-share-mode-and-for-update/">how locking and transaction isolation levels work in InnoDB</a>.  Then I asked questions in the comments and he replied.  It is well worth reading the article and the comments!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://www.xaprb.com/blog/2006/08/03/a-little-known-way-to-cause-a-database-deadlock/#comment-1343</link>
		<dc:creator>Mark Callaghan</dc:creator>
		<pubDate>Sat, 05 Aug 2006 17:35:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=207#comment-1343</guid>
		<description>&lt;p&gt;InnoDB gets share locks on rows read from the selected table for statements of the form (create&#124;update&#124;delete&#124;insert) .... select ... from ....
This is done so that a replica will read the same values as the master for the select. Unfortunately, these share locks are taken when the binlog is disabled, and the set of statements for which the locks are taken has changed from 4.0.20 to 4.0.26 to 4.1 to 5.x (thus the apparent &#039;randomness&#039;). Depending on the version that you use, innodb_locks_unsafe_for_binlog may prevent the locks from being taken.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>InnoDB gets share locks on rows read from the selected table for statements of the form (create|update|delete|insert) &#8230;. select &#8230; from &#8230;.<br />
This is done so that a replica will read the same values as the master for the select. Unfortunately, these share locks are taken when the binlog is disabled, and the set of statements for which the locks are taken has changed from 4.0.20 to 4.0.26 to 4.1 to 5.x (thus the apparent &#8216;randomness&#8217;). Depending on the version that you use, innodb_locks_unsafe_for_binlog may prevent the locks from being taken.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Cole</title>
		<link>http://www.xaprb.com/blog/2006/08/03/a-little-known-way-to-cause-a-database-deadlock/#comment-1337</link>
		<dc:creator>Jeremy Cole</dc:creator>
		<pubDate>Sat, 05 Aug 2006 03:36:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=207#comment-1337</guid>
		<description>&lt;p&gt;Hi Baron,&lt;/p&gt;

&lt;p&gt;Fair enough, but mucking with the core server&#039;s locking in order to make replication (decidedly, an add-on) work correctly seems like the wrong approach.  Perhaps the right approach would be to (at least optionally) allow you to have the INSERT ... SELECT converted into either plain INSERT or optimally LOAD DATA INFILE with the file in-lined in the binlog.&lt;/p&gt;

&lt;p&gt;Ugliness...&lt;/p&gt;

&lt;p&gt;Regards,&lt;/p&gt;

&lt;p&gt;Jeremy&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hi Baron,</p>
<p>Fair enough, but mucking with the core server&#8217;s locking in order to make replication (decidedly, an add-on) work correctly seems like the wrong approach.  Perhaps the right approach would be to (at least optionally) allow you to have the INSERT &#8230; SELECT converted into either plain INSERT or optimally LOAD DATA INFILE with the file in-lined in the binlog.</p>
<p>Ugliness&#8230;</p>
<p>Regards,</p>
<p>Jeremy</p>
]]></content:encoded>
	</item>
</channel>
</rss>

