Change seen by source control on unchanged item

mikamika Posts: 6
I just upgraded to 3.6.5.123 and when I go to the commit changes tab there are 2 changes which weren't there before.

They are both for SQL functions where dbo was changed to DBO and there was an extra dot added:

ie:
CREATE FUNCTION [dbo].[fn_GameDay_Get]
was changed to
CREATE FUNCTION .[DBO].[fn_GameDay_Get]

(notice the extra dot before the second [DBO])

When I try to undo, it says it's successful, but the changes are then still there...

Comments

  • Anybody?
  • Hello,

    Thanks for your post.

    I just tried reproducing the issue with the same function name but wasn't able to get the same behavior.

    We have a ticket open for you (19871) -- would you mind responding there with the full script in your repository?

    Thanks,
    Evan
    Evan Moss
    Product Support
    (866) 627-8107
  • I can't - the user mika is not a registered redgate user and my boss, denise, does not have access to that ticket. I've sent a reply to the ticket to add the proper user but when logged in, she still can't see it.
  • -- User Defined Function
    
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS OFF
    GO
    CREATE FUNCTION [dbo].[fn_GameDay_Date_Get] (@GameDay int)  
    RETURNS datetime  AS  
    
    BEGIN 
    	DECLARE @date datetime
    
    	SET @date = (SELECT TOP 1 GameDay_Date FROM Gaming_Day (NOLOCK) WHERE GameDay_ID = @GameDay)
    
    	RETURN @date
    END
    
    
    
    GO
    -- Permissions
    
    GRANT EXECUTE ON  [dbo].[fn_GameDay_Date_Get] TO [Sxuser]
    GO
    

    Keeps gettings changed to
    -- User Defined Function
    
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS OFF
    GO
    CREATE FUNCTION .[DBO].[fn_GameDay_Date_Get] (@GameDay int)  
    RETURNS datetime  AS  
    
    BEGIN 
    	DECLARE @date datetime
    
    	SET @date = (SELECT TOP 1 GameDay_Date FROM Gaming_Day (NOLOCK) WHERE GameDay_ID = @GameDay)
    
    	RETURN @date
    END
    
    
    
    GO
    -- Permissions
    
    GRANT EXECUTE ON  [DBO].[fn_GameDay_Date_Get] TO [Sxuser]
    GO
    

    This is copies from the commit changes compare window in sql source control. There was no actual change.
  • Ah interesting. I tracked it down to the fact that that actual function has always had the full stop before the .[dbo]. So the thing that has actually changed is that with the latest release you are "seeing" it and "fixing" it automatically.

    Worth noting: It seems that SQL has allowed it all these years (this funciton has been there forever as is)

    Nothing to do for me though - I will fix it my side.

    Thanks.
Sign In or Register to comment.