<?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: Restoring from a mysqldump into tables with triggers</title>
	<atom:link href="http://www.xaprb.com/blog/2009/01/08/restoring-from-a-mysqldump-into-tables-with-triggers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2009/01/08/restoring-from-a-mysqldump-into-tables-with-triggers/</link>
	<description>Stay curious!</description>
	<lastBuildDate>Thu, 09 Feb 2012 20:41:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Ms. Anthrope</title>
		<link>http://www.xaprb.com/blog/2009/01/08/restoring-from-a-mysqldump-into-tables-with-triggers/#comment-15632</link>
		<dc:creator>Ms. Anthrope</dc:creator>
		<pubDate>Thu, 08 Jan 2009 17:14:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=764#comment-15632</guid>
		<description>mysqldump in 5.0.67 appears to put triggers after the inserts already:
#  mysqldump5 --version                                                                                                                                         
mysqldump  Ver 10.11 Distrib 5.0.67, for apple-darwin9.5.0 (i686)

--
-- Table structure for table `customer`
--

DROP TABLE IF EXISTS `customer`;
...
CREATE TABLE `customer` (
...
) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `customer`
--

LOCK TABLES `customer` WRITE;
/*!40000 ALTER TABLE `customer` DISABLE KEYS */;
INSERT INTO `customer` VALUES (...);
/*!40000 ALTER TABLE `customer` ENABLE KEYS */;
UNLOCK TABLES;

DELIMITER ;;
/*!50003 SET SESSION SQL_MODE=&quot;STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER&quot; */;;
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `customer_create_date` BEFORE INSERT ON `customer` FOR EACH ROW SET NEW.create_date = NOW() */;;

DELIMITER ;
...

Although it would be nice in some cases to disable/enable triggers (especially selectively).</description>
		<content:encoded><![CDATA[<p>mysqldump in 5.0.67 appears to put triggers after the inserts already:<br />
#  mysqldump5 &#8211;version<br />
mysqldump  Ver 10.11 Distrib 5.0.67, for apple-darwin9.5.0 (i686)</p>
<p>&#8211;<br />
&#8211; Table structure for table `customer`<br />
&#8211;</p>
<p>DROP TABLE IF EXISTS `customer`;<br />
&#8230;<br />
CREATE TABLE `customer` (<br />
&#8230;<br />
) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8;</p>
<p>&#8211;<br />
&#8211; Dumping data for table `customer`<br />
&#8211;</p>
<p>LOCK TABLES `customer` WRITE;<br />
/*!40000 ALTER TABLE `customer` DISABLE KEYS */;<br />
INSERT INTO `customer` VALUES (&#8230;);<br />
/*!40000 ALTER TABLE `customer` ENABLE KEYS */;<br />
UNLOCK TABLES;</p>
<p>DELIMITER ;;<br />
/*!50003 SET SESSION SQL_MODE=&#8221;STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER&#8221; */;;<br />
/*!50003 CREATE */ /*!50017 DEFINER=`root`@`localhost` */ /*!50003 TRIGGER `customer_create_date` BEFORE INSERT ON `customer` FOR EACH ROW SET NEW.create_date = NOW() */;;</p>
<p>DELIMITER ;<br />
&#8230;</p>
<p>Although it would be nice in some cases to disable/enable triggers (especially selectively).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.xaprb.com/blog/2009/01/08/restoring-from-a-mysqldump-into-tables-with-triggers/#comment-15631</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Thu, 08 Jan 2009 14:36:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/?p=764#comment-15631</guid>
		<description>I like the Postgres approach to this problem:
ALTER TABLE foo DISABLE TRIGGER ALL;

ALTER TABLE foo ENABLE TRIGGER ALL;</description>
		<content:encoded><![CDATA[<p>I like the Postgres approach to this problem:<br />
ALTER TABLE foo DISABLE TRIGGER ALL;</p>
<p>ALTER TABLE foo ENABLE TRIGGER ALL;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

