<sigh> Okay, so, the last few Cumulative Updates have had known issues around broken remote queries using the generic ODBC connector and errors with contained availability groups, but I couldn’t really care less about those. If you use those features, I give you bombastic side eye anyway.
However, in the last few days, two more known issues have surfaced.
The first problem is that Cumulative Update 4 can give you incorrect query results when all of these are true:
- Your index explicitly specifies the sort order, like DESC
or ASC(see update below)
- Your query has a WHERE filter on that sorted column using an IN list or multiple equality searches
- Your query has an ORDER BY with the sort order as the index (which is, after all, why you created the index)
So for example, this can give me incorrect query results:
CREATE INDEX DisplayName ON dbo.Users(DisplayName DESC);
SELECT * FROM dbo.Users
WHERE DisplayName IN (N'Brent Ozar', N'Jon Skeet')
ORDER BY DisplayName DESC;
To work around that problem, the CU4 documentation suggests you uninstall CU4 or enable trace flag 13166 and free the plan cache.
Update: in the comments, Paul White points out that trace flag 13166 skips a logic step when building query plans, but it only applies to descending index keys. That means the CU4 documentation might be wrong, and this bug might only apply to indexes with a descending key specified.
The second problem is memory dumps every 15 minutes if you have both Query Store and Parameter-Sensitive Plan Optimization (PSPO) turned on. Microsoft says they’re working on this issue, but for now, the workaround is to disable Query Store or PSPO, or continuously delete PSPO plans from Query Store yourself.
Should you do new installations of SQL Server 2022 today? I’m not going to give you the answer, dear reader – instead, I wanna hear your opinion in the comments. If you were deploying a mission-critical production server in June, which SQL Server version would you pick?