File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5728,9 +5728,16 @@ AND ca.utc_timestamp < @end_date';
57285728 FROM #deadlocks AS d
57295729 CROSS APPLY d .xml_deadlock_report .nodes (' //deadlock/process-list/process' ) AS e(x)
57305730 ) AS x
5731+ /* Standard "filter if supplied, pass-through if NULL" predicate
5732+ pairs must be combined with AND between the groups — OR let
5733+ rows through whenever either parameter was NULL, which makes
5734+ the @database_name/@dbid filter loose whenever only one side
5735+ was supplied. Currently masked because the validation block
5736+ above aborts when the two disagree, but the shape was
5737+ wrong and would break if that validation ever relaxed. */
57315738 WHERE (x .database_id = @dbid
57325739 OR @dbid IS NULL )
5733- OR (x .current_database_name = @database_name
5740+ AND (x .current_database_name = @database_name
57345741 OR @database_name IS NULL )
57355742 OPTION (RECOMPILE , MAXDOP 1 );
57365743
You can’t perform that action at this time.
0 commit comments