Microsoft distributes Microsoft SQL Server 2008 Service Pack 3 (SP3) fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 Service Pack 3 (SP3) fix release.
Consider the following scenario:
- You have a geometry instance and a GEOMETRYCOLLECTION instance that contains intersecting polygons in Microsoft SQL Server 2008.
- You create a query that calls the STUnion() method between the twoinstances.
- You try to run the query.
In this scenario, the intersection of the GEOMETRYCOLLECTION
instance's polygons is not contained in the query result that the STUnion()
This issue occurs because of a code defect in the STUnion()
Cumulative update information
Cumulative update package 3 for SQL Server 2008 SP3
The fix for this issue was first released in Cumulative Update 3. For more information about how to obtain this cumulative update package for SQL Server 2008 Service Pack 3, click the following article number to view the article in the Microsoft Knowledge Base:
Cumulative update package 3 for SQL Server 2008 Service Pack 3
Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 Service Pack 3 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released
To reproduce this issue, follow these steps:
- Run the following query in Microsoft SQL Server Management Studio:
DECLARE @p1 geometry = 'GEOMETRYCOLLECTION (POLYGON ((0 0, 1 1, 1 0, 0 0)), POLYGON ((0.5 0, 1.5 1, 1.5 0, 0.5 0)))';
DECLARE @p2 geometry = 'POINT(0 1)';
- Click the Spatial results tab of the result that is returned by the query.
If the intersection of two triangles from the first parameter is missing, then you have reproduced the issue successfully.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.