When you try to run a query that contains a UNION ALL clause in batch mode, an intra-query deadlock occurs.
This problem is fixed in the following update for SQL Server:
About SQL Server builds
Each new build for SQL Server contains all the hotfixes and security fixes that were in the previous build. We recommend that you install the latest build for your version of SQL Server:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Learn about the standard terminology Microsoft uses to describe software updates.