Skip to content

Commit bec0671

Browse files
BrentOzarCopilot
andauthored
Update sp_BlitzCache.sql
Not sure if that null can happen, but the coalesce looks like a harmless tweak, so taking it. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 74d64a7 commit bec0671

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sp_BlitzCache.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5099,7 +5099,7 @@ SET
50995099
),
51005100
b.Warnings = 'This is a huge query plan (>128 levels of nesting). Click the plan link, remove the headers and footers, and save it as a .sqlplan file to view it.'
51015101
FROM ##BlitzCacheProcs AS b
5102-
CROSS APPLY sys.dm_exec_text_query_plan(b.PlanHandle, b.StatementStartOffset, b.StatementEndOffset) AS tqp
5102+
CROSS APPLY sys.dm_exec_text_query_plan(b.PlanHandle, COALESCE(b.StatementStartOffset, 0), COALESCE(b.StatementEndOffset, -1)) AS tqp
51035103
CROSS APPLY sys.dm_exec_query_plan(b.PlanHandle) AS qp
51045104
WHERE b.QueryPlan IS NULL
51055105
AND b.SPID = @@SPID

0 commit comments

Comments
 (0)