<?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"
	>
<channel>
	<title>Comments on: How I patched InnoDB to show locks held</title>
	<atom:link href="http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/</link>
	<description>Stay curious!</description>
	<pubDate>Tue, 07 Oct 2008 03:07:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14117</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Sat, 29 Dec 2007 23:28:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14117</guid>
		<description>Dathan,

Sometimes, yes, but row locks are held until the transaction commits, so of course even short-running statements can block things.  In most of the cases I've needed to track down, it's usually something like "update table1 join client... set table1.clientname=client.nickname" and then the client table's rows are locked until the transaction commits.  Take a poorly-behaved program that doesn't commit for a while, add 99 other things running at the same time, and it's basically impossible to figure out who really has the lock you need to kill and un-freeze the works.

I've been spending some time in the InnoDB source trying to figure out if there's a way to just see which transaction holds the lock, but I don't know the code that well.  (The locking code is pretty complicated).  That would be my preferred solution.</description>
		<content:encoded><![CDATA[<p>Dathan,</p>
<p>Sometimes, yes, but row locks are held until the transaction commits, so of course even short-running statements can block things.  In most of the cases I&#8217;ve needed to track down, it&#8217;s usually something like &#8220;update table1 join client&#8230; set table1.clientname=client.nickname&#8221; and then the client table&#8217;s rows are locked until the transaction commits.  Take a poorly-behaved program that doesn&#8217;t commit for a while, add 99 other things running at the same time, and it&#8217;s basically impossible to figure out who really has the lock you need to kill and un-freeze the works.</p>
<p>I&#8217;ve been spending some time in the InnoDB source trying to figure out if there&#8217;s a way to just see which transaction holds the lock, but I don&#8217;t know the code that well.  (The locking code is pretty complicated).  That would be my preferred solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dathan Pattishall</title>
		<link>http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14116</link>
		<dc:creator>Dathan Pattishall</dc:creator>
		<pubDate>Fri, 28 Dec 2007 20:13:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14116</guid>
		<description>Just showing the process list and looking for the longest running process on a table can also give information as to what connection is holding the lock. 

Other then the cool show status variable that allows for easy graphing, what other information does this show? I'd like to get information as to why the table lock is established, and why it's taking so long.

Some suggestions that may answer these questions:

What about showing the number of rows the lock needs to hold as an indicator to why the lock is across the entire table?

A page to row conversion, to see which processes are trying to operate on the same page/row, which could be an indicator as to why a lock across the table is needed.

This is some great work with a bunch of expandable information.</description>
		<content:encoded><![CDATA[<p>Just showing the process list and looking for the longest running process on a table can also give information as to what connection is holding the lock. </p>
<p>Other then the cool show status variable that allows for easy graphing, what other information does this show? I&#8217;d like to get information as to why the table lock is established, and why it&#8217;s taking so long.</p>
<p>Some suggestions that may answer these questions:</p>
<p>What about showing the number of rows the lock needs to hold as an indicator to why the lock is across the entire table?</p>
<p>A page to row conversion, to see which processes are trying to operate on the same page/row, which could be an indicator as to why a lock across the table is needed.</p>
<p>This is some great work with a bunch of expandable information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14109</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Tue, 25 Dec 2007 14:19:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14109</guid>
		<description>Hi Ben,

Thanks, and a merry Christmas to you as well!</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>Thanks, and a merry Christmas to you as well!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14108</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Tue, 25 Dec 2007 12:30:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14108</guid>
		<description>ps. Merry Christmas and a prosperous new year!!!!</description>
		<content:encoded><![CDATA[<p>ps. Merry Christmas and a prosperous new year!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14107</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Tue, 25 Dec 2007 12:28:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/12/21/how-i-patched-innodb-to-show-locks-held/#comment-14107</guid>
		<description>This comment/request does not belong in this section but i couln't trace your contacts so .....
first off...thanks for the great set of tools they make MySQL more bearable!!!!
My request - a tool that allows general and/or specific query logging on a per database and/or table basis
That would definately help troubleshoot source of corrupted data in a table, etc</description>
		<content:encoded><![CDATA[<p>This comment/request does not belong in this section but i couln&#8217;t trace your contacts so &#8230;..<br />
first off&#8230;thanks for the great set of tools they make MySQL more bearable!!!!<br />
My request - a tool that allows general and/or specific query logging on a per database and/or table basis<br />
That would definately help troubleshoot source of corrupted data in a table, etc</p>
]]></content:encoded>
	</item>
</channel>
</rss>
