<?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: mk-schema-change? Check out ideas from oak-online-alter-table</title>
	<atom:link href="http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/feed" rel="self" type="application/rss+xml" />
	<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table</link>
	<description>Blog by Shlomi Noach</description>
	<lastBuildDate>Wed, 01 Feb 2012 20:47:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14983</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Sun, 20 Jun 2010 03:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14983</guid>
		<description>@Vamsi,

Shall we continue this discussion by mail? You can find my email address &lt;a href=&quot;http://code.openark.org/blog/shlomi-noach&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>@Vamsi,</p>
<p>Shall we continue this discussion by mail? You can find my email address <a href="http://code.openark.org/blog/shlomi-noach" rel="nofollow">here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nagavamsi Ponnekanti (Vamsi)</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14977</link>
		<dc:creator>Nagavamsi Ponnekanti (Vamsi)</dc:creator>
		<pubDate>Sat, 19 Jun 2010 20:47:52 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14977</guid>
		<description>Hi Shlomi,
Regarding your comment &quot;I’ve seen it work, and I’ve seen it crash.&quot;, do u remember which step(s) it was crashing at?
Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Shlomi,<br />
Regarding your comment "I’ve seen it work, and I’ve seen it crash.", do u remember which step(s) it was crashing at?<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14973</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Sat, 19 Jun 2010 18:32:09 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14973</guid>
		<description>@Vamsi,
That&#039;s because Google changed their linking method. Please follow this link with your browser to get to the real download link.
You have downloaded an HTML page.

Shlomi</description>
		<content:encoded><![CDATA[<p>@Vamsi,<br />
That's because Google changed their linking method. Please follow this link with your browser to get to the real download link.<br />
You have downloaded an HTML page.</p>
<p>Shlomi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nagavamsi Ponnekanti (Vamsi)</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14971</link>
		<dc:creator>Nagavamsi Ponnekanti (Vamsi)</dc:creator>
		<pubDate>Sat, 19 Jun 2010 18:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14971</guid>
		<description>Shlomi,
wget is able to get http://code.google.com/p/openarkkit/downloads/detail?name=openark-kit-111.tar.gz,
but tar complains. 

tar -zxvf online.tar.gz

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors</description>
		<content:encoded><![CDATA[<p>Shlomi,<br />
wget is able to get <a href="http://code.google.com/p/openarkkit/downloads/detail?name=openark-kit-111.tar.gz" rel="nofollow">http://code.google.com/p/openarkkit/downloads/detail?name=openark-kit-111.tar.gz</a>,<br />
but tar complains. </p>
<p>tar -zxvf online.tar.gz</p>
<p>gzip: stdin: not in gzip format<br />
tar: Child returned status 1<br />
tar: Error exit delayed from previous errors</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14959</link>
		<dc:creator>Mark Callaghan</dc:creator>
		<pubDate>Sat, 19 Jun 2010 13:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14959</guid>
		<description>@Vamsi - InnoDB gets S locks on rows in the SELECT portion of INSERT/UPDATE/DELETE ... SELECT * from FOO. This is done so that the statement produces the same result on a slave. If this were not done, then another connection could start running after the long running statement above, update the selected table (FOO above), commit and write to the binlog before the INSERT/UPDATE/DELETE ... SELECT * from FOO above.

In that case the long-running statement above doesn&#039;t see the fast update on the master. But on the slave the fast update is applied first from the relay log and the long-running INSERT/UPDATE/DELETE reads it.

Unfortunately, InnoDB almost always gets the S lock even when it shouldn&#039;t -- binlog is disabled was the obvious case. It might also get the S lock when sql_log_bin=0. Of course, we can fix things like that.</description>
		<content:encoded><![CDATA[<p>@Vamsi - InnoDB gets S locks on rows in the SELECT portion of INSERT/UPDATE/DELETE ... SELECT * from FOO. This is done so that the statement produces the same result on a slave. If this were not done, then another connection could start running after the long running statement above, update the selected table (FOO above), commit and write to the binlog before the INSERT/UPDATE/DELETE ... SELECT * from FOO above.</p>
<p>In that case the long-running statement above doesn't see the fast update on the master. But on the slave the fast update is applied first from the relay log and the long-running INSERT/UPDATE/DELETE reads it.</p>
<p>Unfortunately, InnoDB almost always gets the S lock even when it shouldn't -- binlog is disabled was the obvious case. It might also get the S lock when sql_log_bin=0. Of course, we can fix things like that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14948</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Sat, 19 Jun 2010 07:07:24 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14948</guid>
		<description>@Vamsi,

1. Yes. Originally I tried tuple comparison, e.g. (a,b,c) &gt;= (3,4,5). That didn&#039;t turn out well, and I&#039;ve documented it on: &lt;a href=&quot;http://code.openark.org/blog/mysql/mysql-not-being-able-to-utilize-a-compound-index&quot; rel=&quot;nofollow&quot;&gt;MySQL not being able to utilize a compound index?&lt;/a&gt;.
With multiple column the breaking down of the range comparison is ugly indeed, but it&#039;s code-generated, so who cares...? Plus, the optimizer uses the key well.

2. With InnoDB locks are never relased during transaction but only when it commits or rolls back.

3. Likewise

Shlomi</description>
		<content:encoded><![CDATA[<p>@Vamsi,</p>
<p>1. Yes. Originally I tried tuple comparison, e.g. (a,b,c) >= (3,4,5). That didn't turn out well, and I've documented it on: <a href="http://code.openark.org/blog/mysql/mysql-not-being-able-to-utilize-a-compound-index" rel="nofollow">MySQL not being able to utilize a compound index?</a>.<br />
With multiple column the breaking down of the range comparison is ugly indeed, but it's code-generated, so who cares...? Plus, the optimizer uses the key well.</p>
<p>2. With InnoDB locks are never relased during transaction but only when it commits or rolls back.</p>
<p>3. Likewise</p>
<p>Shlomi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14943</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Sat, 19 Jun 2010 03:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14943</guid>
		<description>Hi Mark,
Yes, code is published for over a year: &lt;a href=&quot;http://code.google.com/p/openarkkit/&quot; rel=&quot;nofollow&quot;&gt;openark kit&lt;/a&gt;
Look for oak-online-alter-table.</description>
		<content:encoded><![CDATA[<p>Hi Mark,<br />
Yes, code is published for over a year: <a href="http://code.google.com/p/openarkkit/" rel="nofollow">openark kit</a><br />
Look for oak-online-alter-table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nagavamsi Ponnekanti (Vamsi)</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14939</link>
		<dc:creator>Nagavamsi Ponnekanti (Vamsi)</dc:creator>
		<pubDate>Sat, 19 Jun 2010 02:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14939</guid>
		<description>Shlomi,
Interesting approach. Some questions I have are
1. For multi-column unique key, chunking would make where clause complicated, right? Eg., for a 2-column key, if 1st select reads till [x, y] the where clause of 2nd select will look like ((col1 = x and col2 &gt; y) OR (col1 &gt; x)). Seems to get even more messy with  3 column keys. If we use such complex where clauses, is mysql optimizer smart enough to make use of index on unique key? 

2. Mysql seems to get read locks on rows of table S in statements like &quot;insert into T(...) select ... from S&quot;. Are those row locks held till commit, or released as soon as scan moves to next row? 

3. Likewise does &quot;delete from T where key not in (select ... from S)&quot; also get READ row locks on S, and fo so, are those read locks held till commit?</description>
		<content:encoded><![CDATA[<p>Shlomi,<br />
Interesting approach. Some questions I have are<br />
1. For multi-column unique key, chunking would make where clause complicated, right? Eg., for a 2-column key, if 1st select reads till [x, y] the where clause of 2nd select will look like ((col1 = x and col2 &gt; y) OR (col1 &gt; x)). Seems to get even more messy with  3 column keys. If we use such complex where clauses, is mysql optimizer smart enough to make use of index on unique key? </p>
<p>2. Mysql seems to get read locks on rows of table S in statements like "insert into T(...) select ... from S". Are those row locks held till commit, or released as soon as scan moves to next row? </p>
<p>3. Likewise does "delete from T where key not in (select ... from S)" also get READ row locks on S, and fo so, are those read locks held till commit?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Callaghan</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-14936</link>
		<dc:creator>Mark Callaghan</dc:creator>
		<pubDate>Sat, 19 Jun 2010 00:39:28 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-14936</guid>
		<description>We finally got around to working on a tool for this. It uses triggers. Did you publish code for your version?</description>
		<content:encoded><![CDATA[<p>We finally got around to working on a tool for this. It uses triggers. Did you publish code for your version?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/mk-schema-change-check-out-ideas-from-oak-online-alter-table/comment-page-1#comment-11340</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Wed, 10 Mar 2010 19:39:15 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=2144#comment-11340</guid>
		<description>I think your quote on triggers took some 30% of our entire conversation :D

By all means, this is not a discussion on triggers. There&#039;s an algorithm beside the triggers here.</description>
		<content:encoded><![CDATA[<p>I think your quote on triggers took some 30% of our entire conversation <img src='http://code.openark.org/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>By all means, this is not a discussion on triggers. There's an algorithm beside the triggers here.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

