<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>MERGE Bug with Filtered Indexes</title><link>http://sqlblog.com/blogs/paul_white/archive/2012/12/10/merge-bug-with-filtered-indexes.aspx</link><description>A MERGE statement can fail, and incorrectly report a unique key violation when: The target table uses a unique filtered index; and No key column of the filtered index is updated; and A column from the filtering condition is updated; and Transient key</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: MERGE Bug with Filtered Indexes</title><link>http://sqlblog.com/blogs/paul_white/archive/2012/12/10/merge-bug-with-filtered-indexes.aspx#46586</link><pubDate>Mon, 10 Dec 2012 18:19:34 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46586</guid><dc:creator>tobi</dc:creator><description>&lt;p&gt;That is a nice (and nasty bug). And just another one in the merge statement query planner.&lt;/p&gt;
&lt;p&gt;It seems like some automated, exhaustive testing with all possible data and schemas would be in order to finally free the merge statement from bugs.&lt;/p&gt;</description></item><item><title>re: MERGE Bug with Filtered Indexes</title><link>http://sqlblog.com/blogs/paul_white/archive/2012/12/10/merge-bug-with-filtered-indexes.aspx#46612</link><pubDate>Tue, 11 Dec 2012 22:43:17 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46612</guid><dc:creator>AlexK</dc:creator><description>&lt;p&gt;Thank you for alerting us, Paul!&lt;/p&gt;
&lt;p&gt;Apparently the old rule of waiting for the first service pack before using the product is not quite right any more. These two features were released quite a while ago, and they still do not work together.&lt;/p&gt;
&lt;p&gt;As the product gets more complex, the amount of integration tests needed to ensure acceptable quality grows exponentially. The release of MERGE with all these bugs is a good example of why complexity kills.&lt;/p&gt;
&lt;p&gt;So, next time someone suggests that &amp;quot;the optimizer should be smart enough to do something else&amp;quot;, let us think a little bit before upvoting the suggestion. Do we really need a smarter, and more complex, optimizer, with more bugs? Don't we need a fully tested one instead?&lt;/p&gt;</description></item><item><title>re: MERGE Bug with Filtered Indexes</title><link>http://sqlblog.com/blogs/paul_white/archive/2012/12/10/merge-bug-with-filtered-indexes.aspx#46613</link><pubDate>Tue, 11 Dec 2012 23:49:24 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46613</guid><dc:creator>Paul White</dc:creator><description>&lt;p&gt;Hi Alex,&lt;/p&gt;
&lt;p&gt;I would agree with most of that. &amp;nbsp;Update processing is already very complex (think about the update plan where there are instead of triggers on views on tables being modified by a merge with filtered indexes and query notifications and ...)&lt;/p&gt;
&lt;p&gt;Combining 'relatively new' features in creative ways is a good way to encounter bugs. &amp;nbsp;Makes for interesting blog material (I hope) but not at all fun in a production system.&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;
</description></item><item><title>re: MERGE Bug with Filtered Indexes</title><link>http://sqlblog.com/blogs/paul_white/archive/2012/12/10/merge-bug-with-filtered-indexes.aspx#46689</link><pubDate>Tue, 18 Dec 2012 16:46:54 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46689</guid><dc:creator>Gabe</dc:creator><description>&lt;p&gt;What version(s) of SQL does this happen with? 2008 and/or 2012?&lt;/p&gt;</description></item><item><title>re: MERGE Bug with Filtered Indexes</title><link>http://sqlblog.com/blogs/paul_white/archive/2012/12/10/merge-bug-with-filtered-indexes.aspx#46701</link><pubDate>Wed, 19 Dec 2012 09:39:15 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46701</guid><dc:creator>Paul White</dc:creator><description>&lt;p&gt;Gabe,&lt;/p&gt;
&lt;p&gt;See the build list at the end of the post.&lt;/p&gt;
</description></item></channel></rss>