<?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: InnoDB not releasing a row lock?</title>
	<atom:link href="http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/feed/" rel="self" type="application/rss+xml" />
	<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/</link>
	<description>Everything In Life Is Random! (Personal and Work)</description>
	<lastBuildDate>Sat, 19 May 2012 00:06:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Locked rows in mediawiki-db &#171; Logbuffer-Blog</title>
		<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/comment-page-1/#comment-10302</link>
		<dc:creator>Locked rows in mediawiki-db &#171; Logbuffer-Blog</dc:creator>
		<pubDate>Tue, 29 Jun 2010 13:21:54 +0000</pubDate>
		<guid isPermaLink="false">http://venublog.com/?p=284#comment-10302</guid>
		<description>[...] Venu Anuganti wrote about an odd locking-problem with MySQLs InnoDB-Engine which I verified on a [...]</description>
		<content:encoded><![CDATA[<p>[...] Venu Anuganti wrote about an odd locking-problem with MySQLs InnoDB-Engine which I verified on a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heikki Tuuri</title>
		<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/comment-page-1/#comment-3836</link>
		<dc:creator>Heikki Tuuri</dc:creator>
		<pubDate>Mon, 19 May 2008 15:04:47 +0000</pubDate>
		<guid isPermaLink="false">http://venublog.com/?p=284#comment-3836</guid>
		<description>Venu,

thank you for noticing this. I replied in the forum:

on the REPEATABLE READ level, the user who has executed INSERT ... and received a duplicate key error, now knows that a duplicate exists. It makes sense to keep the lock on the duplicate, as then the execution is serializable for the user who received the duplicate key error. REPEATABLE READ in InnoDB is a serializable level, except for consistent read SELECTs.

On the READ COMMITTED level, I do not see any reason for InnoDB to keep the lock on the duplicate. It would make sense to release it.

I have now filed:
http://bugs.mysql.com/bug.php?id=36801

Best regards,

Heikki</description>
		<content:encoded><![CDATA[<p>Venu,</p>
<p>thank you for noticing this. I replied in the forum:</p>
<p>on the REPEATABLE READ level, the user who has executed INSERT &#8230; and received a duplicate key error, now knows that a duplicate exists. It makes sense to keep the lock on the duplicate, as then the execution is serializable for the user who received the duplicate key error. REPEATABLE READ in InnoDB is a serializable level, except for consistent read SELECTs.</p>
<p>On the READ COMMITTED level, I do not see any reason for InnoDB to keep the lock on the duplicate. It would make sense to release it.</p>
<p>I have now filed:<br />
<a href="http://bugs.mysql.com/bug.php?id=36801" rel="nofollow">http://bugs.mysql.com/bug.php?id=36801</a></p>
<p>Best regards,</p>
<p>Heikki</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rosetee</title>
		<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/comment-page-1/#comment-3238</link>
		<dc:creator>rosetee</dc:creator>
		<pubDate>Thu, 08 May 2008 23:27:39 +0000</pubDate>
		<guid isPermaLink="false">http://venublog.com/?p=284#comment-3238</guid>
		<description>I would say it is a bug if  you are in autocommit mode. If you are using transaction mode it is trivial whether the DB releases the lock or not before  the txn is either rolledback or commited.</description>
		<content:encoded><![CDATA[<p>I would say it is a bug if  you are in autocommit mode. If you are using transaction mode it is trivial whether the DB releases the lock or not before  the txn is either rolledback or commited.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rosetee</title>
		<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/comment-page-1/#comment-3237</link>
		<dc:creator>rosetee</dc:creator>
		<pubDate>Thu, 08 May 2008 23:26:36 +0000</pubDate>
		<guid isPermaLink="false">http://venublog.com/?p=284#comment-3237</guid>
		<description>I would say it is a bug if  you are in autocommit mode. If you are using transaction mode it is trivial whether the DB releases the lock or not before  the txn is either or commited.</description>
		<content:encoded><![CDATA[<p>I would say it is a bug if  you are in autocommit mode. If you are using transaction mode it is trivial whether the DB releases the lock or not before  the txn is either or commited.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Bergen</title>
		<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/comment-page-1/#comment-2937</link>
		<dc:creator>Eric Bergen</dc:creator>
		<pubDate>Mon, 05 May 2008 21:37:13 +0000</pubDate>
		<guid isPermaLink="false">http://venublog.com/?p=284#comment-2937</guid>
		<description>Locking in innodb is such that innodb doesn&#039;t know which statements set a lock, only which transactions. Since the transaction isn&#039;t rolled back locks associated with it will still be valid until it&#039;s either rolled back or committed.</description>
		<content:encoded><![CDATA[<p>Locking in innodb is such that innodb doesn&#8217;t know which statements set a lock, only which transactions. Since the transaction isn&#8217;t rolled back locks associated with it will still be valid until it&#8217;s either rolled back or committed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Venu Anuganti</title>
		<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/comment-page-1/#comment-2922</link>
		<dc:creator>Venu Anuganti</dc:creator>
		<pubDate>Mon, 05 May 2008 18:02:17 +0000</pubDate>
		<guid isPermaLink="false">http://venublog.com/?p=284#comment-2922</guid>
		<description>The problem is even on READ COMMITTED I get blocked; It can be relaxed for REPEATABLE READ</description>
		<content:encoded><![CDATA[<p>The problem is even on READ COMMITTED I get blocked; It can be relaxed for REPEATABLE READ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Venu Anuganti</title>
		<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/comment-page-1/#comment-2921</link>
		<dc:creator>Venu Anuganti</dc:creator>
		<pubDate>Mon, 05 May 2008 17:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://venublog.com/?p=284#comment-2921</guid>
		<description>The doc says &quot;A duplicate-key error rolls back the SQL statement, if you have not specified the IGNORE option in your statement. &quot;; but apparently thats not the case.</description>
		<content:encoded><![CDATA[<p>The doc says &#8220;A duplicate-key error rolls back the SQL statement, if you have not specified the IGNORE option in your statement. &#8220;; but apparently thats not the case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Bergen</title>
		<link>http://venublog.com/2008/05/05/innodb-not-releasing-a-row-lock/comment-page-1/#comment-2920</link>
		<dc:creator>Eric Bergen</dc:creator>
		<pubDate>Mon, 05 May 2008 17:41:37 +0000</pubDate>
		<guid isPermaLink="false">http://venublog.com/?p=284#comment-2920</guid>
		<description>It&#039;s a feature of innodb to roll back the statement that caused the error and not the entire transaction in some cases. Things like deadlocks will rollback the entire transaction but duplicate key and other errors that are detected in the sql layer will only rollback the current transaction. 

There are some details here http://dev.mysql.com/doc/refman/5.0/en/innodb-error-handling.html</description>
		<content:encoded><![CDATA[<p>It&#8217;s a feature of innodb to roll back the statement that caused the error and not the entire transaction in some cases. Things like deadlocks will rollback the entire transaction but duplicate key and other errors that are detected in the sql layer will only rollback the current transaction. </p>
<p>There are some details here <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-error-handling.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/innodb-error-handling.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

