FIX: CONTEXT_INFO returns incorrect values when context_info ends with two trailing zeros in SQL Server 2014 or 2016
Assume that you use the CONTEXT_INFO system function in SQL Server 2014 or 2016. When you assign a hexadecimal value that ends with trailing zeros to context_info, every combination of two trailing zeros ('00') is truncated. Therefore, when you retrieve the context_info value by using the CONTEXT_INFO function, wrong values are returned.
The issue was fixed in the following cumulative updates of SQL Server:
- Cumulative Update 2 for SQL Server 2016
- Cumulative Update 1 for SQL Server 2014 SP2
- Cumulative Update 7 for SQL Server 2014 SP1
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. We recommend that you download and install the latest cumulative updates for SQL Server:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Article ID: 3168710 - Last Review: 09/22/2016 03:19:00 - Revision: 3.0
Microsoft SQL Server 2014 Service Pack 1, Microsoft SQL Server 2016 Developer, Microsoft SQL Server 2016 Enterprise, Microsoft SQL Server 2016 Enterprise Core, Microsoft SQL Server 2016 Standard
- kbqfe kbfix kbexpertiseadvanced kbsurveynew KB3168710