[datadude] Datadude attempts to deploy a default constraint before deploying the function referenced by that constraint - by Jamie Thomson

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 606656 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 9/29/2010 7:40:12 AM
Access Restriction Public

Description

Please don't send this back with a "cannot reproduce" comment. I believe that the attached .sql file proves the bug exists.
==========================================================
When attempting a deploy from datadude within Visual Studio just now I encountered this error:
Rename refactoring operation with key b4b0dfb7-9c4a-4ea2-875b-511ea95fd789 is skipped, element [account].[DF_accountAccount_AccountControllerIsActive] (ISql90DefaultConstraint) will not be renamed to [DF_accountAccountController_AccountControllerIsActive]
    Altering [account].[AccountController]...
C:\Sandbox\PRS\trunk\Src\SQL\FinanceDB\sql\debug\FinanceDB.sql(551,0): Error SQL01268: .Net SqlClient Data Provider: Msg 342, Level 16, State 1, Line 1 Column "account" is not allowed in this context, and the user-defined function or aggregate "account.Default_accountAccountController_AccountControllerIsActive" could not be found.
    
This occurred when datadude attempted to deploy a default constraint defined as:
ALTER TABLE [account].[AccountController]
    ADD [AccountControllerIsActive] BIT CONSTRAINT [DF_accountAccountController_AccountControllerIsActive] DEFAULT [account].[Default_accountAccountController_AccountControllerIsActive]() NOT NULL;

(see line 552 of FinanceDB.sql in attached FinanceDB.zip)

Later on in the script (line 6297) we see the following:
CREATE FUNCTION [account].[Default_accountAccountController_AccountControllerIsActive]
()
RETURNS BIT
AS
BEGIN
	RETURN CAST(1 AS BIT);
END

==================================
Put simply, datadude is attempting to deploy a default constraint BEFORE it has deployed the function that is referenced by that constraint. This is a bug. Plain and simple.


I will attach 2 files:
1. FinanceDB.zip - A zip of FinanceDB.sql - the file produced by a datadude deploy
2. FinanceDB_project.zip - A zip of the datadude project that is throwing this error

Sign in to post a comment.
Posted by Jamie Thomson on 12/21/2010 at 2:59 AM
For anyone that happens to surf on in here - this bug fix was available in VS2010 SP1 apparently. http://blogs.msdn.com/b/jasonz/archive/2010/12/20/visual-studio-2010-service-pack-1-beta-feedback.aspx
Posted by Microsoft on 10/1/2010 at 2:28 PM
Hi Jamie,

Thank you for submitting this issue. We have reproduced this issue and have added it to our product backlog. It will be considered for the service release of Visual Studio 2010.

I confirmed this issue and have a simplified repro. It is a depedency ordering bug in the deployment plan generator. The issue seems to only occurs when table exists and adding a constraint with a dependency on a new function.


Thanks,

Barclay Hill
Sr. Program Manager | Visual Studio Product Team (Data Tools) | Microsoft Corporation
Posted by Microsoft on 9/30/2010 at 2:24 AM
Thanks for your feedback.
We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 9/29/2010 at 6:22 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)