Skip to content

Commit

Permalink
Fix: Fix misalignment of delta results comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abdelsalam authored and timopollmeier committed Jan 28, 2025
1 parent 3e5cc16 commit 014cf7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -28940,7 +28940,7 @@ init_delta_iterator (report_t report, iterator_t *results, report_t delta,
" AND (r1a.new_severity = 0) = (r2a.new_severity = 0)"
" AND (r1a.description = r2a.description)"
" WINDOW w1 AS (PARTITION BY r1a.host, normalize_port(r1a.port),"
" r1a.nvt, r1a.new_severity = 0, r2a.id is null ORDER BY r2a.id)"
" r1a.nvt, r1a.new_severity = 0, r2a.id is null ORDER BY r1a.description, r2a.id)"
" ORDER BY r1a.id),"
" r2 as (SELECT DISTINCT ON (r2a.id) r2a.*, r1a.id as r1id, row_number() over w2 as r2_rank"
" FROM r2a LEFT JOIN r1a ON r2a.host = r1a.host"
Expand All @@ -28949,7 +28949,7 @@ init_delta_iterator (report_t report, iterator_t *results, report_t delta,
" AND (r2a.new_severity = 0) = (r1a.new_severity = 0)"
" AND (r2a.description = r1a.description)"
" WINDOW w2 AS (PARTITION BY r2a.host, normalize_port(r2a.port),"
" r2a.nvt, r2a.new_severity = 0, r1a.id is null ORDER BY r1a.id)"
" r2a.nvt, r2a.new_severity = 0, r1a.id is null ORDER BY r2a.description, r1a.id)"
" ORDER BY r2a.id)"
" (SELECT r1.id AS result1_id,"
" r2.id AS result2_id,"
Expand Down

0 comments on commit 014cf7f

Please sign in to comment.