Symptoms

When you run a query that contains a nested loop join, SQL Server may add a spool to the inner side of the nested loop during query optimization for performance reasons. In very rare cases, this nested loop may have more outer references than the number of references that are used by the inner side of the same join.During query runtime, the outer reference values may change. In some situations, the values may change for only those references that are not used by the inner side of the nested loop. In these situations, the added performance spool can interpret this change incorrectly. Therefore, it returns incorrect results.

Cause

This issue occurs because of a problem in the performance spool.

Cumulative Update information

This issue was first fixed in the following cumulative update of SQL Server.

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.