Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fix misalignment in delta results comparison #2357

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading