<?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: Trivial MySQL Variable of the Day</title>
	<atom:link href="http://www.pythian.com/news/2963/trivial-mysql-variable-of-the-day/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythian.com/news/2963/trivial-mysql-variable-of-the-day/</link>
	<description>News and views from Pythian DBAs</description>
	<lastBuildDate>Fri, 10 Feb 2012 13:01:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: tom</title>
		<link>http://www.pythian.com/news/2963/trivial-mysql-variable-of-the-day/#comment-534657</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Sat, 16 Apr 2011 19:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/news/?p=2963#comment-534657</guid>
		<description>http://bugs.mysql.com/bug.php?id=40344</description>
		<content:encoded><![CDATA[<p><a href="http://bugs.mysql.com/bug.php?id=40344" rel="nofollow">http://bugs.mysql.com/bug.php?id=40344</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MC Brown</title>
		<link>http://www.pythian.com/news/2963/trivial-mysql-variable-of-the-day/#comment-363146</link>
		<dc:creator>MC Brown</dc:creator>
		<pubDate>Thu, 18 Jun 2009 07:42:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/news/?p=2963#comment-363146</guid>
		<description>Documentation have been alerted to the presence of this item and it will be fixed soon</description>
		<content:encoded><![CDATA[<p>Documentation have been alerted to the presence of this item and it will be fixed soon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Leith</title>
		<link>http://www.pythian.com/news/2963/trivial-mysql-variable-of-the-day/#comment-363144</link>
		<dc:creator>Mark Leith</dc:creator>
		<pubDate>Thu, 18 Jun 2009 07:38:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/news/?p=2963#comment-363144</guid>
		<description>Well, I also really wouldn&#039;t call it &quot;online alter table&quot; - it&#039;s not &quot;online&quot;, there are still metadata locks taken, etc. - it just happens a lot quicker because of the lack of the table copying. 

I&#039;ll point the docs team over here and get it documented better.</description>
		<content:encoded><![CDATA[<p>Well, I also really wouldn&#8217;t call it &#8220;online alter table&#8221; &#8211; it&#8217;s not &#8220;online&#8221;, there are still metadata locks taken, etc. &#8211; it just happens a lot quicker because of the lack of the table copying. </p>
<p>I&#8217;ll point the docs team over here and get it documented better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sheeri Cabral</title>
		<link>http://www.pythian.com/news/2963/trivial-mysql-variable-of-the-day/#comment-363081</link>
		<dc:creator>Sheeri Cabral</dc:creator>
		<pubDate>Wed, 17 Jun 2009 21:53:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/news/?p=2963#comment-363081</guid>
		<description>Mark -- thanx, so I was half right -- my guess on the functionality was right, it makes it so the new online changes are not online, but my guess that it wasn&#039;t implemented yet was wrong.

Still, documentation would be nice.</description>
		<content:encoded><![CDATA[<p>Mark &#8212; thanx, so I was half right &#8212; my guess on the functionality was right, it makes it so the new online changes are not online, but my guess that it wasn&#8217;t implemented yet was wrong.</p>
<p>Still, documentation would be nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Leith</title>
		<link>http://www.pythian.com/news/2963/trivial-mysql-variable-of-the-day/#comment-363069</link>
		<dc:creator>Mark Leith</dc:creator>
		<pubDate>Wed, 17 Jun 2009 20:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.pythian.com/news/?p=2963#comment-363069</guid>
		<description>Hi Sheeri,

It&#039;s used to disable the optimizations that were added in 5.1 for &quot;Faster Alter Table&quot;  - in ./sql/sql_table.cc down in the depths of mysql_alter_table():

  if (thd-&gt;variables.old_alter_table
      &#124;&#124; (table-&gt;s-&gt;db_type() != create_info-&gt;db_type)
#ifdef WITH_PARTITION_STORAGE_ENGINE
      &#124;&#124; partition_changed
#endif
     )
    need_copy_table= ALTER_TABLE_DATA_CHANGED;
  else
  {
    enum_alter_table_change_level need_copy_table_res;
    /* Check how much the tables differ. */
    if (compare_tables(table, alter_info,
                       create_info, order_num,
                       &amp;need_copy_table_res,
                       &amp;key_info_buffer,
                       &amp;index_drop_buffer, &amp;index_drop_count,
                       &amp;index_add_buffer, &amp;index_add_count,
                       &amp;candidate_key_count))
      goto err;
  
    if (need_copy_table == ALTER_TABLE_METADATA_ONLY)
      need_copy_table= need_copy_table_res;
  }

So - if you have change an ENUM value, or rename a column, or change a column default etc. it will still follow the old 5.0 way of making a temporary table, copy over, and switch etc. 

I can&#039;t imagine why anybody would want to use this, other than testing / debugging. :)</description>
		<content:encoded><![CDATA[<p>Hi Sheeri,</p>
<p>It&#8217;s used to disable the optimizations that were added in 5.1 for &#8220;Faster Alter Table&#8221;  &#8211; in ./sql/sql_table.cc down in the depths of mysql_alter_table():</p>
<p>  if (thd-&gt;variables.old_alter_table<br />
      || (table-&gt;s-&gt;db_type() != create_info-&gt;db_type)<br />
#ifdef WITH_PARTITION_STORAGE_ENGINE<br />
      || partition_changed<br />
#endif<br />
     )<br />
    need_copy_table= ALTER_TABLE_DATA_CHANGED;<br />
  else<br />
  {<br />
    enum_alter_table_change_level need_copy_table_res;<br />
    /* Check how much the tables differ. */<br />
    if (compare_tables(table, alter_info,<br />
                       create_info, order_num,<br />
                       &amp;need_copy_table_res,<br />
                       &amp;key_info_buffer,<br />
                       &amp;index_drop_buffer, &amp;index_drop_count,<br />
                       &amp;index_add_buffer, &amp;index_add_count,<br />
                       &amp;candidate_key_count))<br />
      goto err;</p>
<p>    if (need_copy_table == ALTER_TABLE_METADATA_ONLY)<br />
      need_copy_table= need_copy_table_res;<br />
  }</p>
<p>So &#8211; if you have change an ENUM value, or rename a column, or change a column default etc. it will still follow the old 5.0 way of making a temporary table, copy over, and switch etc. </p>
<p>I can&#8217;t imagine why anybody would want to use this, other than testing / debugging. :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

