<?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: Recent Work on Improving Drizzle&#8217;s Storage Engine API</title>
	<atom:link href="http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/</link>
	<description>the art of sql</description>
	<lastBuildDate>Mon, 30 Aug 2010 14:36:00 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Die wunderbare Welt von Isotopp</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215380</link>
		<dc:creator>Die wunderbare Welt von Isotopp</dc:creator>
		<pubDate>Wed, 17 Mar 2010 20:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215380</guid>
		<description>&lt;strong&gt;links for 2010-03-17...&lt;/strong&gt;

Thoughts about working in a distributed organization - Lenz Grimmer&#039;s blog Lenz Grimmer hat seinen Vortrag zum MySQL HR Motto (&quot;The freedom to work anywhere you want&quot;) aktualisiert und ein paar Gedanken zum...</description>
		<content:encoded><![CDATA[<p><strong>links for 2010-03-17&#8230;</strong></p>
<p>Thoughts about working in a distributed organization &#8211; Lenz Grimmer&#39;s blog Lenz Grimmer hat seinen Vortrag zum MySQL HR Motto (&quot;The freedom to work anywhere you want&quot;) aktualisiert und ein paar Gedanken zum&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay Pipes</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215374</link>
		<dc:creator>Jay Pipes</dc:creator>
		<pubDate>Mon, 15 Mar 2010 17:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215374</guid>
		<description>Glad to hear your comments, Paul!  Between Stewart&#039;s, Brian&#039;s and my work, I actually think we&#039;re getting closer to transactional DDL than I thought would be possible.  I&#039;ll update my blog with the results of more work later this week.  OK, back to fixing XA recovery in Drizzle... :)</description>
		<content:encoded><![CDATA[<p>Glad to hear your comments, Paul!  Between Stewart&#39;s, Brian&#39;s and my work, I actually think we&#39;re getting closer to transactional DDL than I thought would be possible.  I&#39;ll update my blog with the results of more work later this week.  OK, back to fixing XA recovery in Drizzle&#8230; <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul McCullagh</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215373</link>
		<dc:creator>Paul McCullagh</dc:creator>
		<pubDate>Mon, 15 Mar 2010 16:28:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215373</guid>
		<description>Hi Jay,&lt;br&gt;&lt;br&gt;This is a fantastic improvement which will make implementing an engine much simpler in the future!&lt;br&gt;&lt;br&gt;My problem with start statement/end statement was that I had found a case when the counting method did not work. And Kristian showed that in this case InnoDB also produces the incorrect result. If anyone wants more details they should search the Internals List archive for &quot;Finding the start of a statement&quot;.&lt;br&gt;&lt;br&gt;If you check the PBXT handler implementation (ha_pbxt.cc) you will count 14 GOTCHA comments. And those were just the ones that particularly burnt me. So having wrestled with the engine API for so many years, this last frustration was just too much! &lt;br&gt;&lt;br&gt;Put simply: changes you have made are badly needed. They are also good because they are the result of much discussion and thinking. For example, stored procedures lead to nested statements, which can be easily handled by the new API.&lt;br&gt;&lt;br&gt;Just the fact that the changes makes it possible for non-engine plugins to do XA proves that this is a huge step forward. And now things are really falling into place, because this is about to solve the transactional problems that MySQL replication has had all along.</description>
		<content:encoded><![CDATA[<p>Hi Jay,</p>
<p>This is a fantastic improvement which will make implementing an engine much simpler in the future!</p>
<p>My problem with start statement/end statement was that I had found a case when the counting method did not work. And Kristian showed that in this case InnoDB also produces the incorrect result. If anyone wants more details they should search the Internals List archive for &#8220;Finding the start of a statement&#8221;.</p>
<p>If you check the PBXT handler implementation (ha_pbxt.cc) you will count 14 GOTCHA comments. And those were just the ones that particularly burnt me. So having wrestled with the engine API for so many years, this last frustration was just too much! </p>
<p>Put simply: changes you have made are badly needed. They are also good because they are the result of much discussion and thinking. For example, stored procedures lead to nested statements, which can be easily handled by the new API.</p>
<p>Just the fact that the changes makes it possible for non-engine plugins to do XA proves that this is a huge step forward. And now things are really falling into place, because this is about to solve the transactional problems that MySQL replication has had all along.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaypipes</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215364</link>
		<dc:creator>jaypipes</dc:creator>
		<pubDate>Sun, 14 Mar 2010 23:00:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215364</guid>
		<description>Hi again!&lt;br&gt;&lt;br&gt;Paul&#039;s problem did actually exist in Drizzle because there was no notification guarantee until this recent work was committed that an engine would be notifiied of a new SQL statement starting or an old one finishing.  What Monty wrote was precisely what InnoDB had to do (count locks on cursors in order to know when to call trans_register_ha() and commit() (just look in the InnoDB handler if you don&#039;t believe me ;) ).  With this new work, none of that is necessary.  InnoDB doesn&#039;t need to call trans_register_ha(), doesn&#039;t count cursor locks in Cursor::external_lock() because there is an explicit call to StorageEngine::doEndStatement() when a SQL statement ends.&lt;br&gt;&lt;br&gt;I don&#039;t know what we would do if we supported stored procedures, but I&#039;m pretty sure it would follow the same principles: explicitly tell the engine when a SQL statement (whether inside a procedure or not) starts.  A stored procedure is really nothing but a stored set of SQL statements, and should be coded up as such.  It&#039;s not a separate SQL statement in and of itself, at least according to the storage engine, it&#039;s not.)&lt;br&gt;&lt;br&gt;Cheers!&lt;br&gt;-jay</description>
		<content:encoded><![CDATA[<p>Hi again!</p>
<p>Paul&#39;s problem did actually exist in Drizzle because there was no notification guarantee until this recent work was committed that an engine would be notifiied of a new SQL statement starting or an old one finishing.  What Monty wrote was precisely what InnoDB had to do (count locks on cursors in order to know when to call trans_register_ha() and commit() (just look in the InnoDB handler if you don&#39;t believe me <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).  With this new work, none of that is necessary.  InnoDB doesn&#39;t need to call trans_register_ha(), doesn&#39;t count cursor locks in Cursor::external_lock() because there is an explicit call to StorageEngine::doEndStatement() when a SQL statement ends.</p>
<p>I don&#39;t know what we would do if we supported stored procedures, but I&#39;m pretty sure it would follow the same principles: explicitly tell the engine when a SQL statement (whether inside a procedure or not) starts.  A stored procedure is really nothing but a stored set of SQL statements, and should be coded up as such.  It&#39;s not a separate SQL statement in and of itself, at least according to the storage engine, it&#39;s not.)</p>
<p>Cheers!<br />-jay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaypipes</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215363</link>
		<dc:creator>jaypipes</dc:creator>
		<pubDate>Sun, 14 Mar 2010 21:29:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215363</guid>
		<description>OK, yeah, still getting used to Wordpress ;)  Disqus comments now enabled.</description>
		<content:encoded><![CDATA[<p>OK, yeah, still getting used to Wordpress <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   Disqus comments now enabled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaypipes</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215362</link>
		<dc:creator>jaypipes</dc:creator>
		<pubDate>Sun, 14 Mar 2010 16:01:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215362</guid>
		<description>&lt;a href=&#039;#comment-215354&#039; rel=&quot;nofollow&quot;&gt;@Kostja&lt;/a&gt;

Hi Kostja!

That&#039;s good to hear that the statement boundaries are more explicit in MySQL 5.5.  For storage engine developers, it&#039;s a clear win.

-jay</description>
		<content:encoded><![CDATA[<p><a href='#comment-215354' rel="nofollow">@Kostja</a></p>
<p>Hi Kostja!</p>
<p>That&#8217;s good to hear that the statement boundaries are more explicit in MySQL 5.5.  For storage engine developers, it&#8217;s a clear win.</p>
<p>-jay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jaypipes</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215361</link>
		<dc:creator>jaypipes</dc:creator>
		<pubDate>Sun, 14 Mar 2010 15:37:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215361</guid>
		<description>@Jobin: That comment just made my day :)  LOL.</description>
		<content:encoded><![CDATA[<p>@Jobin: That comment just made my day <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   LOL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jobin Augustine</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215360</link>
		<dc:creator>Jobin Augustine</dc:creator>
		<pubDate>Sun, 14 Mar 2010 15:35:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215360</guid>
		<description>Tribals in mountain areas of Kerala (my native) senses the presence of wild elephant by checking the temperature of elephant dung and its smell.
The counter machanism used to sense the statement start/end reminded me the same.
New proposed interface / API looks straight forward and clean. even a child can understand. even i am able to. ;)</description>
		<content:encoded><![CDATA[<p>Tribals in mountain areas of Kerala (my native) senses the presence of wild elephant by checking the temperature of elephant dung and its smell.<br />
The counter machanism used to sense the statement start/end reminded me the same.<br />
New proposed interface / API looks straight forward and clean. even a child can understand. even i am able to. <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stewart Smith</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215357</link>
		<dc:creator>Stewart Smith</dc:creator>
		<pubDate>Sun, 14 Mar 2010 10:00:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215357</guid>
		<description>you should also install a plugin that lets you subscribe to comments :)</description>
		<content:encoded><![CDATA[<p>you should also install a plugin that lets you subscribe to comments <img src='http://www.joinfu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kostja</title>
		<link>http://www.joinfu.com/2010/03/recent-work-on-improving-drizzles-storage-engine-api/comment-page-1/#comment-215356</link>
		<dc:creator>Kostja</dc:creator>
		<pubDate>Sun, 14 Mar 2010 09:20:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.joinfu.com/?p=343#comment-215356</guid>
		<description>Judging by your trace, should you add stored functions or triggers to drizzle, you&#039;ll get it back:
 -&gt; drizzled::mysql_lock_tables()
    &#124;
    -&gt; drizzled::TransactionServices::registerResourceForTransaction()
       &#124;
       -&gt; drizzled::plugin::TransactionalStorageEngine::startTransaction()
          &#124;
          -&gt; InnobaseEngine::doStartTransaction()
       &#124;
       -&gt; drizzled::plugin::StorageEngine::startStatement()
          &#124;
          -&gt; InnobaseEngine::doStartStatement()
       &#124;
       -&gt; drizzled::plugin::StorageEngine::getCursor()


... since in the server all tables are pre-locked and cursors are pre-opened before start of any substatement.

But we *do* actually call start_statement() on each handler for each substatement
of a stored function or trigger.</description>
		<content:encoded><![CDATA[<p>Judging by your trace, should you add stored functions or triggers to drizzle, you&#8217;ll get it back:<br />
 -&gt; drizzled::mysql_lock_tables()<br />
    |<br />
    -&gt; drizzled::TransactionServices::registerResourceForTransaction()<br />
       |<br />
       -&gt; drizzled::plugin::TransactionalStorageEngine::startTransaction()<br />
          |<br />
          -&gt; InnobaseEngine::doStartTransaction()<br />
       |<br />
       -&gt; drizzled::plugin::StorageEngine::startStatement()<br />
          |<br />
          -&gt; InnobaseEngine::doStartStatement()<br />
       |<br />
       -&gt; drizzled::plugin::StorageEngine::getCursor()</p>
<p>&#8230; since in the server all tables are pre-locked and cursors are pre-opened before start of any substatement.</p>
<p>But we *do* actually call start_statement() on each handler for each substatement<br />
of a stored function or trigger.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
