Skip to content

Filter out effectless statements#87

Open
pguyot wants to merge 1 commit intoGoEddie:masterfrom
pguyot:w11-do-not-count-effectless-statements
Open

Filter out effectless statements#87
pguyot wants to merge 1 commit intoGoEddie:masterfrom
pguyot:w11-do-not-count-effectless-statements

Conversation

@pguyot
Copy link

@pguyot pguyot commented Mar 17, 2023

Filter out statement that do not modify any row while they should have. Rationale is these statements are not properly tested, most likely because the condition is false.

How to test this code:

create procedure test_cover as
begin
	create table #t (x int, y int)
	insert into #t values (1, 1)
	update #t set x = 0 where y = 0
	select * from #t
end
go

Update statement will be marked as not executed.

Has been tested on (remove any that don't apply):

  • SQL Server 2022 for Linux (Microsoft official Docker image)

Filter out statement that do not modify any row while they should have.
Rationale is these statements are not properly tested, most likely
because the condition is false.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant