SQLCover icon indicating copy to clipboard operation
SQLCover copied to clipboard

Filter out effectless statements

Open pguyot opened this issue 3 years ago • 0 comments

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)

pguyot avatar Mar 17 '23 14:03 pguyot