<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Think API&#187; data inconsistency</title>
	<atom:link href="http://thinkapi.com/blog/tag/data-inconsistency/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkapi.com/blog</link>
	<description>An interface to tech thoughts</description>
	<lastBuildDate>Mon, 10 May 2010 10:32:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to skip MySQL replication counter</title>
		<link>http://thinkapi.com/blog/how-to-skip-mysql-replication-counter/</link>
		<comments>http://thinkapi.com/blog/how-to-skip-mysql-replication-counter/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 17:47:59 +0000</pubDate>
		<dc:creator>Sukumar</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Systems]]></category>
		<category><![CDATA[auto increment]]></category>
		<category><![CDATA[data inconsistency]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://thinkapi.com/blog/?p=9</guid>
		<description><![CDATA[There are such times when MySQL replication stops when you run certain updates on the master and the slave fails. Like for example you may have run a create table or an alter table on the master and further inserts but these DDLs get skipped and the inserts into these non-existent tables cause the slave [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>There are such times when MySQL replication stops when you run certain updates on the master and the slave fails. Like for example you may have run a create table or an alter table on the master and further inserts but these DDLs get skipped and the inserts into these non-existent tables cause the slave to error out and stop.</p>
<p>A simple way out of this is to run the missing DDLs on the slave and push the counter by a step. This is not recommended as this might cause data inconsistency.<span id="more-9"></span></p>
<p>Use the below sql to skip the counter by 1.</p>
<pre class="brush: sql;">
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; START SLAVE;
</pre>
<p>Just remember to use the value 1 for any SQL statement that does not use AUTO_INCREMENT or LAST_INSERT_ID(), otherwise you will need to use the value 2. Statements that use AUTO_INCREMENT or LAST_INSERT_ID() take up 2 events in the binary log.</p>
<p>To skip lots of duplicate errors, you can set this in my.cnf</p>
<pre class="brush: sql;">
slave-skip-errors = 1062
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://thinkapi.com/blog/how-to-skip-mysql-replication-counter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
