Bug in 12 and 12.2, not sure where to post sorry
MatthewAlacer
Posts: 1
Doing a routine DB compare, I've found what I think is a line ending bug. Basically, in the where clause of a SELECT in an SP, we have a join that is commented out on one line. In SQL Compare 11, it reads this correctly and puts the new line on a new line, but in 12 and 12.2, it's not adding a new line, which effectively comments out the next line, and breaks the SP. Problem is 12+12.3 think this is the same as the source. Easier to explain in pictures (following are all in 12.2 unless stated otherwise)
The actual Source SP in SourceDB:
Compare of SourceDB to TargetDB (target DB has no SPs in it) (Notice how "Left Outer join MST_Units" has moved up a line)
Compare of MasterDB to SourceDB (SourceDB is a copy of MasterDB) (Notice, it thinks all objects are identical, except it also shows the change)
Finally, here is the same compare (MasterDB to SourceDB) in 11, which correctly shows the SP in SourceDB
As some extra info. When I open the SP in SourceDB, I get a "line endings" error message from SQL Management Studio. I do not get this same error when I open the SP in MasterDB. When I click yes to use the same line endings, and alter the SP, the change goes away in the 12.2 compare.
The actual Source SP in SourceDB:
Compare of SourceDB to TargetDB (target DB has no SPs in it) (Notice how "Left Outer join MST_Units" has moved up a line)
Compare of MasterDB to SourceDB (SourceDB is a copy of MasterDB) (Notice, it thinks all objects are identical, except it also shows the change)
Finally, here is the same compare (MasterDB to SourceDB) in 11, which correctly shows the SP in SourceDB
As some extra info. When I open the SP in SourceDB, I get a "line endings" error message from SQL Management Studio. I do not get this same error when I open the SP in MasterDB. When I click yes to use the same line endings, and alter the SP, the change goes away in the 12.2 compare.
Tagged:
Comments
Thanks for letting us know, this reproduction is very useful. I have raised a bug in our internal bug tracking system about this.
This issue here appears to only be in the difference viewer view. It seems that the (nonstandard) newline will be deployed correctly despite us showing something misleading in the UI.
Software Developer on SQL Compare and SQL Data Compare
We've just released SQL Compare 12.4.4.4771 - should be much more well-behaved when it comes to dealing with newlines, so it shouldn't get tripped up like this again on non-standard newline characters.