<?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: On restoring a single table from mysqldump</title>
	<atom:link href="http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/feed" rel="self" type="application/rss+xml" />
	<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump</link>
	<description>Blog by Shlomi Noach</description>
	<lastBuildDate>Thu, 09 Sep 2010 18:52:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Vitaly</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-17217</link>
		<dc:creator>Vitaly</dc:creator>
		<pubDate>Thu, 02 Sep 2010 11:00:21 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-17217</guid>
		<description>Even it&#039;s not directly related to this topic, I noticed that if we cutting specific table dump from the whole DB dump there is a problem with  restoring of TIMESTAMP fields - they become UTC instead of local time.

adding 

/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE=&#039;+00:00&#039; */;


(as we have in a dump produced by mysqldump) before table data fixes this problem.

Regards,
Vitaly Karasik</description>
		<content:encoded><![CDATA[<p>Even it&#8217;s not directly related to this topic, I noticed that if we cutting specific table dump from the whole DB dump there is a problem with  restoring of TIMESTAMP fields &#8211; they become UTC instead of local time.</p>
<p>adding </p>
<p>/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;<br />
/*!40103 SET TIME_ZONE=&#8217;+00:00&#8242; */;</p>
<p>(as we have in a dump produced by mysqldump) before table data fixes this problem.</p>
<p>Regards,<br />
Vitaly Karasik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-8111</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Tue, 15 Dec 2009 13:31:30 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-8111</guid>
		<description>@TVNshack

sed can come in handy here, too.</description>
		<content:encoded><![CDATA[<p>@TVNshack</p>
<p>sed can come in handy here, too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TVNshack</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-8106</link>
		<dc:creator>TVNshack</dc:creator>
		<pubDate>Tue, 15 Dec 2009 11:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-8106</guid>
		<description>Watchout the problem of the automatically generated AUTO_INCREMENT table option that mysqldump generates and that MATCH only with the INSERT statements that may come right after in the dump.

Even if you specify a --no-data, that AUTO_INCREMENT=nnn table option will still appear. If you intend to create a table from that extracted definition and for which you may not want to insert the exact same data, LAST_INSERT_ID will not be adapted for the need of your empty table. Your table first row inserted relying on AUTO_INCREMENT column definition option will start with an offset AUTO_INCREMENT value.

I would recommend to edit the mysqldump output to reset each AUTO_INCREMENT table option to AUTO_INCREMENT=1 and let the eventual INSERTs manage LAST_INSERT_ID

(see bug #44425)</description>
		<content:encoded><![CDATA[<p>Watchout the problem of the automatically generated AUTO_INCREMENT table option that mysqldump generates and that MATCH only with the INSERT statements that may come right after in the dump.</p>
<p>Even if you specify a &#8211;no-data, that AUTO_INCREMENT=nnn table option will still appear. If you intend to create a table from that extracted definition and for which you may not want to insert the exact same data, LAST_INSERT_ID will not be adapted for the need of your empty table. Your table first row inserted relying on AUTO_INCREMENT column definition option will start with an offset AUTO_INCREMENT value.</p>
<p>I would recommend to edit the mysqldump output to reset each AUTO_INCREMENT table option to AUTO_INCREMENT=1 and let the eventual INSERTs manage LAST_INSERT_ID</p>
<p>(see bug #44425)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #171: a Carnival of the Vanities for DBAs &#124; The Pythian Blog</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-7693</link>
		<dc:creator>Log Buffer #171: a Carnival of the Vanities for DBAs &#124; The Pythian Blog</dc:creator>
		<pubDate>Fri, 04 Dec 2009 18:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-7693</guid>
		<description>[...] Noach shares his thoughts on restoring a single table from mysqldump. &#8220;Given a dump file (generated by mysqldump), how do you restore a single table, without [...]</description>
		<content:encoded><![CDATA[<p>[...] Noach shares his thoughts on restoring a single table from mysqldump. &#8220;Given a dump file (generated by mysqldump), how do you restore a single table, without [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gavin Towey</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-7584</link>
		<dc:creator>Gavin Towey</dc:creator>
		<pubDate>Thu, 03 Dec 2009 00:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-7584</guid>
		<description>Nice! The sed only method is a good improvement.</description>
		<content:encoded><![CDATA[<p>Nice! The sed only method is a good improvement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shlomi</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-7482</link>
		<dc:creator>shlomi</dc:creator>
		<pubDate>Tue, 01 Dec 2009 21:02:27 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-7482</guid>
		<description>@Chris

Good! Credits due to gtowey

Regards</description>
		<content:encoded><![CDATA[<p>@Chris</p>
<p>Good! Credits due to gtowey</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WhirCat &#183; restoring a single table from mysqldump</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-7478</link>
		<dc:creator>WhirCat &#183; restoring a single table from mysqldump</dc:creator>
		<pubDate>Tue, 01 Dec 2009 20:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-7478</guid>
		<description>[...] via On restoring a single table from mysqldump &#124; code.openark.org. [...]</description>
		<content:encoded><![CDATA[<p>[...] via On restoring a single table from mysqldump | code.openark.org. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-7475</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 01 Dec 2009 19:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-7475</guid>
		<description>I just used  your method in my PROD environment and it is defiantly easier and more efficient than my method with grants.  Again, thanks for the slick method.</description>
		<content:encoded><![CDATA[<p>I just used  your method in my PROD environment and it is defiantly easier and more efficient than my method with grants.  Again, thanks for the slick method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump/comment-page-1#comment-7469</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 01 Dec 2009 17:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://code.openark.org/blog/?p=1630#comment-7469</guid>
		<description>yet another great solution, thanks for the comparison and improvements!</description>
		<content:encoded><![CDATA[<p>yet another great solution, thanks for the comparison and improvements!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
