Schema Compare Integration into DBSourceTools

Developer
Sep 17, 2009 at 1:00 PM

Hi All, 

I just wanted to mention that I have integrated your Schema Comparison engine into DBSourceTools. ( http://dbsourcetools.codeplex.com/ ).

As part of this process, I found what I believe is a bug in the following file:

 

namespace DBDiff.Schema.SQLServer.Generates.Model.Util
{
    internal static class FormatCode
}
In function :

 

private static SearchItem FindCreate(string ObjectType, ISchemaBase item, string prevText)

I have made the following change:

 

            while (!finish)
            {
                Match match = reg2.Match(prevText, indexBegin);
                if (match.Success) 
                    iAux = match.Index;
                else
                    iAux = -1;
//                if ((abiertas.Count == indexStart) || (!match.Success))
                if ((abiertas.Count == indexStart) || (match.Success))
                    finish = true;
                else
                {
                    if ((iAux < abiertas[indexStart].Index) && (iAux < abiertas[indexStart].Index + abiertas[indexStart].Length))
                        finish = true;
                    else
                    {
                        indexBegin = iAux + 1;
                        indexStart++;                        
                    }
                }
            }

Yours,

- Nathan.

 

 

 

Coordinator
Sep 6, 2010 at 3:39 AM
Edited Sep 6, 2010 at 3:45 AM

Hi Nathan, thanks for reporting this bug.

Can you also clearly state that you've licensed your contribution under the GPLv2 so that I can include it as-is in the project? Thanks.

If you feel like doing me a big favor please consider dual-licensing the fix as GPLv2 and LGPL. I am trying to convince the original author to LGPL the library portion of the project.

Also, I've created a work item where I will track changes made for this issue:

http://opendbiff.codeplex.com/workitem/11874